diff --git a/ansible/roles/mariadb/tasks/register.yml b/ansible/roles/mariadb/tasks/register.yml index 9285bb9a52..0aa72d2c3f 100644 --- a/ansible/roles/mariadb/tasks/register.yml +++ b/ansible/roles/mariadb/tasks/register.yml @@ -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