48a6dcc82d
Currently, the 'kayobe * host package update' commands do not work on Ubuntu, since the main task is skipped. This change adds support for running the commands against Ubuntu hosts, passing parameters to the package module based on the OS distribution. Change-Id: I879df0ea3f357c2bb45a5e7331a3f2569eac63e9 Story: 2009685 Task: 43988
17 lines
623 B
YAML
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
|