]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
sites: fail the playbook on any failure
authorSébastien Han <seb@redhat.com>
Mon, 26 Nov 2018 10:06:10 +0000 (11:06 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Mon, 3 Dec 2018 13:39:43 +0000 (14:39 +0100)
We need to apply   any_errors_fatal: true to every play so it can take
effect, not only on the initial pass. With this flag, any error in the
playbook will cause the playbook to stop.

Signed-off-by: Sébastien Han <seb@redhat.com>
site-container.yml.sample
site.yml.sample

index 7bd700298421d9c0b32959ba801ca95d75cd6362..e50db511c16f3133a5c55284f32e8f277d6d1392 100644 (file)
 - hosts: mons
   become: True
   gather_facts: false
+  any_errors_fatal: true
   tasks:
     - import_role:
         name: ceph-defaults
 - hosts: osds
   become: True
   gather_facts: false
+  any_errors_fatal: true
   tasks:
     # pre-tasks for upcoming imports -
     - name: set ceph osd install 'In Progress'
 - hosts: mdss
   become: True
   gather_facts: false
+  any_errors_fatal: true
   tasks:
     # pre-tasks for following imports -
     - name: set ceph mds install 'In Progress'
 - hosts: rgws
   become: True
   gather_facts: false
+  any_errors_fatal: true
   tasks:
     # pre-tasks for following imports -
     - name: set ceph rgw install 'In Progress'
 - hosts: nfss
   become: True
   gather_facts: false
+  any_errors_fatal: true
   tasks:
     # pre-tasks for following imports -
     - name: set ceph nfs install 'In Progress'
 - hosts: rbdmirrors
   become: True
   gather_facts: false
+  any_errors_fatal: true
   tasks:
     # pre-tasks for following imports -
     - name: set ceph rbd mirror install 'In Progress'
 - hosts: clients
   become: True
   gather_facts: false
+  any_errors_fatal: true
   tasks:
     # pre-tasks for following imports -
     - name: set ceph client install 'In Progress'
     - iscsigws
     - iscsi-gws # for backward compatibility only!
   gather_facts: false
+  any_errors_fatal: true
   become: True
   tasks:
     # pre-tasks for following imports -
index c6822f9e730d75ec967ad7c6fb70ac1e96797daa..09f9daf4417bd9961c8b9932aec555b1dbc026fe 100644 (file)
@@ -85,6 +85,7 @@
 - hosts: mons
   gather_facts: false
   become: True
+  any_errors_fatal: true
   tasks:
     # pre-tasks for following imports -
     - name: set ceph monitor install 'In Progress'
 - hosts: mgrs
   gather_facts: false
   become: True
+  any_errors_fatal: true
   tasks:
     # pre-tasks for following imports -
     - name: set ceph manager install 'In Progress'
 - hosts: agents
   gather_facts: false
   become: True
+  any_errors_fatal: true
   tasks:
     # pre-tasks for following imports -
     - name: set ceph agent install 'In Progress'
 - hosts: osds
   gather_facts: false
   become: True
+  any_errors_fatal: true
   tasks:
     # pre-tasks for following imports -
     - name: set ceph osd install 'In Progress'
 - hosts: mdss
   gather_facts: false
   become: True
+  any_errors_fatal: true
   tasks:
     # pre-tasks for following imports -
     - name: set ceph mds install 'In Progress'
 - hosts: rgws
   gather_facts: false
   become: True
+  any_errors_fatal: true
   tasks:
     # pre-tasks for following imports -
     - name: set ceph rgw install 'In Progress'
 - hosts: nfss
   gather_facts: false
   become: True
+  any_errors_fatal: true
   tasks:
     # pre-tasks for following imports -
     - name: set ceph nfs install 'In Progress'
 - hosts: rbdmirrors
   gather_facts: false
   become: True
+  any_errors_fatal: true
   tasks:
     # pre-tasks for following imports -
     - name: set ceph rbd mirror install 'In Progress'
 - hosts: clients
   gather_facts: false
   become: True
+  any_errors_fatal: true
   tasks:
     # pre-tasks for following imports -
     - name: set ceph client install 'In Progress'
     - iscsi-gws # for backward compatibility only!
   gather_facts: false
   become: True
+  any_errors_fatal: true
   tasks:
     # pre-tasks for following imports -
     - name: set ceph iscsi gateway install 'In Progress'