]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
cephadm_adopt: add any_errors_fatal on play
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 28 Jun 2021 12:12:40 +0000 (14:12 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Sat, 3 Jul 2021 09:59:27 +0000 (11:59 +0200)
Add any_errors_fatal: true in cephadm-adopt playbook.
We should stop the playbook execution when a task throws an error.
Otherwise it can lead to unexpected behavior.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1976179
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 3b804a61dd532ee5516c036d5156d9a110c0dced)

infrastructure-playbooks/cephadm-adopt.yml

index d9aa0dad560546e30e1827bc47dcaaf3d75afd7d..89ccb692b6c339b32864ecdcdb9c08d004d2c8e2 100644 (file)
@@ -35,6 +35,7 @@
     - "{{ iscsi_gw_group_name|default('iscsigws') }}"
     - "{{ grafana_server_group_name|default('grafana-server') }}"
   become: true
+  any_errors_fatal: True
   gather_facts: false
   vars:
     delegate_facts_host: true
   serial: 1
   become: true
   gather_facts: false
+  any_errors_fatal: True
   tasks:
     - import_role:
         name: ceph-defaults
   serial: 1
   become: true
   gather_facts: false
+  any_errors_fatal: True
   tasks:
     - import_role:
         name: ceph-defaults
   hosts: "{{ mon_group_name|default('mons') }}[0]"
   become: true
   gather_facts: false
+  any_errors_fatal: True
   tasks:
     - import_role:
         name: ceph-defaults
   serial: 1
   become: true
   gather_facts: false
+  any_errors_fatal: True
   tasks:
     - import_role:
         name: ceph-defaults
   hosts: "{{ mon_group_name|default('mons') }}[0]"
   become: true
   gather_facts: false
+  any_errors_fatal: True
   tasks:
     - import_role:
         name: ceph-defaults
   hosts: "{{ mds_group_name|default('mdss') }}"
   become: true
   gather_facts: false
+  any_errors_fatal: True
   tasks:
     - import_role:
         name: ceph-defaults
   serial: 1
   become: true
   gather_facts: false
+  any_errors_fatal: True
   tasks:
     - import_role:
         name: ceph-defaults
   hosts: "{{ rgw_group_name|default('rgws') }}"
   become: true
   gather_facts: false
+  any_errors_fatal: True
   tasks:
     - import_role:
         name: ceph-defaults
   serial: 1
   become: true
   gather_facts: false
+  any_errors_fatal: True
   tasks:
     - import_role:
         name: ceph-defaults
   serial: 1
   become: true
   gather_facts: false
+  any_errors_fatal: True
   tasks:
     - import_role:
         name: ceph-defaults
   hosts: "{{ rbdmirror_group_name|default('rbdmirrors') }}"
   become: true
   gather_facts: false
+  any_errors_fatal: True
   tasks:
     - import_role:
         name: ceph-defaults
   serial: 1
   become: true
   gather_facts: false
+  any_errors_fatal: True
   tasks:
     - import_role:
         name: ceph-defaults
   hosts: "{{ iscsi_gw_group_name|default('iscsigws') }}"
   become: true
   gather_facts: false
+  any_errors_fatal: True
   tasks:
     - import_role:
         name: ceph-defaults
   serial: 1
   become: true
   gather_facts: false
+  any_errors_fatal: True
   tasks:
     - import_role:
         name: ceph-defaults
     - "{{ rbdmirror_group_name|default('rbdmirrors') }}"
   become: true
   gather_facts: false
+  any_errors_fatal: True
   tasks:
     - import_role:
         name: ceph-defaults
   serial: 1
   become: true
   gather_facts: false
+  any_errors_fatal: True
   tasks:
     - import_role:
         name: ceph-defaults
     - "{{ grafana_server_group_name|default('grafana-server') }}"
   become: true
   gather_facts: false
+  any_errors_fatal: True
   tasks:
     - import_role:
         name: ceph-defaults
   hosts: "{{ mon_group_name|default('mons') }}[0]"
   become: true
   gather_facts: false
+  any_errors_fatal: True
   tasks:
     - import_role:
         name: ceph-defaults
   hosts: "{{ mon_group_name|default('mons') }}[0]"
   become: true
   gather_facts: false
+  any_errors_fatal: True
   tasks:
     - import_role:
         name: ceph-defaults