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 gateway user error #949

Merged
merged 6 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all 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: 1 addition & 1 deletion roles/gateway_routes/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
loop: "{{ gateway_routes }}"
loop_control:
loop_var: __gateway_routes_item
label: "{{ __operation.verb }} the label {{ __gateway_routes_item.name }} to Controller"
label: "{{ __operation.verb }} the Gateway route {{ __gateway_routes_item.name }}"
pause: "{{ controller_configuration_labels_loop_delay }}"
no_log: "{{ gateway_routes_secure_logging }}"
async: 1000
Expand Down
2 changes: 1 addition & 1 deletion roles/gateway_service_clusters/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
loop: "{{ gateway_service_clusters }}"
loop_control:
loop_var: __gateway_service_clusters_item
label: "{{ __operation.verb }} the label {{ __gateway_service_clusters_item.name }} to Controller"
label: "{{ __operation.verb }} the Gateway service cluster {{ __gateway_service_clusters_item.name }}"
pause: "{{ controller_configuration_labels_loop_delay }}"
no_log: "{{ gateway_service_clusters_secure_logging }}"
async: 1000
Expand Down
2 changes: 1 addition & 1 deletion roles/gateway_service_keys/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
loop: "{{ gateway_gateway_service_keys }}"
loop_control:
loop_var: __gateway_service_keys_item
label: "{{ __operation.verb }} the label {{ __gateway_service_keys_item.name }} to Controller"
label: "{{ __operation.verb }} the Gateway service key {{ __gateway_service_keys_item.name }}"
pause: "{{ gateway_gateway_service_keys_loop_delay }}"
no_log: "{{ gateway_service_keys_secure_logging }}"
async: 1000
Expand Down
2 changes: 1 addition & 1 deletion roles/gateway_service_nodes/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
loop: "{{ gateway_service_nodes }}"
loop_control:
loop_var: __gateway_service_nodes_item
label: "{{ __operation.verb }} the label {{ __gateway_service_nodes_item.name }} to Controller"
label: "{{ __operation.verb }} the Gateway service node {{ __gateway_service_nodes_item.name }}"
pause: "{{ gateway_service_nodes_loop_delay }}"
no_log: "{{ service_nodes_secure_logging }}"
async: 1000
Expand Down
2 changes: 1 addition & 1 deletion roles/gateway_services/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
loop: "{{ gateway_services }}"
loop_control:
loop_var: __gateway_services_item
label: "{{ __operation.verb }} the label {{ __gateway_services_item.name }} to Controller"
label: "{{ __operation.verb }} the Gateway service {{ __gateway_services_item.name }}"
pause: "{{ gateway_services_loop_delay }}"
no_log: "{{ services_secure_logging }}"
async: 1000
Expand Down
2 changes: 1 addition & 1 deletion roles/gateway_teams/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
loop: "{{ aap_teams }}"
loop_control:
loop_var: __gateway_teams_item
label: "{{ __operation.verb }} the label {{ __gateway_teams_item.name }} to Controller"
label: "{{ __operation.verb }} the Gateway team {{ __gateway_teams_item.name }}"
pause: "{{ gateway_teams_loop_delay }}"
no_log: "{{ gateway_teams_secure_logging }}"
async: 1000
Expand Down
2 changes: 1 addition & 1 deletion roles/gateway_users/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
loop: "{{ aap_user_accounts }}"
loop_control:
loop_var: __gateway_user_accounts_item
label: "{{ __operation.verb }} the label {{ __gateway_user_accounts_item.name }} to Controller"
label: "{{ __operation.verb }} the Gateway user {{ __gateway_user_accounts_item.username }}"
pause: "{{ gateway_users_loop_delay }}"
no_log: "{{ users_secure_logging }}"
async: 1000
Expand Down
2 changes: 1 addition & 1 deletion roles/hub_collection/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
loop: "{{ ah_collections }}"
loop_control:
loop_var: __collections_item
label: "{{ __operation.verb }} the label {{ __ah_configuration_collection__item.name }} to Controller"
label: "{{ __operation.verb }} the collection {{ __ah_configuration_collection__item.name }} in Hub"
pause: "{{ ah_configuration_collection__loop_delay }}"
no_log: "{{ ah_configuration_collection_secure_logging }}"
async: "{{ ah_configuration_collection_async_timeout }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/hub_collection_repository/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
loop: "{{ ah_collection_repositories }}"
loop_control:
loop_var: __collection_repository_item
label: "{{ __operation.verb }} the label {{ __ah_configuration_collection_repository__item.name }} to Controller"
label: "{{ __operation.verb }} the remote repository {{ __ah_configuration_collection_repository__item.name }} in Hub"
pause: "{{ ah_configuration_collection_repository__loop_delay }}"
no_log: "{{ ah_configuration_collection_repository_secure_logging }}"
async: "{{ ah_configuration_collection_repository_async_timeout }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/hub_collection_repository_sync/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
loop: "{{ ah_collection_repositories }}"
loop_control:
loop_var: __collection_repository_sync_item
label: "{{ __operation.verb }} the label {{ __ah_configuration_collection_repository_sync__item.name }} to Controller"
label: "{{ __operation.verb }} the sync {{ __ah_configuration_collection_repository_sync__item.name }} in Hub"
pause: "{{ ah_configuration_collection_repository_sync__loop_delay }}"
no_log: "{{ ah_configuration_collection_repository_sync_secure_logging }}"
async: "{{ ah_configuration_collection_repository_sync_async_timeout }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/hub_ee_image/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
loop: "{{ ah_ee_images }}"
loop_control:
loop_var: __ee_image_item
label: "{{ __operation.verb }} the label {{ __ah_configuration_ee_image__item.name }} to Controller"
label: "{{ __operation.verb }} the EE image {{ __ah_configuration_ee_image__item.name }} in Hub"
pause: "{{ ah_configuration_ee_image__loop_delay }}"
no_log: "{{ ah_configuration_ee_image_secure_logging }}"
async: "{{ ah_configuration_ee_image_async_timeout }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/hub_ee_registry/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
loop: "{{ ah_ee_registries }}"
loop_control:
loop_var: __ee_registry_item
label: "{{ __operation.verb }} the label {{ __ah_configuration_ee_registry__item.name }} to Controller"
label: "{{ __operation.verb }} the EE registry {{ __ah_configuration_ee_registry__item.name }} in Hub"
pause: "{{ ah_configuration_ee_registry__loop_delay }}"
no_log: "{{ ah_configuration_ee_registry_secure_logging }}"
async: "{{ ah_configuration_ee_registry_async_timeout }}"
Expand Down
16 changes: 8 additions & 8 deletions roles/hub_ee_registry_index/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
# Create AH EE registry
- name: Index Automation Hub EE Registry
ansible.hub.ah_ee_registry_index:
name: "{{ __ee_registry_item.name }}"
wait: "{{ __ee_registry_item.wait | default(omit) }}"
interval: "{{ __ee_registry_item.interval | default(ah_configuration_ee_registry_index_async_delay) }}"
timeout: "{{ __ee_registry_item.timeout | default(omit) }}"
name: "{{ __ee_registry_index_item.name }}"
wait: "{{ __ee_registry_index_item.wait | default(omit) }}"
interval: "{{ __ee_registry_index_item.interval | default(ah_configuration_ee_registry_index_async_delay) }}"
timeout: "{{ __ee_registry_index_item.timeout | default(omit) }}"
ah_host: "{{ aap_hostname | default(omit) }}"
ah_username: "{{ aap_username | default(omit) }}"
ah_password: "{{ aap_password | default(omit) }}"
Expand All @@ -15,17 +15,17 @@
request_timeout: "{{ aap_request_timeout | default(omit) }}"
loop: "{{ ah_ee_registries }}"
loop_control:
loop_var: __ee_registry_item
label: "{{ __operation.verb }} the label {{ __ah_configuration_ee_registry_index__item.name }} to Controller"
loop_var: __ee_registry_index_item
label: "{{ __operation.verb }} the EE registry index {{ __ah_configuration_ee_registry_index__item.name }} in Hub"
pause: "{{ ah_configuration_ee_registry_index__loop_delay }}"
when: __ee_registry_item.index | default(false)
when: __ee_registry_index_item.index | default(false)
no_log: "{{ ah_configuration_ee_registry_secure_logging }}"
async: "{{ ah_configuration_ee_registry_index_async_timeout }}"
poll: 0
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')] }}"
__operation: "{{ operation_translate[__ee_registry_index_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 Down
16 changes: 8 additions & 8 deletions roles/hub_ee_registry_sync/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
# Create AH EE registry
- name: Sync Automation Hub EE Registry
ansible.hub.ah_ee_registry_sync:
name: "{{ __ee_registry_item.name }}"
wait: "{{ __ee_registry_item.wait | default(omit) }}"
interval: "{{ __ee_registry_item.interval | default(ah_configuration_ee_registry_sync_async_delay) }}"
timeout: "{{ __ee_registry_item.timeout | default(omit) }}"
name: "{{ __ee_registry_sync_item.name }}"
wait: "{{ __ee_registry_sync_item.wait | default(omit) }}"
interval: "{{ __ee_registry_sync_item.interval | default(ah_configuration_ee_registry_sync_async_delay) }}"
timeout: "{{ __ee_registry_sync_item.timeout | default(omit) }}"
ah_host: "{{ aap_hostname | default(omit) }}"
ah_username: "{{ aap_username | default(omit) }}"
ah_password: "{{ aap_password | default(omit) }}"
Expand All @@ -15,10 +15,10 @@
request_timeout: "{{ aap_request_timeout | default(omit) }}"
loop: "{{ ah_ee_registries }}"
loop_control:
loop_var: "__ee_registry_item"
label: "{{ __operation.verb }} the label {{ __ee_registry_item.name }} to Controller"
loop_var: __ee_registry_sync_item
label: "{{ __operation.verb }} the EE registry sync {{ __ee_registry_sync_item.name }} in Hub"
pause: "{{ ah_configuration_registry_sync__loop_delay }}"
when: __ee_registry_item.sync | default(false)
when: __ee_registry_sync_item.sync | default(false)
no_log: "{{ ah_configuration_ee_registry_secure_logging }}"
async: "{{ ah_configuration_ee_registry_sync_async_timeout }}"
poll: 0
Expand All @@ -38,7 +38,7 @@
loop: "{{ __ee_registry_syncs_job_async.results }}"
loop_control:
loop_var: __ee_registry_syncs_job_async_result_item
label: "{{ __operation.verb }} Label {{ __ee_registry_syncs_job_async_result_item.__ee_registry_item.name }} | Wait for finish the Label {{ __operation.action }}"
label: "{{ __operation.verb }} Label {{ __ee_registry_syncs_job_async_result_item.__ee_registry_sync_item.name }} | Wait for finish the Label {{ __operation.action }}"
when: __ee_registry_syncs_job_async_result_item.ansible_job_id is defined
no_log: "{{ ah_configuration_ee_registry_secure_logging }}"
vars:
Expand Down
2 changes: 1 addition & 1 deletion roles/hub_ee_repository/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
loop: "{{ ah_ee_repositories }}"
loop_control:
loop_var: __ee_repository_item
label: "{{ __operation.verb }} the label {{ __ah_configuration_ee_registry_sync__item.name }} to Controller"
label: "{{ __operation.verb }} the EE repository {{ __ah_configuration_ee_registry_sync__item.name }} in Hub"
pause: "{{ ah_configuration_ee_registry_sync__loop_delay }}"
no_log: "{{ ah_configuration_ee_repository_secure_logging }}"
async: "{{ ah_configuration_ee_repository_async_timeout }}"
Expand Down
16 changes: 8 additions & 8 deletions roles/hub_ee_repository_sync/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
# Create AH EE repository
- name: Sync Automation Hub EE Repository
ansible.hub.ah_ee_repository_sync:
name: "{{ __ee_repository_item.name }}"
wait: "{{ __ee_repository_item.wait | default(omit) }}"
interval: "{{ __ee_repository_item.interval | default(ah_configuration_ee_repository_sync_async_delay) }}"
timeout: "{{ __ee_repository_item.timeout | default(omit) }}"
name: "{{ __ee_repository_sync_item.name }}"
wait: "{{ __ee_repository_sync_item.wait | default(omit) }}"
interval: "{{ __ee_repository_sync_item.interval | default(ah_configuration_ee_repository_sync_async_delay) }}"
timeout: "{{ __ee_repository_sync_item.timeout | default(omit) }}"
ah_host: "{{ aap_hostname | default(omit) }}"
ah_username: "{{ aap_username | default(omit) }}"
ah_password: "{{ aap_password | default(omit) }}"
Expand All @@ -15,17 +15,17 @@
request_timeout: "{{ aap_request_timeout | default(omit) }}"
loop: "{{ ah_ee_repositories }}"
loop_control:
loop_var: __ee_repository_item
label: "{{ __operation.verb }} the label {{ __ah_configuration_ee_repository_sync__item.name }} to Controller"
loop_var: __ee_repository_sync_item
label: "{{ __operation.verb }} the EE repository sync {{ __ah_configuration_ee_repository_sync__item.name }} in Hub"
pause: "{{ ah_configuration_ee_repository_sync__loop_delay }}"
when: __ee_repository_item.sync | default(false)
when: __ee_repository_sync_item.sync | default(false)
no_log: "{{ ah_configuration_ee_repository_secure_logging }}"
async: "{{ ah_configuration_ee_repository_sync_async_timeout }}"
poll: 0
register: __ee_repository_syncs_job_async
changed_when: not __ee_repository_syncs_job_async.changed
vars:
__operation: "{{ operation_translate[__ee_repository_item.state | default(platform_state) | default('present')] }}"
__operation: "{{ operation_translate[__ee_repository_sync_item.state | default(platform_state) | default('present')] }}"
ansible_async_dir: '{{ aap_configuration_async_dir }}'

