-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Solve issue
Object diff for roles removing most roles
(#562)
* added singulars to be treated as well * new attributes for roles * new attributes for roles * added changelog fragment * fix on map_item function * removed extra empty line * fixes on object_diff inputs * removed debug information. added ORGANIZATIONLESS to credentials and users without an organization * fix lintering issues * fix lintering issues * fix lintering issues * tests fixes. multiple list from redhat-cop/infra.aap_configuration#647 fixed. Test ping URL fixed
- Loading branch information
Showing
29 changed files
with
201 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,30 @@ | ||
--- | ||
- name: Get the organization ID | ||
ansible.builtin.set_fact: | ||
__controller_organization_id: "{{ lookup(controller_api_plugin, 'organizations', | ||
query_params={'name': orgs}, | ||
host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) | ||
}}" | ||
- name: "Block to be executed only when connected against an AAP instance (not Tower)" | ||
when: is_aap | ||
block: | ||
- name: Get the organization ID | ||
ansible.builtin.set_fact: | ||
__controller_organization_id: "{{ lookup(controller_api_plugin, 'organizations', | ||
query_params={'name': orgs}, | ||
host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) | ||
}}" | ||
|
||
- name: "Get the API list of all Execution Environments in Organization {{ orgs }}" | ||
ansible.builtin.set_fact: | ||
__controller_api_execution_environments: "{{ query(controller_api_plugin, 'execution_environments', | ||
query_params={'organization': __controller_organization_id.id}, | ||
host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, | ||
return_all=true, max_objects=query_controller_api_max_objects) | ||
}}" | ||
- name: "Get the API list of all Execution Environments in Organization {{ orgs }}" | ||
ansible.builtin.set_fact: | ||
__controller_api_execution_environments: "{{ query(controller_api_plugin, 'execution_environments', | ||
query_params={'organization': __controller_organization_id.id}, | ||
host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, | ||
return_all=true, max_objects=query_controller_api_max_objects) | ||
}}" | ||
|
||
- name: "Find the difference of Execution Environment between what is on the Controller versus CasC on SCM" | ||
ansible.builtin.set_fact: | ||
__execution_environments_difference: "{{ query(controller_role_plugin, | ||
api_list=__controller_api_execution_environments, compare_list=controller_execution_environments, | ||
with_present=include_present_state, set_absent=true) | ||
}}" | ||
- name: "Find the difference of Execution Environment between what is on the Controller versus CasC on SCM" | ||
ansible.builtin.set_fact: | ||
__execution_environments_difference: "{{ query(controller_role_plugin, | ||
api_list=__controller_api_execution_environments, compare_list=controller_execution_environments, | ||
with_present=include_present_state, set_absent=true) | flatten | ||
}}" | ||
|
||
- name: "Set execution_environment's list to be configured" | ||
ansible.builtin.set_fact: | ||
controller_execution_environments: "{{ __execution_environments_difference }}" | ||
- name: "Set execution_environment's list to be configured" | ||
ansible.builtin.set_fact: | ||
controller_execution_environments: "{{ __execution_environments_difference }}" | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.