Second attempt at converting tower_job_template

This commit is contained in:
John Westcott IV
2020-03-30 19:01:52 -04:00
parent 5eddcdd5f5
commit db38339179
3 changed files with 401 additions and 190 deletions

View File

@@ -475,6 +475,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']]