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:
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 roles/neutron/ tasks/bootstrap .yml roles/neutron/ tasks/bootstrap .yml stdout. find('localhost | SUCCESS => ') != -1 and
(database. stdout. split(' localhost | SUCCESS => ')[1]|from_ json).changed }}" stdout. split() [2] != 'SUCCESS' 'neutron- server' ][0] }}" stdout. split() [2] == "SUCCESS"
index 30c9006..c149072 100644
--- a/ansible/
+++ b/ansible/
@@ -10,8 +10,9 @@
changed_when: "{{ database.
failed_when: database.
- run_once: True
- delegate_to: "{{ groups[
+ delegate_to: "{{ inventory_hostname }}"
+ until:
+ database.
- name: Reading json from variable
set_fact: