mirror of https://github.com/ceph/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 <gabrioux@redhat.com>pull/2527/head
parent
ac41efd3c2
commit
899b0eb451
|
@ -37,6 +37,7 @@
|
||||||
failed_when: false
|
failed_when: false
|
||||||
check_mode: no
|
check_mode: no
|
||||||
register: ceph_current_fsid
|
register: ceph_current_fsid
|
||||||
|
run_once: true
|
||||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
when:
|
when:
|
||||||
- not rolling_update
|
- not rolling_update
|
||||||
|
@ -74,7 +75,7 @@
|
||||||
set_fact:
|
set_fact:
|
||||||
fsid: "{{ ceph_current_fsid.stdout }}"
|
fsid: "{{ ceph_current_fsid.stdout }}"
|
||||||
when:
|
when:
|
||||||
- ceph_current_fsid.rc == 0
|
- ceph_current_fsid.get('rc', 1) == 0
|
||||||
|
|
||||||
# Set ceph_release to ceph_stable by default
|
# Set ceph_release to ceph_stable by default
|
||||||
- name: set_fact ceph_release ceph_stable_release
|
- name: set_fact ceph_release ceph_stable_release
|
||||||
|
@ -99,7 +100,7 @@
|
||||||
creates: "{{ fetch_directory }}/ceph_cluster_uuid.conf"
|
creates: "{{ fetch_directory }}/ceph_cluster_uuid.conf"
|
||||||
become: false
|
become: false
|
||||||
when:
|
when:
|
||||||
- ceph_current_fsid.rc == 0
|
- ceph_current_fsid.get('rc', 1) == 0
|
||||||
|
|
||||||
- name: read cluster fsid if it already exists
|
- name: read cluster fsid if it already exists
|
||||||
local_action:
|
local_action:
|
||||||
|
|
Loading…
Reference in New Issue