]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
update: ensure /var/lib/ceph/bootstrap-rbd-mirror is present
authorGuillaume Abrioux <gabrioux@redhat.com>
Wed, 20 Mar 2019 10:38:28 +0000 (11:38 +0100)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Mon, 25 Mar 2019 20:02:56 +0000 (16:02 -0400)
This directory is created by ceph-config node by node.
In the upgrade context we need it to be created on ALL monitors as soon
as the first iteration because of the task right after which creates and sends
the keyrings on all monitors.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
infrastructure-playbooks/rolling_update.yml

index 7ee831ce0ddeb2ad4b6e86c101404d371b1ce197..bd128de9c4b78678602d23feb9c2b61b34a8a1ed 100644 (file)
       when:
         - containerized_deployment
 
+    - name: ensure /var/lib/ceph/bootstrap-rbd-mirror is present
+      file:
+        path: /var/lib/ceph/bootstrap-rbd-mirror
+        owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
+        group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
+        mode: '755'
+        state: directory
+      when:
+        - cephx
+      delegate_to: "{{ item }}"
+      with_items: "{{ groups[mon_group_name] }}"
+      when:
+        - inventory_hostname == groups[mon_group_name][0]
+
     - name: create potentially missing keys (rbd and rbd-mirror)
       ceph_key:
         name: "client.{{ item.0 }}"