From 8b46138652cda3dc85010260098cc3bbe1dd2a88 Mon Sep 17 00:00:00 2001 From: Henry Geay de Montenon Date: Mon, 13 Feb 2023 17:24:15 +0100 Subject: [PATCH] ensuring centos vm is up to date --- tasks/base_virt_ipi.yml | 3 ++- tasks/base_virt_sno.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tasks/base_virt_ipi.yml b/tasks/base_virt_ipi.yml index 92d4cdd..4918241 100644 --- a/tasks/base_virt_ipi.yml +++ b/tasks/base_virt_ipi.yml @@ -122,7 +122,7 @@ - name: Downloading CentOS 8 base image ansible.builtin.get_url: - url: https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20220125.1.x86_64.qcow2 + url: https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20220913.0.x86_64.qcow2 dest: /var/lib/libvirt/images/centos8-kvm.qcow2 mode: 0644 when: not base_result.stat.exists @@ -147,6 +147,7 @@ - "virt-resize --expand /dev/sda1 /var/lib/libvirt/images/centos8-kvm.qcow2 /var/lib/libvirt/images/ocp4-bastion.qcow2" - "virt-customize -a /var/lib/libvirt/images/ocp4-bastion.qcow2 --uninstall cloud-init" - "virt-customize -a /var/lib/libvirt/images/ocp4-bastion.qcow2 --root-password password:{{ ocp4_aio_root_password }}" + - "virt-customize -a /var/lib/libvirt/images/ocp4-bastion.qcow2 --update - "virt-copy-in -a /var/lib/libvirt/images/ocp4-bastion.qcow2 /tmp/ifcfg-eth0 /etc/sysconfig/network-scripts" - "virt-customize -a /var/lib/libvirt/images/ocp4-bastion.qcow2 --run-command \"mkdir -p /root/.ssh/ && chmod -R 0700 /root/.ssh/\"" - "virt-customize -a /var/lib/libvirt/images/ocp4-bastion.qcow2 --run-command \"restorecon -Rv /root/.ssh/\"" diff --git a/tasks/base_virt_sno.yml b/tasks/base_virt_sno.yml index caf6bfd..928828a 100644 --- a/tasks/base_virt_sno.yml +++ b/tasks/base_virt_sno.yml @@ -43,7 +43,7 @@ - name: Downloading CentOS 8 base image ansible.builtin.get_url: - url: https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20220125.1.x86_64.qcow2 + url: https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20220913.0.x86_64.qcow2 dest: /var/lib/libvirt/images/centos8-kvm.qcow2 mode: 0644 when: not base_result.stat.exists @@ -68,6 +68,7 @@ - "virt-resize --expand /dev/sda1 /var/lib/libvirt/images/centos8-kvm.qcow2 /var/lib/libvirt/images/ocp4-bastion.qcow2" - "virt-customize -a /var/lib/libvirt/images/ocp4-bastion.qcow2 --uninstall cloud-init" - "virt-customize -a /var/lib/libvirt/images/ocp4-bastion.qcow2 --root-password password:redhat" + - "virt-customize -a /var/lib/libvirt/images/ocp4-bastion.qcow2 --update - "virt-copy-in -a /var/lib/libvirt/images/ocp4-bastion.qcow2 /tmp/ifcfg-eth0 /etc/sysconfig/network-scripts" - "virt-customize -a /var/lib/libvirt/images/ocp4-bastion.qcow2 --run-command \"mkdir -p /root/.ssh/ && chmod -R 0700 /root/.ssh/\"" - "virt-customize -a /var/lib/libvirt/images/ocp4-bastion.qcow2 --run-command \"restorecon -Rv /root/.ssh/\""