]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
cephadm-adopt: ensure /etc/ceph is present on monitoring node
authorGuillaume Abrioux <gabrioux@redhat.com>
Tue, 7 Dec 2021 20:11:50 +0000 (21:11 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Tue, 7 Dec 2021 21:06:46 +0000 (22:06 +0100)
When deploying the monitoring stack on a dedicated node, the directory
`/etc/ceph` has never been created. Therefore, the play for adopting the
monitoring stack fails because it can't write the minimal config file.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2029697
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
infrastructure-playbooks/cephadm-adopt.yml

index 60707daf0ba46cb5d5d573306ceaa60c3dd53df3..57a76465e86be4f102cbb33a16cf5ccda99cdc74 100644 (file)
         path: "/etc/ceph/{{ cluster }}.conf"
       register: ceph_config
 
+    - name: ensure /etc/ceph is present
+      file:
+        path: /etc/ceph
+        state: directory
+        owner: "{{ ceph_uid | int if containerized_deployment | bool else 'ceph' }}"
+        group: "{{ ceph_uid | int if containerized_deployment | bool else 'ceph' }}"
+        mode: "{{ ceph_directories_mode }}"
+
     - name: write a ceph.conf with minimal config
       copy:
         dest: "/etc/ceph/{{ cluster }}.conf"