From 48a6dcc82d86976a01da9880b04e0e6cb2c13353 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Tue, 16 Nov 2021 12:09:02 +0000 Subject: [PATCH] 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 --- ansible/host-package-update.yml | 6 +++--- .../notes/ubuntu-package-update-0db09fc57249b9fc.yaml | 10 ++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 releasenotes/notes/ubuntu-package-update-0db09fc57249b9fc.yaml diff --git a/ansible/host-package-update.yml b/ansible/host-package-update.yml index f5e924c26..06bc73077 100644 --- a/ansible/host-package-update.yml +++ b/ansible/host-package-update.yml @@ -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 diff --git a/releasenotes/notes/ubuntu-package-update-0db09fc57249b9fc.yaml b/releasenotes/notes/ubuntu-package-update-0db09fc57249b9fc.yaml new file mode 100644 index 000000000..7e3bd47e8 --- /dev/null +++ b/releasenotes/notes/ubuntu-package-update-0db09fc57249b9fc.yaml @@ -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 `` + * ``kayobe seed hypervisor host package update --packages `` + * ``kayobe infra vm host package update --packages `` + * ``kayobe overcloud host package update --packages ``