From: Guillaume Abrioux Date: Mon, 9 Apr 2018 16:07:31 +0000 (+0200) Subject: defaults: check only 1 time if there is a running cluster X-Git-Tag: v3.0.32~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4d5169fbfaff757d04e0d24b97b168cedf1e32fc;p=ceph-ansible.git defaults: check only 1 time if there is a running cluster 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 (cherry picked from commit 899b0eb4514a9b1e6929dd5abf415195085c4e1d) Signed-off-by: Sébastien Han --- diff --git a/roles/ceph-defaults/tasks/facts.yml b/roles/ceph-defaults/tasks/facts.yml index 0eb8713b4..2cb108430 100644 --- a/roles/ceph-defaults/tasks/facts.yml +++ b/roles/ceph-defaults/tasks/facts.yml @@ -37,6 +37,7 @@ failed_when: false always_run: yes register: ceph_current_fsid + run_once: true delegate_to: "{{ groups[mon_group_name][0] }}" when: - not rolling_update @@ -75,7 +76,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 @@ -100,7 +101,7 @@ 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: