Skip to content

Commit

Permalink
Merge pull request #6491 from john-westcott-iv/second_tower_job_templ…
Browse files Browse the repository at this point in the history
…ate_update

Second attempt at converting tower_job_template

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
  • Loading branch information
2 parents 498c525 + bb184f8 commit d64b898
Show file tree
Hide file tree
Showing 5 changed files with 463 additions and 237 deletions.
1 change: 1 addition & 0 deletions awx_collection/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ The following notes are changes that may require changes to playbooks:
- `tower_group` used to also service inventory sources, but this functionality has been removed from this module; use `tower_inventory_source` instead.
- Specified `tower_config` file used to handle `k=v` pairs on a single line; this is no longer supported. Please use a file formatted as `yaml`, `json` or `ini` only.
- Some return values (e.g., `credential_type`) have been removed. Use of `id` is recommended.
- `tower_job_template` no longer supports the deprecated `extra_vars_path` parameter, please use `extra_vars` with the lookup plugin to replace this functionality.

## Running Unit Tests

Expand Down
4 changes: 4 additions & 0 deletions awx_collection/plugins/module_utils/tower_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,10 @@ def delete_if_needed(self, existing_item, on_delete=None):
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']]
Expand Down
Loading

0 comments on commit d64b898

Please sign in to comment.