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

42 lines
1.5 KiB
YAML
Raw Normal View History

2016-08-08 11:16:15 +08:00
---
2016-08-11 05:05:27 +08:00
- name: Fetch the realm (Secondary)
command: radosgw-admin realm pull --url=http://{{ rgw_pullhost }}:8080 --access-key={{ system_access_key }} --secret={{ system_secret_key }}
run_once: true
2016-08-11 06:03:09 +08:00
when: ("No such file or directory" in realmcheck.stderr)
2016-08-11 05:05:27 +08:00
notify:
- update period
- name: Fetch the realm (Secondary)
command: radosgw-admin period pull --url=http://{{ rgw_pullhost }}:8080 --access-key={{ system_access_key }} --secret={{ system_secret_key }}
run_once: true
2016-08-11 06:03:09 +08:00
when: ("No such file or directory" in realmcheck.stderr)
2016-08-08 11:16:15 +08:00
notify:
- update period
2016-08-11 06:03:09 +08:00
- name: Set default realm
command: radosgw-admin realm default --rgw-realm={{ rgw_realm }}
2016-08-08 11:16:15 +08:00
run_once: true
notify:
2016-08-11 06:03:09 +08:00
- update period # Might not need to update period here
2016-08-08 11:16:15 +08:00
2016-08-11 06:03:09 +08:00
- name: Set default zonegroup
command: radosgw-admin zonegroup default --rgw-zonegroup={{ rgw_zonegroup }}
2016-08-08 11:16:15 +08:00
run_once: true
notify:
2016-08-11 06:03:09 +08:00
- update period # Might not need to update period here
2016-08-08 11:16:15 +08:00
2016-08-11 06:03:09 +08:00
- name: Create the zone
command: radosgw-admin zone create --rgw-zonegroup={{ rgw_zonegroup }} --rgw-zone={{ rgw_zone }} --endpoints=http://{{ ansible_hostname }}:8080 --access-key={{ system_access_key }} --secret={{ system_secret_key }} --default
2016-08-08 11:16:15 +08:00
run_once: true
2016-08-11 06:03:09 +08:00
when: ("No such file or directory" in zonecheck.stderr)
2016-08-08 11:16:15 +08:00
notify:
- update period
2016-08-11 05:05:27 +08:00
#- name: Add zone to RGW stanza in ceph.conf
# lineinfile:
# dest: /etc/ceph/ceph.conf
# regexp: "{{ ansible_host }}"
# insertafter: "^[client.rgw.{{ ansible_host }}]"
# line: "rgw_zone={{ rgw_zonegroup }}-{{ rgw_zone }}"
# state: present