Merge "Properly check failed status"

This commit is contained in:
Jenkins 2015-09-07 03:33:27 +00:00 committed by Gerrit Code Review
commit efea3b3f1b
7 changed files with 8 additions and 36 deletions

View File

@ -67,18 +67,13 @@
when: database.stdout.find('localhost | SUCCESS => ') != -1 and (database.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed
# https://github.com/ansible/ansible-modules-core/pull/1031
- name: Waiting for bootstrap container to exit
command: docker wait bootstrap_cinder
when: database.stdout.find('localhost | SUCCESS => ') != -1 and (database.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed
failed_when: bootstrap_result.stdout != "0"
register: bootstrap_result
run_once: True
- name: Checking for bootstrap failures
fail: msg="Bootstrapping failed"
run_once: True
when: bootstrap_result|changed and bootstrap_result.stdout != "0"
- name: Cleaning up Cinder bootstrap container
docker:
name: bootstrap_cinder

View File

@ -72,13 +72,9 @@
command: docker wait bootstrap_glance
register: bootstrap_result
run_once: True
failed_when: bootstrap_result.stdout != "0"
when: database.stdout.find('localhost | SUCCESS => ') != -1 and (database.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed
- name: Checking for bootstrap failures
fail: msg="Bootstrapping failed"
run_once: True
when: bootstrap_result|changed and bootstrap_result.stdout != "0"
- name: Cleaning up Glance bootstrap container
docker:
name: bootstrap_glance

View File

@ -59,13 +59,9 @@
command: docker wait bootstrap_heat
register: bootstrap_result
run_once: True
failed_when: bootstrap_result.stdout != "0"
when: database.stdout.find('localhost | SUCCESS => ') != -1 and (database.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed
- name: Checking for bootstrap failures
fail: msg="Bootstrapping failed"
run_once: True
when: bootstrap_result|changed and bootstrap_result.stdout != "0"
- name: Cleaning up Heat boostrap container
docker:
name: bootstrap_heat

View File

@ -62,13 +62,9 @@
command: docker wait bootstrap_keystone
register: bootstrap_result
run_once: True
failed_when: bootstrap_result.stdout != "0"
when: database.stdout.find('localhost | SUCCESS => ') != -1 and (database.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed
- name: Checking for bootstrap failures
fail: msg="Bootstrapping failed"
run_once: True
when: bootstrap_result|changed and bootstrap_result.stdout != "0"
- name: Cleaning up Keystone bootstrap container
docker:
name: bootstrap_keystone

View File

@ -49,18 +49,13 @@
when: database.stdout.find('localhost | SUCCESS => ') != -1 and (database.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed
# https://github.com/ansible/ansible-modules-core/pull/1031
- name: Waiting for bootstrap container to exit
command: docker wait bootstrap_neutron
register: bootstrap_result
run_once: True
failed_when: bootstrap_result.stdout != "0"
when: database.stdout.find('localhost | SUCCESS => ') != -1 and (database.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed
- name: Checking for bootstrap failures
fail: msg="Bootstrapping failed"
run_once: True
when: bootstrap_result|changed and bootstrap_result.stdout != "0"
- name: Cleaning up Neutron bootstrap container
docker:
name: bootstrap_neutron

View File

@ -53,13 +53,9 @@
command: docker wait bootstrap_nova
register: bootstrap_result
run_once: True
failed_when: bootstrap_result.stdout != "0"
when: database.stdout.find('localhost | SUCCESS => ') != -1 and (database.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed
- name: Checking for bootstrap failures
fail: msg="Bootstrapping failed"
run_once: True
when: bootstrap_result|changed and bootstrap_result.stdout != "0"
- name: Cleaning up Nova bootstrap container
docker:
name: bootstrap_nova

View File

@ -46,15 +46,13 @@
RABBITMQ_CLUSTER_COOKIE: "{{ rabbitmq_cluster_cookie }}"
when: exists.rc != 0
# https://github.com/ansible/ansible-modules-core/pull/1031
- name: Waiting for bootstrap container
command: docker wait rabbitmq_bootstrap
register: bootstrap_result
failed_when: bootstrap_result.stdout != "0"
when: exists.rc != 0
- name: Checking for bootstrap failures
fail: msg="Bootstrapping failed"
when: bootstrap_result|changed and bootstrap_result.stdout != "0"
- name: Cleaning up bootstrap container
docker:
image: "{{ rabbitmq_image_full }}"