mirror of https://github.com/ceph/ceph-ansible.git
cephadm-adopt: use radosgw modules for idempotency
When rerunning the cephadm-adopt.yml playbook the radosgw realm, zonegroup and zone tasks will fail because the task isn't idempotent. Using the radosgw ansible modules solves that problem. Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>pull/6229/head
parent
523966d45f
commit
2734a12d44
|
@ -605,29 +605,39 @@
|
||||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
block:
|
block:
|
||||||
- name: create a default realm
|
- name: create a default realm
|
||||||
command: "{{ cephadm_cmd }} shell --fsid {{ fsid }} -- radosgw-admin --cluster {{ cluster }} realm create --rgw-realm=default --default"
|
radosgw_realm:
|
||||||
run_once: true
|
cluster: "{{ cluster }}"
|
||||||
changed_when: false
|
name: default
|
||||||
|
default: true
|
||||||
environment:
|
environment:
|
||||||
CEPHADM_IMAGE: '{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}'
|
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
|
||||||
|
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
||||||
|
|
||||||
- name: modify the default zonegroup
|
- name: modify the default zonegroup
|
||||||
command: "{{ cephadm_cmd }} shell --fsid {{ fsid }} -- radosgw-admin --cluster {{ cluster }} zonegroup modify --rgw-realm=default --rgw-zonegroup=default"
|
radosgw_zonegroup:
|
||||||
run_once: true
|
cluster: "{{ cluster }}"
|
||||||
changed_when: false
|
name: default
|
||||||
|
realm: default
|
||||||
|
master: true
|
||||||
|
default: true
|
||||||
environment:
|
environment:
|
||||||
CEPHADM_IMAGE: '{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}'
|
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
|
||||||
|
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
||||||
|
|
||||||
- name: modify the default zone
|
- name: modify the default zone
|
||||||
command: "{{ cephadm_cmd }} shell --fsid {{ fsid }} -- radosgw-admin --cluster {{ cluster }} zone modify --rgw-realm=default --rgw-zonegroup=default --rgw-zone=default"
|
radosgw_zone:
|
||||||
run_once: true
|
cluster: "{{ cluster }}"
|
||||||
changed_when: false
|
name: default
|
||||||
|
realm: default
|
||||||
|
zonegroup: default
|
||||||
|
master: true
|
||||||
|
default: true
|
||||||
environment:
|
environment:
|
||||||
CEPHADM_IMAGE: '{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}'
|
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
|
||||||
|
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
||||||
|
|
||||||
- name: commit the period
|
- name: commit the period
|
||||||
command: "{{ cephadm_cmd }} shell --fsid {{ fsid }} -- radosgw-admin --cluster {{ cluster }} period update --commit"
|
command: "{{ cephadm_cmd }} shell --fsid {{ fsid }} -- radosgw-admin --cluster {{ cluster }} period update --commit"
|
||||||
run_once: true
|
|
||||||
changed_when: false
|
changed_when: false
|
||||||
environment:
|
environment:
|
||||||
CEPHADM_IMAGE: '{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}'
|
CEPHADM_IMAGE: '{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}'
|
||||||
|
|
Loading…
Reference in New Issue