Skip to main content

Posts

Showing posts from August, 2021

Ansible - Define 'failed_when' on a per item basis

I've been migrating my IAM deployment with FreeIPA to the freeipa.ansible_freeipa collection which worked fine for the most part. I've encountered a false-positive failure when using external groups / external members which will be pulled in using a trust. Here are three posible outcomes: Case 1: The external group is not already a member in which case the ipagroup module will search for, try to add it and return a 'changed' state if it was successful Case 2: The external group is already a member in which case the ipagroup module will return a 'failed' with a message of 'trusted domain object is already a member' which is the false positive Case 3: The external group is not already a member in which case the ipagroup module will search for, try to add it and return a 'failed' state if it was unsuccessful I will focus on case number two for this post. I'm starting with this task in my playbook which behaves exactly as described above: - name...

oVirt - Prepping AlmaLinux 8 to be used as host in oVirt 4.4

NOTE: This is an old tutorial and will not work with EL 8.5(+). You can find an up-to-date tutorial here:  Prepping AlmaLinux 8 to be used as host in oVirt 4.4 oVirt is a project that aims to provide a distributed / clustered virtualization solution for a huge scale. If for some reason you don't want to use the ovirt-node images provided by ovirt.org, you can install any EL8 (or EL7 for that matter) host to be a hypervisor and add them to the cluster as needed. In order to have it working as expected, there are a few things that have to be taken care of. First, disable the default enabled virt module since we will be replacing the packages with more current versions from the advanced virtualization repository from CentOS: [root@ovirt01 ~]# dnf -y module disable virt Next, we need create a repo file for the advanced-virtualization since this will be required for oVirt to work properly. Choose a CentOS mirror that's close to you: [root@ovirt01 ~]# cat << EOF >> /e...

KVM - Using the Advanced Virtualization Repo on EL8

NOTE: This is only relevant for RHEL 8.5 and older since the advanced virtualization repo was merged into the 'virt'-AppStream with the release of RHEL 8.6.  There's a full installation tutorial available here:  KVM - Headless Server setup with Bonding, Bridging and LVM on AlmaLinux 8 If you're utilizing Alma or Rocky Linux 8 for an oVirt installation, you'll have to use the advanved-virtualization repo which is currently built by CentOS.  First disable the virt module. This will not remove any currently installed packages but just disable the package source where we get our libvirt and qemu-kvm packages: [archy@hyv01 ~]$ sudo dnf module disable virt Next up, create the .repo file and let dnf source it. I'll use the CentOS Stable releases, but you could just aswell use the CentOS Stream version of this repo: [archy@hyv01 ~]$ sudo vim /etc/yum.repos.d/advanced-virtualization.repo [advanced-virtualization] name=Advanced Virtualization from CentOS $releas...