]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-facts: generate fsid on mon node
authorDimitri Savineau <dsavinea@redhat.com>
Fri, 31 May 2019 17:26:30 +0000 (13:26 -0400)
committerGuillaume Abrioux <gabrioux@redhat.com>
Mon, 3 Jun 2019 08:11:32 +0000 (10:11 +0200)
The fsid generation is done via a python command. When the ansible
controller node only have python3 available (like RHEL 8) then the
python command isn't necessarily present causing the fsid generation
to fail.
We already do some resource creation (like ceph keyring secret) with
the python command too but from the mon node so we should do the same
for fsid.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1714631

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
roles/ceph-facts/tasks/facts.yml

index f21aad86473f02922aae92b9e11d308460eff28c..9ef94eb8f50f6aaa93770eea7cabcf9062a07eb7 100644 (file)
   - name: generate cluster fsid
     shell: python -c 'import uuid; print(str(uuid.uuid4()))'
     register: cluster_uuid
-    delegate_to: localhost
-    become: false
+    delegate_to: "{{ groups[mon_group_name][0] }}"
     run_once: true
 
   - name: set_fact fsid