Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing roles to have label working #946

Merged
merged 5 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions roles/gateway_applications/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
register: __gateway_applications_job_async
changed_when: not __gateway_applications_job_async.changed
vars:
__operation: "{{ operation_translate[__gateway_application_item.state | default(platform_state) | default('present')] }}"
ansible_async_dir: "{{ aap_configuration_async_dir | default(omit) }}"

- name: Applications | Wait for finish the configuration
Expand All @@ -50,5 +51,6 @@
when: __gateway_applications_job_async_results_item.ansible_job_id is defined
no_log: "{{ applications_secure_logging }}"
vars:
__operation: "{{ operation_translate[__gateway_applications_job_async_results_item.state | default(platform_state) | default('present')] }}"
ansible_async_dir: "{{ aap_configuration_async_dir | default(omit) }}"
...
2 changes: 2 additions & 0 deletions roles/gateway_authenticator_maps/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---

Check failure on line 1 in roles/gateway_authenticator_maps/tasks/main.yml

View workflow job for this annotation

GitHub Actions / pre-commit_and_sanity / pre-commit / pre-commit

load-failure[runtimeerror]

Failed to load YAML file: roles/gateway_authenticator_maps/tasks/main.yml
- name: Authenticator Map | Configuration # noqa fqcn[action-core]
ansible.platform.authenticator_map:
name: "{{ __gateway_authenticator_maps_item.name | mandatory }}"
Expand Down Expand Up @@ -32,6 +32,7 @@
register: __gateway_authenticator_maps_job_async
changed_when: not __gateway_authenticator_maps_job_async.changed
vars:
__operation: "{{ operation_translate[__gateway_authenticator_maps_item.state | default(platform_state) | default('present')] }}"
ansible_async_dir: "{{ aap_configuration_async_dir | default(omit) }}"

- name: Authenticator Map | Wait for finish the configuration
Expand All @@ -48,5 +49,6 @@
when: __gateway_authenticator_maps_job_async_results_item.ansible_job_id is defined
no_log: "{{ gateway_authenticator_maps_secure_logging }}"
vars:
__operation: "{{ operation_translate[__gateway_authenticator_maps_job_async_results_item.state | default(platform_state) | default('present')] }}"
ansible_async_dir: "{{ aap_configuration_async_dir | default(omit) }}"
...
2 changes: 2 additions & 0 deletions roles/gateway_authenticators/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
register: __gateway_authenticators_job_async
changed_when: not __gateway_authenticators_job_async.changed
vars:
__operation: "{{ operation_translate[__gateway_authenticators_item.state | default(platform_state) | default('present')] }}"
ansible_async_dir: "{{ aap_configuration_async_dir | default(omit) }}"

- name: Authenticators | Wait for finish the configuration
Expand All @@ -46,5 +47,6 @@
when: __gateway_authenticators_job_async_results_item.ansible_job_id is defined
no_log: "{{gateway_authenticators_secure_logging }}"
vars:
__operation: "{{ operation_translate[__gateway_authenticators_job_async_results_item.state | default(platform_state) | default('present')] }}"
ansible_async_dir: "{{ aap_configuration_async_dir | default(omit) }}"
...
2 changes: 2 additions & 0 deletions roles/gateway_http_ports/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
register: __gateway_http_ports_job_async
changed_when: not __gateway_http_ports_job_async.changed
vars:
__operation: "{{ operation_translate[__gateway_http_ports_item.state | default(platform_state) | default('present')] }}"
ansible_async_dir: "{{ aap_configuration_async_dir | default(omit) }}"

- name: Http Ports | Wait for finish the configuration
Expand All @@ -42,5 +43,6 @@
when: __gateway_http_ports_job_async_results_item.ansible_job_id is defined
no_log: "{{ gateway_http_ports_secure_logging }}"
vars:
__operation: "{{ operation_translate[__gateway_http_ports_job_async_results_item.state | default(platform_state) | default('present')] }}"
ansible_async_dir: "{{ aap_configuration_async_dir | default(omit) }}"
...
2 changes: 2 additions & 0 deletions roles/gateway_organizations/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
register: __gateway_organizations_job_async
changed_when: not __gateway_organizations_job_async.changed
vars:
__operation: "{{ operation_translate[__gateway_organizations_item.state | default(platform_state) | default('present')] }}"
ansible_async_dir: "{{ aap_configuration_async_dir | default(omit) }}"

