mirror of
https://github.com/ansible/awx.git
synced 2026-05-17 22:37:41 -02:30
Follow up on new execution node creation
- hop nodes are descoped - links need to be created on execution node creation - expose the 'edit' capabilities on the instance serializer
This commit is contained in:
@@ -424,7 +424,7 @@ def on_instance_group_saved(sender, instance, created=False, raw=False, **kwargs
|
||||
@receiver(post_save, sender=Instance)
|
||||
def on_instance_saved(sender, instance, created=False, raw=False, **kwargs):
|
||||
# TODO: handle update to instance
|
||||
if settings.IS_K8S and created and instance.node_type in ('execution', 'hop'):
|
||||
if settings.IS_K8S and created and instance.node_type in (Instance.Types.EXECUTION,):
|
||||
from awx.main.tasks.receptor import write_receptor_config # prevents circular import
|
||||
|
||||
# on commit broadcast to all control instance to update their receptor configs
|
||||
|
||||
@@ -641,7 +641,7 @@ RECEPTOR_CONFIG_STARTER = (
|
||||
def write_receptor_config():
|
||||
receptor_config = list(RECEPTOR_CONFIG_STARTER)
|
||||
|
||||
instances = Instance.objects.exclude(node_type='control')
|
||||
instances = Instance.objects.filter(node_type=Instance.Types.EXECUTION)
|
||||
for instance in instances:
|
||||
peer = {'tcp-peer': {'address': f'{instance.hostname}:{instance.listener_port}', 'tls': 'tlsclient'}}
|
||||
receptor_config.append(peer)
|
||||
|
||||
Reference in New Issue
Block a user