dashboard: fix rgw user creation

When deploying dashboard in a cluster with rgw multisite deployed.
Due to the last rgw multisite refactor, we now expect the variable
`rgw_zonemaster` to be defined in the dict `rgw_instances`.
The idea here is to create that user on the cluster as soon as we have 1
`rgw_zonemaster` set to `true` in `rgw_instances`.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1964995

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
pull/6568/head
Guillaume Abrioux 2021-06-03 10:11:30 +02:00
parent d2bd0961d4
commit f3b992328a
1 changed files with 1 additions and 1 deletions

View File

@ -296,7 +296,7 @@
delegate_to: "{{ groups[mon_group_name][0] }}" delegate_to: "{{ groups[mon_group_name][0] }}"
run_once: true run_once: true
when: when:
- not rgw_multisite | bool or rgw_zonemaster | bool - not rgw_multisite | bool or (true in (rgw_instances | selectattr('rgw_zonemaster', 'defined') | map(attribute='rgw_zonemaster') | list) if rgw_instances is defined else rgw_zonemaster | default(false))
- get_rgw_user.rc == 22 - get_rgw_user.rc == 22
- name: get the rgw access and secret keys - name: get the rgw access and secret keys