mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 19:10:07 -03:30
Migration file to set peers_from_control_ nodes to true for existing execution nodes (#14061)
This commit is contained in:
parent
40fca6db57
commit
3eda1ede8d
@ -4,6 +4,11 @@ import django.core.validators
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
def set_peers_from_control_nodes_true(apps, schema_editor):
|
||||
Instance = apps.get_model('main', 'Instance')
|
||||
Instance.objects.filter(node_type='execution').update(peers_from_control_nodes=True)
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
('main', '0184_django_indexes'),
|
||||
@ -44,4 +49,5 @@ class Migration(migrations.Migration):
|
||||
validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(65535)],
|
||||
),
|
||||
),
|
||||
migrations.RunPython(set_peers_from_control_nodes_true),
|
||||
]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user