cephadm-adopt: ensure /etc/ceph is present on monitoring node

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>
(cherry picked from commit 7ece59b41d)
(cherry picked from commit 8a32576d20)
rhcs-5.0 v6.0.20.2
Guillaume Abrioux 2021-12-07 21:11:50 +01:00
parent 717b305a7a
commit 6179262f98
1 changed files with 8 additions and 0 deletions

View File

@ -1150,6 +1150,14 @@
path: "/etc/ceph/{{ cluster }}.conf" path: "/etc/ceph/{{ cluster }}.conf"
register: ceph_config 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 - name: write a ceph.conf with minimal config
copy: copy:
dest: "/etc/ceph/{{ cluster }}.conf" dest: "/etc/ceph/{{ cluster }}.conf"