]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
use pre_tasks and post_tasks in shrink-mon.yml too
authorRishabh Dave <ridave@redhat.com>
Sat, 15 Jun 2019 12:07:13 +0000 (17:37 +0530)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Mon, 17 Jun 2019 16:14:49 +0000 (12:14 -0400)
This commit should've been part of commit
2fb12ae55462f5601a439a104a5b0c01929accd9.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
infrastructure-playbooks/shrink-mon.yml

index d8a66436c878e6feaab5c657d0e4a8e79aa1a3d5..e0101c39ef81e5fd3bde2c9c4417341fd8ffcf38 100644 (file)
@@ -32,8 +32,7 @@
   vars:
     mon_group_name: mons
 
-  tasks:
-    # pre task for following import
+  pre_tasks:
     - name: exit playbook, if only one monitor is present in cluster
       fail:
         msg: "You are about to shrink the only monitor present in the cluster.
@@ -67,7 +66,7 @@
     - import_role:
         name: ceph-facts
 
-    # post_tasks for preceding import
+  tasks:
     - name: pick a monitor different than the one we want to remove
       set_fact:
         mon_host: "{{ item }}"
       failed_when: false
       delegate_to: "{{ mon_host }}"
 
+  post_tasks:
     # NOTE (leseb): sorry for the 'sleep' command
     # but it will take a couple of seconds for other monitors
     # to notice that one member has left.