Implement any_errors_fatal for all test playbooks

Sometimes a test will result in a failure, but it
takes more time than necessary to find the failure
due to Ansible continuing to execute on other hosts
after removing one from the play execution.

This patch ensures that any error will result in
an immediate failure so that the fatal error is
easier to find.

Change-Id: I4e89bfdb1e48d0ac65f9fb8549e55a19ab773f9f
This commit is contained in:
Jesse Pretorius 2017-07-06 11:13:22 +01:00 committed by Jesse Pretorius (odyssey4me)
parent f0754e9704
commit dad9515c35
24 changed files with 34 additions and 1 deletions

View File

@ -12,6 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Playbook for destroying test containers
hosts: all_containers
serial: 1

View File

@ -16,5 +16,6 @@
- name: Setting nodepool variables
hosts: all
gather_facts: true
any_errors_fatal: true
tasks:
- include: "common-tasks/test-set-nodepool-vars.yml"

View File

@ -18,6 +18,7 @@
user: root
become: true
gather_facts: true
any_errors_fatal: true
pre_tasks:
- include: ensure-rabbitmq.yml
@ -43,6 +44,7 @@
user: root
become: true
gather_facts: true
any_errors_fatal: true
roles:
- role: "os_cinder"
vars_files:

View File

@ -18,5 +18,6 @@
user: root
become: true
gather_facts: true
any_errors_fatal: true
roles:
- role: "etcd"

View File

@ -18,6 +18,7 @@
user: root
become: true
gather_facts: true
any_errors_fatal: true
roles:
- role: "galera_server"
vars_files:

View File

@ -18,6 +18,7 @@
user: root
become: true
gather_facts: true
any_errors_fatal: true
pre_tasks:
- include: ensure-rabbitmq.yml
vhost_name: "{{ glance_rabbitmq_vhost }}"

View File

@ -18,6 +18,7 @@
user: root
become: true
gather_facts: true
any_errors_fatal: true
pre_tasks:
- include: create-grant-db.yml
db_name: "{{ gnocchi_database_name }}"

View File

@ -16,6 +16,7 @@
- name: Install haproxy
hosts: localhost
become: true
any_errors_fatal: true
roles:
- role: "haproxy_server"
haproxy_service_configs: "{{ haproxy_default_services | default([]) }}"

View File

@ -18,6 +18,7 @@
user: root
become: true
gather_facts: true
any_errors_fatal: true
pre_tasks:
- include: ensure-rabbitmq.yml
vhost_name: "{{ heat_rabbitmq_vhost }}"

View File

@ -18,6 +18,7 @@
user: root
become: true
gather_facts: true
any_errors_fatal: true
pre_tasks:
- include: create-grant-db.yml
db_name: "{{ horizon_galera_database }}"

View File

@ -18,6 +18,7 @@
remote_user: root
become: true
gather_facts: true
any_errors_fatal: true
pre_tasks:
- include: ensure-rabbitmq.yml
vhost_name: "{{ ironic_rabbitmq_vhost }}"

View File

@ -16,6 +16,7 @@
- name: Prepare MQ/DB services
hosts: keystone_all[0]
gather_facts: true
any_errors_fatal: true
user: root
become: true
tasks:
@ -39,6 +40,7 @@
user: root
become: true
gather_facts: true
any_errors_fatal: true
pre_tasks:
# In order to ensure that any container, software or
# config file changes which causes a container/service
@ -68,6 +70,7 @@
user: root
become: true
gather_facts: false
any_errors_fatal: true
tasks:
- name: Perform a Keystone DB sync contract
command: "/openstack/venvs/keystone-{{ keystone_venv_tag }}/bin/keystone-manage db_sync --contract"

View File

@ -18,6 +18,7 @@
user: root
become: true
gather_facts: true
any_errors_fatal: true
roles:
- role: "memcached_server"
vars_files:

View File

@ -20,6 +20,7 @@
user: root
become: true
gather_facts: true
any_errors_fatal: true
vars:
kernel_module_path:
apt: "lib/modules"
@ -54,6 +55,7 @@
user: root
become: true
gather_facts: true
any_errors_fatal: true
vars:
required_packages:
apt:
@ -91,6 +93,7 @@
user: root
become: true
gather_facts: true
any_errors_fatal: true
roles:
- role: "os_neutron"
vars_files:
@ -103,6 +106,7 @@
user: root
become: true
gather_facts: true
any_errors_fatal: true
roles:
- role: "os_neutron"
vars_files:

View File

@ -20,6 +20,7 @@
user: root
become: true
gather_facts: true
any_errors_fatal: true
vars:
required_packages:
apt:
@ -83,6 +84,7 @@
user: root
become: true
gather_facts: true
any_errors_fatal: true
roles:
- role: "os_nova"
vars_files:
@ -93,6 +95,7 @@
user: root
become: true
gather_facts: true
any_errors_fatal: true
roles:
- role: "os_nova"
vars_files:

View File

@ -17,6 +17,7 @@
hosts: localhost
become: true
gather_facts: true
any_errors_fatal: true
pre_tasks:
- include: "common-tasks/test-force-package-cache-update.yml"
roles:

View File

@ -18,6 +18,7 @@
user: root
become: true
gather_facts: true
any_errors_fatal: true
roles:
- role: "rabbitmq_server"
vars_files:

View File

@ -18,6 +18,7 @@
remote_user: root
become: true
gather_facts: true
any_errors_fatal: true
pre_tasks:
- include: ensure-rabbitmq.yml
vhost_name: "{{ sahara_rabbitmq_vhost }}"

View File

@ -20,6 +20,7 @@
user: root
become: true
gather_facts: true
any_errors_fatal: true
roles:
- role: "{{ swift_rolename | default('os_swift') }}"
vars_files:

View File

@ -18,6 +18,7 @@
user: root
become: true
gather_facts: true
any_errors_fatal: true
roles:
- role: "{{ tempest_rolename | default('os_tempest') }}"
vars_files:

View File

@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Playbook for creating containers
- name: Gather facts for the LXC hosts
hosts: localhost
become: true
gather_facts: true
@ -26,6 +26,7 @@
serial: 1
become: True
gather_facts: False
any_errors_fatal: true
roles:
- role: "lxc_container_create"
post_tasks:

View File

@ -20,6 +20,7 @@
- name: Playbook for establishing ssh keys
hosts: localhost
gather_facts: false
any_errors_fatal: true
connection: local
become: true
tasks:
@ -68,6 +69,7 @@
hosts: localhost
connection: local
become: false
any_errors_fatal: true
tasks:
# Shell used because facts may not be ready yet
- name: Get user home directory

View File

@ -17,6 +17,7 @@
hosts: localhost
connection: local
gather_facts: false
any_errors_fatal: true
tasks:
- name: Ensure repo directory exists
file:

View File

@ -18,6 +18,7 @@
user: root
become: true
gather_facts: true
any_errors_fatal: true
vars_files:
- test-vars.yml
tasks: