ansible: Use a more generic condition for installing linux headers
[lttng-ci.git] / automation / ansible / roles / common-node / tasks / setup-Debian.yml
index e390f9de2bd5073d634806da86e867791c880bd2..0c45d6b05228d1e427c0e9f366a97590660c0910 100644 (file)
@@ -4,3 +4,19 @@
 
 - name: Ensure common_node packages are installed.
   apt: "name={{ common_node_packages }} state=present"
+
+- name: Install linux headers
+  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'
+      apt:
+        name: ['linux-headers-686', 'linux-headers-686-pae']
+    - name: Install amd64 linux headers Debian
+      when: ansible_architecture == 'x86_64' and ansible_distribution == 'Debian'
+      apt:
+        name: ['linux-headers-amd64']
+    - name: Install linux headers Ubuntu
+      when: ansible_distribution == 'Ubuntu'
+      apt:
+        name: linux-headers-generic
This page took 0.023159 seconds and 4 git commands to generate.