From acc92626f6f8ac062c47aee26d8d1c162ec11a22 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Han?= Date: Mon, 26 Nov 2018 11:06:10 +0100 Subject: [PATCH] sites: fail the playbook on any failure MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- site-container.yml.sample | 8 ++++++++ site.yml.sample | 10 ++++++++++ 2 files changed, 18 insertions(+) diff --git a/site-container.yml.sample b/site-container.yml.sample index 7bd700298..e50db511c 100644 --- a/site-container.yml.sample +++ b/site-container.yml.sample @@ -106,6 +106,7 @@ - hosts: mons become: True gather_facts: false + any_errors_fatal: true tasks: - import_role: name: ceph-defaults @@ -179,6 +180,7 @@ - hosts: osds become: True gather_facts: false + any_errors_fatal: true tasks: # pre-tasks for upcoming imports - - name: set ceph osd install 'In Progress' @@ -219,6 +221,7 @@ - hosts: mdss become: True gather_facts: false + any_errors_fatal: true tasks: # pre-tasks for following imports - - name: set ceph mds install 'In Progress' @@ -259,6 +262,7 @@ - hosts: rgws become: True gather_facts: false + any_errors_fatal: true tasks: # pre-tasks for following imports - - name: set ceph rgw install 'In Progress' @@ -299,6 +303,7 @@ - hosts: nfss become: True gather_facts: false + any_errors_fatal: true tasks: # pre-tasks for following imports - - name: set ceph nfs install 'In Progress' @@ -339,6 +344,7 @@ - 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' @@ -379,6 +385,7 @@ - hosts: clients become: True gather_facts: false + any_errors_fatal: true tasks: # pre-tasks for following imports - - name: set ceph client install 'In Progress' @@ -422,6 +429,7 @@ - iscsigws - iscsi-gws # for backward compatibility only! gather_facts: false + any_errors_fatal: true become: True tasks: # pre-tasks for following imports - diff --git a/site.yml.sample b/site.yml.sample index c6822f9e7..09f9daf44 100644 --- a/site.yml.sample +++ b/site.yml.sample @@ -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' @@ -125,6 +126,7 @@ - hosts: mgrs gather_facts: false become: True + any_errors_fatal: true tasks: # pre-tasks for following imports - - name: set ceph manager install 'In Progress' @@ -165,6 +167,7 @@ - hosts: agents gather_facts: false become: True + any_errors_fatal: true tasks: # pre-tasks for following imports - - name: set ceph agent install 'In Progress' @@ -205,6 +208,7 @@ - hosts: osds gather_facts: false become: True + any_errors_fatal: true tasks: # pre-tasks for following imports - - name: set ceph osd install 'In Progress' @@ -245,6 +249,7 @@ - hosts: mdss gather_facts: false become: True + any_errors_fatal: true tasks: # pre-tasks for following imports - - name: set ceph mds install 'In Progress' @@ -285,6 +290,7 @@ - hosts: rgws gather_facts: false become: True + any_errors_fatal: true tasks: # pre-tasks for following imports - - name: set ceph rgw install 'In Progress' @@ -325,6 +331,7 @@ - hosts: nfss gather_facts: false become: True + any_errors_fatal: true tasks: # pre-tasks for following imports - - name: set ceph nfs install 'In Progress' @@ -365,6 +372,7 @@ - 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' @@ -405,6 +413,7 @@ - hosts: clients gather_facts: false become: True + any_errors_fatal: true tasks: # pre-tasks for following imports - - name: set ceph client install 'In Progress' @@ -447,6 +456,7 @@ - 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' -- 2.39.5