Closed csmart closed 2 years ago
Note that this can be worked around by overriding the virt_infra_guest_deps
variable in the inventory and removing cloud-init
(as it's already installed).
virt_infra_guest_deps:
- qemu-guest-agent
ahhh it's a bug in the image (because the cloud config was changed), so if you just update and use this latest image you should be fine: https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20220125.1.x86_64.qcow2
Might still be handy to have a post install task though...
And while we're at it, the install task should only run if the length of virt_infra_guest_deps
is not zero, this way users can actually skip the install step
SSH fail to start on CentOS Stream 8 VMs, this seems to be because of two things:
The
sshkey-gen.target
is not run becausecloud-init
is enabled:But
cloud-init
isn't actually creating the host keys because of a config change:This is because
cloud-init
was actually updated, as a part of the disk prep step to make sure it is installed:https://github.com/csmart/ansible-role-virt-infra/blob/master/tasks/disk-create.yml#L202
Therefore, we need to either get smarter about installing
cloud-init
not install the latest version of it (but it's probably good to install the latest version), or we need to make sure that the config wasn't changed since the initial RPM was installed (so that the config is overwritten and.rpmnew
is never created), or we need to add a post install task to run commands in the disk (so that users can managerpmconf
)... Something like that.