Remove 'ignore_errors: true' in favor of 'failed_when: false'

This change removes the use of 'ignore_errors: true' because it causes deployers
to see red output and a stacktrace, which traditionally means something is broken,
even when the failure is known to have a fall back option or be intentional. This
conversion will provide a generally cleaner interface.

It should be noted that the 'failed' filter will still function normally. Tasks
with the 'failed_when: false' option will still be marked as 'failed' in any
registered variable. This change simply makes the output look cleaner.

Change-Id: I2a40fa9a0da45602a76f2d56611971fcf4063512
Closes-Bug: #1633438
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
Kevin Carter 2016-10-14 16:43:57 -05:00 committed by Jesse Pretorius (odyssey4me)
parent 678128f13a
commit 5038acc390
5 changed files with 7 additions and 7 deletions

View File

@ -33,7 +33,7 @@
- name: Gather mysql facts
mysql_status_facts:
ignore_errors: true
failed_when: false
tags:
- galera-cluster-state-check

View File

@ -51,7 +51,7 @@
state: "present"
register: add_keys
until: add_keys|success
ignore_errors: True
failed_when: false
retries: 5
delay: 2
with_items: "{{ galera_gpg_keys }}"

View File

@ -34,7 +34,7 @@
key: "{{ item.keyserver }}/{{ item.key_name }}"
register: add_keys
until: add_keys|success
ignore_errors: True
failed_when: false
retries: 5
delay: 2
with_items: "{{ galera_client_gpg_keys }}"

View File

@ -15,7 +15,7 @@
- name: Check major galera install version
command: "dpkg -s {{ galera_mariadb_apt_server_package }}"
ignore_errors: true
failed_when: false
register: installed_galera_specific
when:
- not galera_upgrade | bool
@ -28,7 +28,7 @@
- name: Check for any galera install version
shell: |
dpkg --get-selections | grep mariadb-galera-server
ignore_errors: true
failed_when: false
register: installed_galera_any
when:
- not galera_upgrade | bool

View File

@ -15,7 +15,7 @@
- name: Check major galera install version
command: "rpm -qi '{{ galera_mariadb_yum_server_package }}'"
ignore_errors: true
failed_when: false
register: installed_galera_specific
when:
- not galera_upgrade | bool
@ -28,7 +28,7 @@
- name: Check for any galera install version
shell: |
rpm -qa | grep -i "{{ galera_mariadb_yum_server_package }}"
ignore_errors: true
failed_when: false
register: installed_galera_any
when:
- not galera_upgrade | bool