]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
defaults: check only 1 time if there is a running cluster
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 9 Apr 2018 16:07:31 +0000 (18:07 +0200)
committerSébastien Han <seb@redhat.com>
Mon, 16 Apr 2018 09:23:00 +0000 (11:23 +0200)
There is no need to check for a running cluster n*nodes time in
`ceph-defaults` so let's add a `run_once: true` to save some resources
and time.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
roles/ceph-defaults/tasks/facts.yml

index e043c0ea306ad5b6d2d6df1c928c2bc2d2d69b0e..5c6ec55a820117921bb8089c6e3b07149848fc32 100644 (file)
@@ -37,6 +37,7 @@
   failed_when: false
   check_mode: no
   register: ceph_current_fsid
+  run_once: true
   delegate_to: "{{ groups[mon_group_name][0] }}"
   when:
     - not rolling_update
@@ -74,7 +75,7 @@
   set_fact:
     fsid: "{{ ceph_current_fsid.stdout }}"
   when:
-    - ceph_current_fsid.rc == 0
+    - ceph_current_fsid.get('rc', 1) == 0
 
 # Set ceph_release to ceph_stable by default
 - name: set_fact ceph_release ceph_stable_release
     creates: "{{ fetch_directory }}/ceph_cluster_uuid.conf"
   become: false
   when:
-    - ceph_current_fsid.rc == 0
+    - ceph_current_fsid.get('rc', 1) == 0
 
 - name: read cluster fsid if it already exists
   local_action: