Merge "Allow setting any_errors_fatal true for gather-facts"

This commit is contained in:
Zuul 2022-11-22 10:08:57 +00:00 committed by Gerrit Code Review
commit 83a51bbb30
5 changed files with 32 additions and 0 deletions

View File

@ -4,6 +4,7 @@
# building their configurations.
- name: Gather facts for all hosts
hosts: all
any_errors_fatal: "{{ kolla_ansible_setup_any_errors_fatal | bool }}"
serial: '{{ kolla_serial|default("0") }}'
gather_facts: false
tasks:
@ -28,6 +29,7 @@
# the limit.
- name: Gather facts for all hosts (if using --limit)
hosts: all_using_limit_True
any_errors_fatal: "{{ kolla_ansible_setup_any_errors_fatal | bool }}"
serial: '{{ kolla_serial|default("0") }}'
gather_facts: false
vars:

View File

@ -36,6 +36,14 @@ kolla_ansible_setup_filter: "{{ omit }}"
# By default, we do not provide a gather subset.
kolla_ansible_setup_gather_subset: "{{ omit }}"
# This variable is used as "any_errors_fatal" setting for the setup (gather
# facts) plays.
# This is useful for weeding out failing hosts early to avoid late failures
# due to missing facts (especially cross-host).
# Do note this still supports host fact caching and it will not affect
# scenarios with all facts cached (as there is no task to fail).
kolla_ansible_setup_any_errors_fatal: false
###################
# Kolla options
###################

View File

@ -24,6 +24,14 @@
# Dummy variable to allow Ansible to accept this file.
workaround_ansible_issue_8743: yes
# This variable is used as "any_errors_fatal" setting for the setup (gather
# facts) plays.
# This is useful for weeding out failing hosts early to avoid late failures
# due to missing facts (especially cross-host).
# Do note this still supports host fact caching and it will not affect
# scenarios with all facts cached (as there is no task to fail).
#kolla_ansible_setup_any_errors_fatal: false
###############
# Kolla options
###############

View File

@ -0,0 +1,10 @@
---
features:
- |
Kolla Ansible now supports failing execution early if fact collection
fails on any of the hosts. This is to avoid late failures due to missing
facts (especially cross-host).
This is possible by setting
``kolla_ansible_setup_any_errors_fatal: true``.
Do note this still supports host fact caching and it will not affect
scenarios with all facts cached (as there is no task to fail).

View File

@ -5,6 +5,10 @@
ansible_python_interpreter: /usr/bin/python3
{% endif %}
# NOTE(yoctozepto): In CI it makes sense to always try to fail
# as early as possible.
kolla_ansible_setup_any_errors_fatal: true
kolla_base_distro: "{{ base_distro }}"
# Zed dropped install_type so we have it only on upgrades
{% if is_upgrade %}