Skip to content

Commit

Permalink
Filter AWS_S3 service from host template validation check (#161)
Browse files Browse the repository at this point in the history
Signed-off-by: Webster Mudge <[email protected]>
  • Loading branch information
wmudge authored Nov 14, 2023
1 parent 590e0df commit 03de94d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
8 changes: 8 additions & 0 deletions roles/cloudera_manager/external_account/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@

---

- name: Wait for Cloudera Manager Port to be up
delegate_to: "{{ groups.cloudera_manager[0] if 'cloudera_manager' in groups else 'localhost' }}"
ansible.builtin.wait_for:
port: "{{ cloudera_manager_port }}"
host: localhost
connect_timeout: 180
sleep: 5

- name: Create Cloudera Manager external accounts
cloudera.cluster.cm_api:
endpoint: /externalAccounts/create
Expand Down
2 changes: 1 addition & 1 deletion roles/verify/parcels_and_roles/tasks/check_cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
invalid_services: >-
{{
cluster.services
| default({})
| reject('eq', 'AWS_S3')
| difference(host_template_services)
}}
- name: Ensure that all the services are included in host templates
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@
- set_fact:
invalid_roles: >-
{{ config.roles
| flatten
| map('regex_replace','/.+','')
| difference(['SERVICEWIDE'])
| difference(role_mappings[config.service] | list)
| flatten
| map('regex_replace', '/.+', '')
| difference(['SERVICEWIDE'])
| difference(role_service_mapping)
| list
}}
vars:
role_service_mapping: "{{ role_mappings[config.service] | default([]) }}"
- name: Ensure all configured roles are valid
assert:
that: "{{ invalid_roles | length == 0 }}"
Expand Down

0 comments on commit 03de94d

Please sign in to comment.