- name: Organizations | Wait for finish the configuration
Expand All @@ -40,5 +41,6 @@
when: __gateway_organizations_job_async_results_item.ansible_job_id is defined
no_log: "{{ gateway_organizations_secure_logging }}"
vars:
__operation: "{{ operation_translate[__gateway_organizations_job_async_results_item.state | default(platform_state) | default('present')] }}"
ansible_async_dir: "{{ aap_configuration_async_dir | default(omit) }}"
...
2 changes: 2 additions & 0 deletions roles/gateway_routes/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
register: __gateway_routes_job_async
changed_when: not __gateway_routes_job_async.changed
vars:
__operation: "{{ operation_translate[__gateway_routes_job_async.state | default(platform_state) | default('present')] }}"
ansible_async_dir: "{{ aap_configuration_async_dir | default(omit) }}"

- name: Routes | Wait for finish the configuration
Expand All @@ -48,5 +49,6 @@
when: __gateway_routes_job_async_results_item.ansible_job_id is defined
no_log: "{{ gateway_routes_secure_logging }}"
vars:
__operation: "{{ operation_translate[__gateway_routes_job_async_results_item.state | default(platform_state) | default('present')] }}"
ansible_async_dir: "{{ aap_configuration_async_dir | default(omit) }}"
...
2 changes: 2 additions & 0 deletions roles/gateway_service_clusters/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
register: __gateway_service_clusters_job_async
changed_when: not __gateway_service_clusters_job_async.changed
vars:
__operation: "{{ operation_translate[__gateway_service_clusters_job_async.state | default(platform_state) | default('present')] }}"
ansible_async_dir: "{{ aap_configuration_async_dir | default(omit) }}"

- name: Service Clusters | Wait for finish the configuration
Expand All @@ -50,5 +51,6 @@
when: __gateway_service_clusters_job_async_results_item.ansible_job_id is defined
no_log: "{{ gateway_service_clusters_secure_logging }}"
vars:
__operation: "{{ operation_translate[__gateway_service_clusters_job_async_results_item.state | default(platform_state) | default('present')] }}"
ansible_async_dir: "{{ aap_configuration_async_dir | default(omit) }}"
...
2 changes: 2 additions & 0 deletions roles/gateway_service_keys/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
register: __gateway_service_keys_job_async
changed_when: not __gateway_service_keys_job_async.changed
vars:
__operation: "{{ operation_translate[__gateway_service_keys_item.state | default(platform_state) | default('present')] }}"
ansible_async_dir: "{{ aap_configuration_async_dir | default(omit) }}"

- name: Service Keys | Wait for finish the configuration
Expand All @@ -45,5 +46,6 @@
when: __gateway_service_keys_job_async_results_item.ansible_job_id is defined
no_log: "{{ gateway_gateway_service_keys_secure_logging }}"
vars:
__operation: "{{ operation_translate[__gateway_service_keys_job_async_results_item.state | default(platform_state) | default('present')] }}"
ansible_async_dir: "{{ aap_configuration_async_dir | default(omit) }}"
...
2 changes: 2 additions & 0 deletions roles/gateway_service_nodes/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
register: __gateway_service_nodes_job_async
changed_when: not __gateway_service_nodes_job_async.changed
vars:
__operation: "{{ operation_translate[__gateway_service_nodes_item.state | default(platform_state) | default('present')] }}"
ansible_async_dir: "{{ aap_configuration_async_dir | default(omit) }}"

- name: Service Nodes | Wait for finish the configuration
Expand All @@ -42,5 +43,6 @@
when: __gateway_service_nodes_job_async_results_item.ansible_job_id is defined
no_log: "{{ service_nodes_secure_logging }}"
vars:
__operation: "{{ operation_translate[__gateway_service_nodes_job_async_results_item.state | default(platform_state) | default('present')] }}"
ansible_async_dir: "{{ aap_configuration_async_dir | default(omit) }}"
...
2 changes: 2 additions & 0 deletions roles/gateway_services/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
register: __gateway_services_job_async
changed_when: not __gateway_services_job_async.changed
vars:
__operation: "{{ operation_translate[__gateway_services_item.state | default(platform_state) | default('present')] }}"
ansible_async_dir: "{{ aap_configuration_async_dir | default(omit) }}"