- name: "EE Repository Sync | Wait for finish the ee_repository_sync to finish"
Expand Down
2 changes: 1 addition & 1 deletion roles/hub_group/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
loop: "{{ aap_teams }}"
loop_control:
loop_var: __group_item
label: "{{ __operation.verb }} the label {{ __ah_configuration_group__item.name }} to Controller"
label: "{{ __operation.verb }} the group {{ __ah_configuration_group__item.name }} in Hub"
pause: "{{ ah_configuration_group__loop_delay }}"
no_log: "{{ ah_configuration_group_secure_logging }}"
async: "{{ ah_configuration_group_async_timeout }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/hub_group_roles/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
loop: "{{ ah_group_roles }}"
loop_control:
loop_var: __group_roles_item
label: "{{ __operation.verb }} the label {{ __ah_configuration_group_roles__item.name }} to Controller"
label: "{{ __operation.verb }} the group role {{ __ah_configuration_group_roles__item.name }} in Hub"
pause: "{{ ah_configuration_group_roles__loop_delay }}"
no_log: "{{ ah_configuration_group_roles_secure_logging }}"
async: "{{ ah_configuration_group_roles_async_timeout }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/hub_namespace/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
loop: "{{ ah_namespaces }}"
loop_control:
loop_var: __namespace_item
label: "{{ __operation.verb }} the label {{ __ah_configuration_namespace__item.name }} to Controller"
label: "{{ __operation.verb }} the namespace {{ __ah_configuration_namespace__item.name }} in Hub"
pause: "{{ ah_configuration_namespace__loop_delay }}"
no_log: "{{ ah_configuration_namespace_secure_logging }}"
async: "{{ ah_configuration_namespace_async_timeout }}"
Expand Down
10 changes: 4 additions & 6 deletions roles/hub_publish/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
ssh_opts: "{{ __ah_collection_item.ssh_opts | default(omit) }}"
loop: "{{ ah_collections }}"
loop_control:
loop_var: "__ah_collection_item"
label: "{{ __operation.verb }} the label {{ __ah_configuration_publish__item.name }} to Controller"
loop_var: __ah_collection_item
pause: "{{ ah_configuration_publish__loop_delay }}"
no_log: "{{ ah_configuration_publish_secure_logging }}"
when:
Expand All @@ -24,8 +23,7 @@
mode: "0755"
loop: "{{ ah_collections }}"
loop_control:
loop_var: "__ah_collection_item"
label: "{{ __operation.verb }} Label {{ __ah_collection_item.__ah_collection_item.name }} | Wait for finish the Label {{ __operation.action }}"
loop_var: __ah_collection_item
no_log: "{{ ah_configuration_publish_secure_logging }}"
when:
- ah_collection_list is not defined
Expand All @@ -39,7 +37,7 @@
register: ah_build_results
loop: "{{ ah_collections }}"
loop_control:
loop_var: "__ah_collection_item"
loop_var: __ah_collection_item
no_log: "{{ ah_configuration_publish_secure_logging }}"
when: ah_collection_list is not defined

