2016-08-08 11:16:15 +08:00
|
|
|
---
|
2016-08-17 05:57:49 +08:00
|
|
|
- name: create the realm
|
2019-05-14 20:51:32 +08:00
|
|
|
command: "{{ container_exec_cmd }} radosgw-admin realm create --rgw-realm={{ rgw_realm }} --default"
|
2017-09-19 06:33:23 +08:00
|
|
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
2016-08-08 11:16:15 +08:00
|
|
|
run_once: true
|
2019-04-01 23:46:15 +08:00
|
|
|
when: "'No such file or directory' in realmcheck.stderr"
|
2016-08-08 11:16:15 +08:00
|
|
|
|
2017-09-15 06:48:53 +08:00
|
|
|
- name: create the zonegroup
|
2019-05-14 20:51:32 +08:00
|
|
|
command: "{{ container_exec_cmd }} radosgw-admin zonegroup create --rgw-zonegroup={{ rgw_zonegroup }} --endpoints={{ rgw_multisite_proto }}://{{ rgw_multisite_endpoint_addr }}:{{ radosgw_frontend_port }} --master --default"
|
2017-09-19 06:33:23 +08:00
|
|
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
2016-08-08 11:16:15 +08:00
|
|
|
run_once: true
|
2019-04-01 23:46:15 +08:00
|
|
|
when: "'No such file or directory' in zonegroupcheck.stderr"
|
2016-08-08 11:16:15 +08:00
|
|
|
|
2016-08-17 05:57:49 +08:00
|
|
|
- name: create the zone
|
2019-05-14 20:51:32 +08:00
|
|
|
command: "{{ container_exec_cmd }} radosgw-admin zone create --rgw-zonegroup={{ rgw_zonegroup }} --rgw-zone={{ rgw_zone }} --endpoints={{ rgw_multisite_proto }}://{{ rgw_multisite_endpoint_addr }}:{{ radosgw_frontend_port }} --access-key={{ system_access_key }} --secret={{ system_secret_key }} --default --master"
|
2017-09-19 06:33:23 +08:00
|
|
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
2016-08-08 11:16:15 +08:00
|
|
|
run_once: true
|
2019-04-01 23:46:15 +08:00
|
|
|
when: "'No such file or directory' in zonecheck.stderr"
|
2016-08-08 11:16:15 +08:00
|
|
|
|
2016-08-17 05:57:49 +08:00
|
|
|
- name: create the zone user
|
2019-05-14 20:51:32 +08:00
|
|
|
command: "{{ container_exec_cmd }} radosgw-admin user create --uid={{ rgw_zone_user }} --display-name=\"Zone User\" --access-key={{ system_access_key }} --secret={{ system_secret_key }} --system"
|
2017-09-19 06:33:23 +08:00
|
|
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
2016-08-08 11:16:15 +08:00
|
|
|
run_once: true
|
2019-04-01 23:46:15 +08:00
|
|
|
when: "'could not fetch user info: no user info saved' in usercheck.stderr"
|
|
|
|
notify: update period
|
2019-02-01 04:43:21 +08:00
|
|
|
|
|
|
|
- name: add other endpoints to the zone
|
2019-05-14 20:51:32 +08:00
|
|
|
command: "{{ container_exec_cmd }} radosgw-admin zone modify --rgw-zone={{ rgw_zone }} --endpoints {{ rgw_multisite_endpoints_list }}"
|
2019-02-01 04:43:21 +08:00
|
|
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
|
|
|
run_once: true
|
2019-04-01 23:46:15 +08:00
|
|
|
when: rgw_multisite_endpoints_list is defined
|
|
|
|
notify: update period
|