ceph-ansible/roles/ceph-rgw/tasks/multisite/master.yml

31 lines
1.3 KiB
YAML
Raw Normal View History

2016-08-08 11:16:15 +08:00
---
2016-08-17 05:57:49 +08:00
- name: create the realm
2016-08-08 11:16:15 +08:00
command: radosgw-admin realm create --rgw-realm={{ rgw_realm }} --default
delegate_to: "{{ groups[mon_group_name][0] }}"
2016-08-08 11:16:15 +08:00
run_once: true
when:
- "'No such file or directory' in realmcheck.stderr"
2016-08-08 11:16:15 +08:00
- name: create the zonegroup
command: radosgw-admin zonegroup create --rgw-zonegroup={{ rgw_zonegroup }} --endpoints=http://{{ rgw_multisite_endpoint_addr }}:{{ radosgw_frontend_port }} --master --default
delegate_to: "{{ groups[mon_group_name][0] }}"
2016-08-08 11:16:15 +08:00
run_once: true
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
command: radosgw-admin zone create --rgw-zonegroup={{ rgw_zonegroup }} --rgw-zone={{ rgw_zone }} --endpoints=http://{{ rgw_multisite_endpoint_addr }}:{{ radosgw_frontend_port }} --access-key={{ system_access_key }} --secret={{ system_secret_key }} --default --master
delegate_to: "{{ groups[mon_group_name][0] }}"
2016-08-08 11:16:15 +08:00
run_once: true
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
command: radosgw-admin user create --uid={{ rgw_zone_user }} --display-name="Zone User" --access-key={{ system_access_key }} --secret={{ system_secret_key }} --system
delegate_to: "{{ groups[mon_group_name][0] }}"
2016-08-08 11:16:15 +08:00
run_once: true
when:
- "'could not fetch user info: no user info saved' in usercheck.stderr"
2016-08-08 11:16:15 +08:00
notify:
- update period