- name: Services | Wait for finish the configuration
Expand All @@ -49,5 +50,6 @@
when: __gateway_services_job_async_results_item.ansible_job_id is defined
no_log: "{{ services_secure_logging }}"
vars:
__operation: "{{ operation_translate[__gateway_services_job_async_results_item.state | default(platform_state) | default('present')] }}"
ansible_async_dir: "{{ aap_configuration_async_dir | default(omit) }}"
...
2 changes: 2 additions & 0 deletions roles/gateway_teams/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
register: __gateway_teams_job_async
changed_when: not __gateway_teams_job_async.changed
vars:
__operation: "{{ operation_translate[__gateway_teams_job_async.state | default(platform_state) | default('present')] }}"
ansible_async_dir: "{{ aap_configuration_async_dir | default(omit) }}"

- name: Teams | Wait for finish the configuration
Expand All @@ -42,5 +43,6 @@
when: __gateway_teams_job_async_results_item.ansible_job_id is defined
no_log: "{{ platform_teams_secure_logging }}"
vars:
__operation: "{{ operation_translate[__gateway_teams_job_async_results_item.state | default(platform_state) | default('present')] }}"
ansible_async_dir: "{{ aap_configuration_async_dir | default(omit) }}"
...
2 changes: 2 additions & 0 deletions roles/gateway_users/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
register: __gateway_user_accounts_job_async
changed_when: not __gateway_user_accounts_job_async.changed
vars:
__operation: "{{ operation_translate[__gateway_user_accounts_job_async.state | default(platform_state) | default('present')] }}"
ansible_async_dir: "{{ aap_configuration_async_dir | default(omit) }}"

- name: Users | Wait for finish the configuration
Expand All @@ -48,5 +49,6 @@
when: __gateway_user_accounts_job_async_results_item.ansible_job_id is defined
no_log: "{{ users_secure_logging }}"
vars:
__operation: "{{ operation_translate[__gateway_user_accounts_job_async_results_item.state | default(platform_state) | default('present')] }}"
ansible_async_dir: "{{ aap_configuration_async_dir | default(omit) }}"
...
28 changes: 15 additions & 13 deletions roles/hub_collection/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@

- name: Update or destroy Automation Hub Collection
ansible.hub.ah_collection:
namespace: "{{ __collection.namespace }}"
name: "{{ __collection.name }}"
version: "{{ __collection.version | default(omit) }}"
path: "{{ __collection.path | default(omit) }}"
repository: "{{ __collection.repository | default(omit) }}"
wait: "{{ __collection.wait | default(omit) }}"
auto_approve: "{{ __collection.auto_approve | default(omit) }}"
timeout: "{{ __collection.timeout | default(omit) }}"
interval: "{{ __collection.interval | default(omit) }}"
overwrite_existing: "{{ __collection.overwrite_existing | default(omit) }}"
state: "{{ __collection.state | default('present') }}"
namespace: "{{ __collections_item.namespace }}"
name: "{{ __collections_item.name }}"
version: "{{ __collections_item.version | default(omit) }}"
path: "{{ __collections_item.path | default(omit) }}"
repository: "{{ __collections_item.repository | default(omit) }}"
wait: "{{ __collections_item.wait | default(omit) }}"
auto_approve: "{{ __collections_item.auto_approve | default(omit) }}"
timeout: "{{ __collections_item.timeout | default(omit) }}"
interval: "{{ __collections_item.interval | default(omit) }}"
overwrite_existing: "{{ __collections_item.overwrite_existing | default(omit) }}"
state: "{{ __collections_item.state | default('present') }}"
ah_host: "{{ aap_hostname | default(omit) }}"
ah_username: "{{ aap_username | default(omit) }}"
ah_password: "{{ aap_password | default(omit) }}"
Expand All @@ -36,7 +36,7 @@
request_timeout: "{{ aap_request_timeout | default(omit) }}"
loop: "{{ ah_collections }}"
loop_control:
loop_var: "__collection"
loop_var: __collections_item
label: "{{ __operation.verb }} the label {{ __ah_configuration_collection__item.name }} to Controller"
pause: "{{ ah_configuration_collection__loop_delay }}"
no_log: "{{ ah_configuration_collection_secure_logging }}"
Expand All @@ -45,6 +45,7 @@
register: __collections_job_async
changed_when: not __collections_job_async.changed
vars:
__operation: "{{ operation_translate[__collections_item.state | default(platform_state) | default('present')] }}"
ansible_async_dir: '{{ aap_configuration_async_dir }}'

