2020-03-09 18:05:01 +08:00
|
|
|
---
|
|
|
|
- name: create list zone_users
|
|
|
|
set_fact:
|
|
|
|
zone_users: "{{ zone_users | default([]) | union([{ 'realm': item.rgw_realm, 'zonegroup': item.rgw_zonegroup, 'zone': item.rgw_zone, 'system_access_key': item.system_access_key, 'system_secret_key': item.system_secret_key, 'user': item.rgw_zone_user, 'display_name': item.rgw_zone_user_display_name }]) }}"
|
|
|
|
loop: "{{ rgw_instances_all }}"
|
|
|
|
run_once: true
|
|
|
|
when:
|
2021-01-15 00:52:39 +08:00
|
|
|
- item.rgw_zonemaster | default(hostvars[item.host]['rgw_zonemaster']) | bool
|
|
|
|
- item.rgw_zonegroupmaster | default(hostvars[item.host]['rgw_zonegroupmaster']) | bool
|
2020-03-09 18:05:01 +08:00
|
|
|
|
2019-10-05 03:31:25 +08:00
|
|
|
- name: create the zone user(s)
|
2020-05-23 03:47:45 +08:00
|
|
|
radosgw_user:
|
|
|
|
name: "{{ item.user }}"
|
|
|
|
cluster: "{{ cluster }}"
|
|
|
|
display_name: "{{ item.display_name }}"
|
|
|
|
access_key: "{{ item.system_access_key }}"
|
|
|
|
secret_key: "{{ item.system_secret_key }}"
|
|
|
|
realm: "{{ item.realm }}"
|
|
|
|
zonegroup: "{{ item.zonegroup }}"
|
|
|
|
zone: "{{ item.zone }}"
|
|
|
|
system: true
|
2019-10-05 03:31:25 +08:00
|
|
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
|
|
|
run_once: true
|
2020-05-23 03:47:45 +08:00
|
|
|
loop: "{{ zone_users }}"
|
2021-01-15 00:52:39 +08:00
|
|
|
when: zone_users is defined
|
2020-05-23 03:47:45 +08:00
|
|
|
environment:
|
|
|
|
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
|
|
|
|
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|