Merge pull request #6491 from john-westcott-iv/second_tower_job_template_update

Second attempt at converting tower_job_template

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot]
2020-04-01 14:09:22 +00:00
committed by GitHub
5 changed files with 465 additions and 239 deletions

View File

@@ -482,6 +482,10 @@ class TowerModule(AnsibleModule):
self.exit_json(**self.json_output)
def modify_associations(self, association_endpoint, new_association_list):
# if we got None instead of [] we are not modifying the association_list
if new_association_list is None:
return
# First get the existing associations
response = self.get_all_endpoint(association_endpoint)
existing_associated_ids = [association['id'] for association in response['json']['results']]