This commit fixes the system_secret_key variable not substitued by the
right value and always using the 'system_secret_key' string instead.
$ egrep 'system_(access|secret)_key' group_vars/all.yml
system_access_key: foofoofoofoofoofoofo
system_secret_key: barbarbarbarbarbarbarbarbarbarbarbarbarb
$ ansible-playbook -vv -i hosts site.yml.sample -e rgw_multisite=true
(...)
- hostname: storage0
endpoint: http://192.168.100.42:8080
instance_name: rgw0
radosgw_address: 192.168.50.3
radosgw_frontend_port: 8085
rgw_realm: canada
rgw_zone: montreal
rgw_zone_user: justin.trudeau
rgw_zone_user_display_name: Justin Trudeau
rgw_zonegroup: quebec
system_access_key: foofoofoofoofoofoofo
system_secret_key: system_secret_key
Fixes https://github.com/ceph/ceph-ansible/issues/5150
Signed-off-by: petruha <5363545+p37ruh4@users.noreply.github.com>
(cherry picked from commit
73b3fadb0ed4cd9eba62669c189fa76178431f07)
- name: set_fact rgw_instances with rgw multisite
set_fact:
- rgw_instances: "{{ rgw_instances|default([]) | union([{'instance_name': 'rgw' + item | string, 'radosgw_address': _radosgw_address, 'radosgw_frontend_port': radosgw_frontend_port | int, 'rgw_realm': rgw_realm | string, 'rgw_zonegroup': rgw_zonegroup | string, 'rgw_zone': rgw_zone | string, 'system_access_key': system_access_key, 'system_secret_key': 'system_secret_key', 'rgw_zone_user': rgw_zone_user, 'rgw_zone_user_display_name': rgw_zone_user_display_name, 'endpoint': (rgw_pull_proto + '://' + rgw_pullhost + ':' + rgw_pull_port | string) if not rgw_zonemaster | bool and rgw_zonesecondary | bool else omit }]) }}"
+ rgw_instances: "{{ rgw_instances|default([]) | union([{'instance_name': 'rgw' + item | string, 'radosgw_address': _radosgw_address, 'radosgw_frontend_port': radosgw_frontend_port | int, 'rgw_realm': rgw_realm | string, 'rgw_zonegroup': rgw_zonegroup | string, 'rgw_zone': rgw_zone | string, 'system_access_key': system_access_key, 'system_secret_key': system_secret_key, 'rgw_zone_user': rgw_zone_user, 'rgw_zone_user_display_name': rgw_zone_user_display_name, 'endpoint': (rgw_pull_proto + '://' + rgw_pullhost + ':' + rgw_pull_port | string) if not rgw_zonemaster | bool and rgw_zonesecondary | bool else omit }]) }}"
with_sequence: start=0 end={{ radosgw_num_instances|int - 1 }}
when:
- inventory_hostname in groups.get(rgw_group_name, [])