Use dnf/yum for customizing libvirt nodepool images

yum is not installed by default in CentOS8 images,
so use dnf for it and fallback to yum when dnf not
available.

Related-Bug: #1887637
Change-Id: I4ddf957f677ba8cc584a155444b27d43b7d27e5c
This commit is contained in:
yatinkarel 2020-07-17 12:46:41 +05:30 committed by yatin
parent d4d3f22551
commit 8cfedbcf7e
1 changed files with 1 additions and 1 deletions

View File

@ -150,7 +150,7 @@
shell: >
source {{ working_dir }}/libguestf-env.sh &&
virt-customize -a {{ working_dir }}/undercloud.qcow2
--run-command 'yum install -y qemu-guest-agent'
--run-command '$(command -v dnf || command -v yum) install -y qemu-guest-agent'
--run-command 'systemctl enable qemu-guest-agent'
>> {{ working_dir }}/virt-customize.log 2>&1
changed_when: true