- name: Sleep for 10 seconds and continue with play
Expand All @@ -61,9 +62,10 @@
loop: "{{ __collections_job_async.results }}"
loop_control:
loop_var: __collections_job_async_result_item
label: "{{ __operation.verb }} Label {{ __collections_job_async_result_item.__collection.name }} | Wait for finish the Label {{ __operation.action }}"
label: "{{ __operation.verb }} Label {{ __collections_job_async_result_item.__collections_item.name }} | Wait for finish the Label {{ __operation.action }}"
when: __collections_job_async_result_item.ansible_job_id is defined
no_log: "{{ ah_configuration_collection_secure_logging }}"
vars:
__operation: "{{ operation_translate[__collections_job_async_result_item.state | default(platform_state) | default('present')] }}"
ansible_async_dir: '{{ aap_configuration_async_dir }}'
...
4 changes: 3 additions & 1 deletion roles/hub_collection_repository/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
request_timeout: "{{ aap_request_timeout | default(omit) }}"
loop: "{{ ah_collection_repositories }}"
loop_control:
loop_var: "__collection_repository_item"
loop_var: __collection_repository_item
label: "{{ __operation.verb }} the label {{ __ah_configuration_collection_repository__item.name }} to Controller"
pause: "{{ ah_configuration_collection_repository__loop_delay }}"
no_log: "{{ ah_configuration_collection_repository_secure_logging }}"
Expand All @@ -31,6 +31,7 @@
register: __collection_repository_job_async
changed_when: not __collection_repository_job_async.changed
vars:
__operation: "{{ operation_translate[__collection_repository_item.state | default(platform_state) | default('present')] }}"
ansible_async_dir: '{{ aap_configuration_async_dir }}'

- name: "Create Repository | Wait for finish the repository creation"
Expand All @@ -47,6 +48,7 @@
when: __collection_repository_job_async_result_item.ansible_job_id is defined
no_log: "{{ ah_configuration_collection_repository_secure_logging }}"
vars:
__operation: "{{ operation_translate[__collection_repository_job_async_result_item.state | default(platform_state) | default('present')] }}"
ansible_async_dir: '{{ aap_configuration_async_dir }}'

...
4 changes: 3 additions & 1 deletion roles/hub_collection_repository_sync/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
request_timeout: "{{ aap_request_timeout | default(omit) }}"
loop: "{{ ah_collection_repositories }}"
loop_control:
loop_var: "__collection_repository_sync_item"
loop_var: __collection_repository_sync_item
label: "{{ __operation.verb }} the label {{ __ah_configuration_collection_repository_sync__item.name }} to Controller"
pause: "{{ ah_configuration_collection_repository_sync__loop_delay }}"
no_log: "{{ ah_configuration_collection_repository_sync_secure_logging }}"
Expand All @@ -23,6 +23,7 @@
register: __collection_repository_sync_job_async
changed_when: not __collection_repository_sync_job_async.changed
vars:
__operation: "{{ operation_translate[__collection_repository_sync_item.state | default(platform_state) | default('present')] }}"
ansible_async_dir: '{{ aap_configuration_async_dir }}'

- name: "Sync Repository | Wait for finish the repository sync"
Expand All @@ -39,6 +40,7 @@
when: __collection_repository_sync_job_async_result_item.ansible_job_id is defined
no_log: "{{ ah_configuration_collection_repository_sync_secure_logging }}"
vars:
__operation: "{{ operation_translate[__collection_repository_sync_job_async_result_item.state | default(platform_state) | default('present')] }}"
ansible_async_dir: '{{ aap_configuration_async_dir }}'

...
4 changes: 3 additions & 1 deletion roles/hub_ee_image/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
request_timeout: "{{ aap_request_timeout | default(omit) }}"
loop: "{{ ah_ee_images }}"
loop_control:
loop_var: "__ee_image_item"
loop_var: __ee_image_item
label: "{{ __operation.verb }} the label {{ __ah_configuration_ee_image__item.name }} to Controller"
pause: "{{ ah_configuration_ee_image__loop_delay }}"
no_log: "{{ ah_configuration_ee_image_secure_logging }}"
Expand All @@ -25,6 +25,7 @@
register: __ee_images_job_async
changed_when: not __ee_images_job_async.changed
vars:
__operation: "{{ operation_translate[__ee_image_item.state | default(platform_state) | default('present')] }}"
ansible_async_dir: '{{ aap_configuration_async_dir }}'

