6c54ce4d3b
This allows us to continue execution until a certain proportion of hosts fail. This can be useful at scale, where failures are common, and restarting a deployment is time-consuming. The default max failure percentage is 100, keeping the default behaviour. A global max failure percentage may be set via kayobe_max_fail_percentage, and individual playbooks may define a max failure percentage via <playbook>_max_fail_percentage. Related Kolla Ansible patch: https://review.opendev.org/c/openstack/kolla-ansible/+/805598 Change-Id: Ib81c72b63be5765cca664c38141ffc769640cf07
21 lines
766 B
YAML
21 lines
766 B
YAML
---
|
|
- name: Update host packages
|
|
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
|
max_fail_percentage: >-
|
|
{{ host_package_update_max_fail_percentage |
|
|
default(kayobe_max_fail_percentage) |
|
|
default(100) }}
|
|
vars:
|
|
# Optionally set this to a list of packages to update. Default behaviour is
|
|
# to update all packages.
|
|
host_package_update_packages: "*"
|
|
host_package_update_security: false
|
|
tasks:
|
|
- name: Update host packages
|
|
package:
|
|
name: "{{ host_package_update_packages }}"
|
|
security: "{{ host_package_update_security | bool if ansible_facts.os_family == 'RedHat' else omit }}"
|
|
state: latest
|
|
update_cache: "{{ True if ansible_facts.os_family == 'Debian' else omit }}"
|
|
become: true
|