From 0352dd7f8f8e7fc83d587d9f993d28301a088a24 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Fri, 1 Sep 2023 15:42:20 -0400 Subject: [PATCH] Create mgr after starting monitors --- roles/pvc/tasks/ceph/main.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/roles/pvc/tasks/ceph/main.yml b/roles/pvc/tasks/ceph/main.yml index 96ca1ec..56b87db 100644 --- a/roles/pvc/tasks/ceph/main.yml +++ b/roles/pvc/tasks/ceph/main.yml @@ -71,12 +71,6 @@ become_user: ceph when: newhost is defined and newhost -- name: create mgr auth keyring - command: ceph auth get-or-create mgr.{{ ansible_hostname }} mon 'allow profile mgr' osd 'allow *' mds 'allow *' --out-file /var/lib/ceph/mgr/ceph-{{ ansible_hostname }}/keyring - become_user: ceph - args: - creates: /var/lib/ceph/mgr/ceph-{{ ansible_hostname }}/keyring - - name: touch monitor and manager done files file: dest: /var/lib/ceph/{{ item }}/ceph-{{ ansible_hostname }}/done @@ -87,6 +81,20 @@ - mgr when: newhost is defined and newhost +- name: start monitor daemon + service: + name: "{{ item }}" + state: started + with_items: + - ceph-mon@{{ ansible_hostname }} + when: newhost is defined and newhost + +- name: create mgr auth keyring + command: ceph auth get-or-create mgr.{{ ansible_hostname }} mon 'allow profile mgr' osd 'allow *' mds 'allow *' --out-file /var/lib/ceph/mgr/ceph-{{ ansible_hostname }}/keyring + become_user: ceph + args: + creates: /var/lib/ceph/mgr/ceph-{{ ansible_hostname }}/keyring + - name: install OSD bootstrap keyring file: dest: /var/lib/ceph/bootstrap-osd/ceph.keyring