- name: "Create EE Image | Wait for finish the ee_image creation"
Expand All @@ -41,5 +42,6 @@
when: __ee_images_job_async_result_item.ansible_job_id is defined
no_log: "{{ ah_configuration_ee_image_secure_logging }}"
vars:
__operation: "{{ operation_translate[__ee_images_job_async_result_item.state | default(platform_state) | default('present')] }}"
ansible_async_dir: '{{ aap_configuration_async_dir }}'
...
4 changes: 3 additions & 1 deletion roles/hub_ee_registry/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
proxy_password: "{{ __ee_registry_item.proxy_password | default(proxy_password | default(omit)) }}"
loop: "{{ ah_ee_registries }}"
loop_control:
loop_var: "__ee_registry_item"
loop_var: __ee_registry_item
label: "{{ __operation.verb }} the label {{ __ah_configuration_ee_registry__item.name }} to Controller"
pause: "{{ ah_configuration_ee_registry__loop_delay }}"
no_log: "{{ ah_configuration_ee_registry_secure_logging }}"
Expand All @@ -31,6 +31,7 @@
register: __ee_registries_job_async
changed_when: not __ee_registries_job_async.changed
vars:
__operation: "{{ operation_translate[__ee_registry_item.state | default(platform_state) | default('present')] }}"
ansible_async_dir: '{{ aap_configuration_async_dir }}'

- name: "Create EE Registry | Wait for finish the ee_registry creation"
Expand All @@ -47,5 +48,6 @@
when: __ee_registries_job_async_result_item.ansible_job_id is defined
no_log: "{{ ah_configuration_ee_registry_secure_logging }}"
vars:
__operation: "{{ operation_translate[__ee_registries_job_async_result_item.state | default(platform_state) | default('present')] }}"
ansible_async_dir: '{{ aap_configuration_async_dir }}'
...
4 changes: 3 additions & 1 deletion roles/hub_ee_registry_index/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
request_timeout: "{{ aap_request_timeout | default(omit) }}"
loop: "{{ ah_ee_registries }}"
loop_control:
loop_var: "__ee_registry_item"
loop_var: __ee_registry_item
label: "{{ __operation.verb }} the label {{ __ah_configuration_ee_registry_index__item.name }} to Controller"
pause: "{{ ah_configuration_ee_registry_index__loop_delay }}"
when: __ee_registry_item.index | default(false)
Expand All @@ -25,6 +25,7 @@
register: __ee_registry_indexes_job_async
changed_when: not __ee_registry_indexes_job_async.changed
vars:
__operation: "{{ operation_translate[__ee_registry_item.state | default(platform_state) | default('present')] }}"
ansible_async_dir: '{{ aap_configuration_async_dir }}'

- name: "Index EE Registry | Wait for finish the ee_registry_index creation"
Expand All @@ -41,5 +42,6 @@
when: __ee_registry_indexes_job_async_result_item.ansible_job_id is defined
no_log: "{{ ah_configuration_ee_registry_secure_logging }}"
vars:
__operation: "{{ operation_translate[__ee_registry_indexes_job_async_result_item.state | default(platform_state) | default('present')] }}"
ansible_async_dir: '{{ aap_configuration_async_dir }}'
...
2 changes: 2 additions & 0 deletions roles/hub_ee_registry_sync/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
register: __ee_registry_syncs_job_async
changed_when: not __ee_registry_syncs_job_async.changed
vars:
__operation: "{{ operation_translate[__ee_registry_syncs_job_async.state | default(platform_state) | default('present')] }}"
ansible_async_dir: '{{ aap_configuration_async_dir }}'

- name: "EE Registry Sync | Wait for finish the ee_registry_sync to complete"
Expand All @@ -41,5 +42,6 @@
when: __ee_registry_syncs_job_async_result_item.ansible_job_id is defined
no_log: "{{ ah_configuration_ee_registry_secure_logging }}"
vars:
__operation: "{{ operation_translate[__ee_registry_syncs_job_async_result_item.state | default(platform_state) | default('present')] }}"
ansible_async_dir: '{{ aap_configuration_async_dir }}'
...
Loading
Loading