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

30 lines
828 B
YAML
Raw Normal View History

2016-08-11 05:05:27 +08:00
---
2016-08-17 05:57:49 +08:00
- name: delete the zone user
2016-08-11 05:05:27 +08:00
command: radosgw-admin user rm --uid=zone.user
run_once: true
failed_when: false
2016-08-17 05:57:49 +08:00
- name: delete the zone
2016-08-11 05:05:27 +08:00
command: radosgw-admin zone delete --rgw-zonegroup={{ rgw_zonegroup }} --rgw-zone={{ rgw_zone }}
run_once: true
failed_when: false
- name: delete the zonegroup
2016-08-11 05:05:27 +08:00
command: radosgw-admin zonegroup delete --rgw-zonegroup={{ rgw_zonegroup }}
run_once: true
failed_when: false
2016-08-17 05:57:49 +08:00
- name: delete the realm
2016-08-11 05:05:27 +08:00
command: radosgw-admin realm delete --rgw-realm={{ rgw_realm }}
run_once: true
failed_when: false
2016-08-17 05:57:49 +08:00
- name: delete zone from rgw stanza in ceph.conf
2016-08-17 02:57:01 +08:00
lineinfile:
dest: "/etc/ceph/{{ cluster }}.conf"
2016-08-17 02:57:01 +08:00
regexp: "rgw_zone = {{ rgw_zonegroup }}-{{ rgw_zone }}"
state: absent
when: "rgw_zone is defined and rgw_zonegroup is defined"
notify:
- restart rgw