Comment 8 for bug 1546789

Revision history for this message
Ganesh Maharaj Mahalingam (ganesh-mahalingam) wrote :

 This seems to be an option that worked without having to re-order the list on site.yml. Maybe this can be pursued.

diff --git a/ansible/roles/neutron/tasks/bootstrap.yml b/ansible/roles/neutron/tasks/bootstrap.yml
index 30c9006..c149072 100644
--- a/ansible/roles/neutron/tasks/bootstrap.yml
+++ b/ansible/roles/neutron/tasks/bootstrap.yml
@@ -10,8 +10,9 @@
   changed_when: "{{ database.stdout.find('localhost | SUCCESS => ') != -1 and
                     (database.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
   failed_when: database.stdout.split()[2] != 'SUCCESS'
- run_once: True
- delegate_to: "{{ groups['neutron-server'][0] }}"
+ delegate_to: "{{ inventory_hostname }}"
+ until:
+ database.stdout.split()[2] == "SUCCESS"

 - name: Reading json from variable
   set_fact: