From: Kienan Stewart Date: Fri, 19 Jan 2024 16:36:30 +0000 (-0500) Subject: ansible: Use a more generic condition for installing linux headers X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=482794b9ed615286b9fdf9a82cb28395d23af610;p=lttng-ci.git ansible: Use a more generic condition for installing linux headers When building ci-node or developer images, the linux headers weren't being installed as the node wasn't in the node_standalone group. When the node is a virtualization host or a KVM guest, the headers will be installed. Change-Id: Ic19459fc6c3f7c0b47541ffb194640f01e517986 Signed-off-by: Kienan Stewart --- diff --git a/automation/ansible/roles/common-node/tasks/setup-Debian.yml b/automation/ansible/roles/common-node/tasks/setup-Debian.yml index 1a8cc76..0c45d6b 100644 --- a/automation/ansible/roles/common-node/tasks/setup-Debian.yml +++ b/automation/ansible/roles/common-node/tasks/setup-Debian.yml @@ -6,7 +6,7 @@ apt: "name={{ common_node_packages }} state=present" - name: Install linux headers - when: inventory_hostname in groups['node_standalone']|default([]) + when: ansible_virtualization_role == "host" or (ansible_virtualization_role == "guest" and ansible_virtualization_type == "kvm") block: - name: Install i386 linux headers Debian when: ansible_architecture == 'i386' and ansible_distribution == 'Debian'