From 482794b9ed615286b9fdf9a82cb28395d23af610 Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Fri, 19 Jan 2024 11:36:30 -0500 Subject: [PATCH] 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 --- automation/ansible/roles/common-node/tasks/setup-Debian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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' -- 2.34.1