]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
defaults: change running order in main.yml 1973/head
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 2 Oct 2017 13:49:05 +0000 (15:49 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Mon, 2 Oct 2017 16:42:43 +0000 (18:42 +0200)
The task which sets `ceph_current_fsid` in `facts.yml` in case of containerized
deployment, will definitely fail because `docker_exec_cmd` is not set
yet.
This commits simply makes `facts.yml` played after `check_socket.yml` so
`docker_exec_cmd` is set properly.

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

index 8dcad149b3b64c28d64079dc99050aca3c2868ef..7dfe2b263949298a45d3d4706acc6103cace7492 100644 (file)
@@ -15,7 +15,7 @@
 # because it blindly picks a mon, which may be down because
 # of the rolling update
 - name: is ceph running already?
-  command: ceph --connect-timeout 3 --cluster {{ cluster }} fsid
+  command: "{{ docker_exec_cmd }} ceph --connect-timeout 3 --cluster {{ cluster }} fsid"
   changed_when: false
   failed_when: false
   always_run: yes
   when:
     - generate_fsid
 
-- name: set_fact docker_exec_cmd
-  set_fact:
-    docker_exec_cmd: "docker exec ceph-mon-{{ ansible_hostname }}"
-  when:
-    - containerized_deployment
-
 - name: set_fact mds_name ansible_hostname
   set_fact:
     mds_name: "{{ ansible_hostname }}"
index 2efe0594113b135c2397af191b16dc19cf129571..04abe65879cd29805d8cd31a9430e1d5cf9ec246 100644 (file)
@@ -1,6 +1,6 @@
 ---
-- name: include facts.yml
-  include: facts.yml
-
 - name: include check_socket.yml
   include: check_socket.yml
+
+- name: include facts.yml
+  include: facts.yml