mirror of
https://github.com/ansible/awx.git
synced 2026-06-27 01:18:02 -02:30
Update receptor conf when address changes
Add post save and post delete hooks to call write_receptor_config when a receptor address is added / removed. Add peers_from_control_nodes to provision_instance Signed-off-by: Seth Foster <fosterbseth@gmail.com>
This commit is contained in:
@@ -703,9 +703,10 @@ def generate_config_data():
|
||||
|
||||
receptor_config = list(RECEPTOR_CONFIG_STARTER)
|
||||
for instance in instances:
|
||||
if instance.listener_port:
|
||||
peer = {'tcp-peer': {'address': f'{instance.hostname}:{instance.listener_port}', 'tls': 'tlsclient'}}
|
||||
receptor_config.append(peer)
|
||||
# receptor_addresses = instance.receptor_addresses.all()
|
||||
# if not receptor_addresses.exists() and instance.listener_port:
|
||||
# peer = {'tcp-peer': {'address': f'{instance.hostname}:{instance.listener_port}', 'tls': 'tlsclient'}}
|
||||
# receptor_config.append(peer)
|
||||
for address in instance.receptor_addresses.all():
|
||||
if address.get_peer_type() and address.is_internal:
|
||||
peer = {
|
||||
|
||||
Reference in New Issue
Block a user