Ansible register task for MariaDB incorrectly reports failure
When running register task for MariaDB we should firstly check if operation failed before trying to parse result from json output Change-Id: Ic331ec20990277d30b147826ff24affb27d52383 Closes-Bug: #1491751
This commit is contained in:
parent
233864ff32
commit
64180f6735
@ -10,7 +10,7 @@
|
||||
password=''
|
||||
host='%'"
|
||||
register: haproxy_user
|
||||
changed_when: "{{ (haproxy_user.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
|
||||
changed_when: "{{ haproxy_user.stdout.find('localhost | SUCCESS => ') != -1 and (haproxy_user.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
|
||||
until: haproxy_user.stdout.split()[2] == 'SUCCESS'
|
||||
retries: 10
|
||||
delay: 5
|
||||
|
Loading…
x
Reference in New Issue
Block a user