Expand All @@ -50,7 +48,7 @@
no_log: "{{ ah_configuration_publish_secure_logging }}"
loop: "{{ ah_build_results.results }}"
loop_control:
loop_var: "__ah_build_result_item"
loop_var: __ah_build_result_item
when: ah_collection_list is not defined

# __ah_build_result_item.results.path will be the output_path in ansible<2.10 but the actual built path in ansible>=2.10
Expand Down
2 changes: 1 addition & 1 deletion roles/hub_role/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
loop: "{{ ah_roles }}"
loop_control:
loop_var: __role_item
label: "{{ __operation.verb }} the label {{ __ah_configuration_role__item.name }} to Controller"
label: "{{ __operation.verb }} the role {{ __ah_configuration_role__item.name }} to Hub"
pause: "{{ ah_configuration_role__loop_delay }}"
no_log: "{{ ah_configuration_role_secure_logging }}"
async: "{{ ah_configuration_role_async_timeout }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/hub_user/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
loop: "{{ aap_user_accounts }}"
loop_control:
loop_var: __user_item
label: "{{ __operation.verb }} the label {{ __user_item.name }} to Controller"
label: "{{ __operation.verb }} the user {{ __user_item.name }} to Hub"
pause: "{{ ah_configuration_user_accounts__loop_delay }}"
no_log: "{{ ah_configuration_user_secure_logging }}"
async: "{{ ah_configuration_user_async_timeout }}"
Expand Down
Loading