kayobe/ansible/host-package-update.yml

17 lines
623 B
YAML

---
- name: Update host packages
hosts: seed-hypervisor:seed:overcloud:infra-vms
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