Ubuntu: support host package update

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
This commit is contained in:
Mark Goddard 2021-11-16 12:09:02 +00:00
parent 4616c87010
commit 48a6dcc82d
2 changed files with 13 additions and 3 deletions

View File

@ -8,9 +8,9 @@
host_package_update_security: false
tasks:
- name: Update host packages
dnf:
package:
name: "{{ host_package_update_packages }}"
security: "{{ host_package_update_security | bool }}"
security: "{{ host_package_update_security | bool if ansible_facts.os_family == 'RedHat' else omit }}"
state: latest
when: ansible_facts.os_family == 'RedHat'
update_cache: "{{ True if ansible_facts.os_family == 'Debian' else omit }}"
become: true

View File

@ -0,0 +1,10 @@
---
features:
- |
Adds support for running package updates on Ubuntu hosts via the following
existing commands:
* ``kayobe seed host package update --packages <packages>``
* ``kayobe seed hypervisor host package update --packages <packages>``
* ``kayobe infra vm host package update --packages <packages>``
* ``kayobe overcloud host package update --packages <packages>``