ansible: Use a more generic condition for installing linux headers
authorKienan Stewart <kstewart@efficios.com>
Fri, 19 Jan 2024 16:36:30 +0000 (11:36 -0500)
committerKienan Stewart <kstewart@efficios.com>
Fri, 19 Jan 2024 20:00:06 +0000 (15:00 -0500)
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 <kstewart@efficios.com>
automation/ansible/roles/common-node/tasks/setup-Debian.yml

index 1a8cc76793bcd0835789cbb1ef7c41c871177345..0c45d6b05228d1e427c0e9f366a97590660c0910 100644 (file)
@@ -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'
This page took 0.0231 seconds and 4 git commands to generate.