mirror of
https://github.com/ansible/awx.git
synced 2026-05-12 20:07:37 -02:30
Add install bundle support
group_vars all.yaml changes: - peer entry has two fields, address and port - receptor_port is inferred from the first receptor_address entry that uses protocol tcp other changes: ActivityStream now records when receptor_addresses are peered to Signed-off-by: Seth Foster <fosterbseth@gmail.com>
This commit is contained in:
@@ -28,7 +28,11 @@ class Command(BaseCommand):
|
||||
try:
|
||||
instance = Instance.objects.get(hostname=kwargs.pop('hostname'))
|
||||
kwargs['instance'] = instance
|
||||
addr = ReceptorAddress.objects.create(**kwargs)
|
||||
# address and protocol are unique together for ReceptorAddress
|
||||
# If an address has (address, protocol), it will update the rest of the values suppled in defaults dict
|
||||
# if no address exists with (address, protocol), then a new address will be created
|
||||
# these unique together fields need to be consistent with the unique constraint in the ReceptorAddress model
|
||||
addr, _ = ReceptorAddress.objects.update_or_create(address=kwargs.pop('address'), protocol=kwargs.pop('protocol'), defaults=kwargs)
|
||||
print(f"Successfully added receptor address {addr.get_full_address()}")
|
||||
self.changed = True
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user