]> arthur.barton.de Git - AnsibleRoles.git/blobdiff - roles/debian-base/tasks/main.yml
Apt module: Update "state=installed" to "state=present"
[AnsibleRoles.git] / roles / debian-base / tasks / main.yml
index f77af106e93926ce402752cadee00d94b769e2c7..4c6f6c0f608657f31d4f6b6d620ed79841c78251 100644 (file)
@@ -5,11 +5,10 @@
   tags:
     - packages
   apt: >
-    state=installed
+    state=present
     name={{ item }}
   with_items:
     - bash-completion
-    - busybox-static
     - ca-certificates
     - curl
     - debconf-utils
     - telnet-ssl
     - vim
 
-- name: install Linux kernel packages (amd64)
+- name: install common packages (non Proxmox-VE hosts)
+  tags:
+    - packages
+  apt: >
+    state=present
+    name={{ item }}
+  with_items:
+    - busybox-static
+  when: "ansible_kernel.find('pve') < 1"
+
+- name: install Linux kernel packages (amd64; non Proxmox-VE hosts, non OpenVZ guest)
   tags:
     - packages
   apt: >
-    state=installed
+    state=present
     name=linux-image-amd64
-  when: "ansible_architecture == 'x86_64'"
+  when: "ansible_architecture == 'x86_64' and ansible_kernel.find('pve') < 1 and ansible_virtualization_type != 'openvz'"
 
-- name: install Linux kernel packages (i386)
+- name: install Linux kernel packages (i386; non Proxmox-VE hosts, non OpenVZ guest)
   tags:
     - packages
   apt: >
-    state=installed
+    state=present
     name=linux-image-686-pae
-  when: "ansible_architecture == 'i386'"
+  when: "ansible_architecture == 'i386' and ansible_kernel.find('pve') < 1 and ansible_virtualization_type != 'openvz'"