]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
docker-common: remove duplicate running cluster check
authorGuillaume Abrioux <gabrioux@redhat.com>
Fri, 19 Oct 2018 13:52:28 +0000 (15:52 +0200)
committerSébastien Han <seb@redhat.com>
Mon, 12 Nov 2018 09:51:48 +0000 (10:51 +0100)
this is already done in ceph-defaults, there is no need to have this
check in ceph-docker-common.

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

index 8bfa16a8b39ee0f3077888d80a41e8007d984f3d..b0b978e01945440145896b673ff9eaba20d5bd12 100644 (file)
@@ -11,4 +11,4 @@
   when:
     - inventory_hostname == groups.get(mon_group_name)
     - item.1.stat.exists
-    - ceph_health.stdout_lines | length == 0
+    - not ceph_current_status.get('rc', 1) == 0
index 14fe9ae6ca4407ea7d7dc7cf30782e929eb9c2b4..f2e621a32ea77aa9919fd7a58d0318de7d6ed4be 100644 (file)
   set_fact:
     ceph_docker_version: "{{ ceph_docker_version.stdout.split(' ')[2] }}"
 
-# Only include 'checks.yml' when :
-# we are deploying containers without kv AND host is either a mon OR a nfs OR an osd,
-# AND
-# a cluster is not already running,
-# AND
-# we are not playing rolling-update.yml playbook.
-- name: check if a cluster is already running
-  command: "docker ps -q --filter='name=ceph-mon-{{ ansible_hostname }}'"
-  register: ceph_health
-  changed_when: false
-  failed_when: false
-  check_mode: no
-
 - name: include checks.yml
   include_tasks: checks.yml
   when:
@@ -40,7 +27,7 @@
        ((inventory_hostname in groups.get(mon_group_name, [])) or
         (inventory_hostname in groups.get(nfs_group_name, [])) or
         (inventory_hostname in groups.get(osd_group_name, []))))
-    - ceph_health.stdout_lines | length == 0
+    - not ceph_current_status.get('rc', 1) == 0
     - not rolling_update | default(false)
 
 - name: include misc/ntp_atomic.yml