]> 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 326bb6c5fab1dd6a7907e7adbe17a337d9d06166..4c6f6c0f608657f31d4f6b6d620ed79841c78251 100644 (file)
@@ -1,66 +1,14 @@
 ---
-# debian-base tasks
-
-- name: 'apt(8): Disable "package diffs"'
-  tags:
-    - apt
-    - packages
-  lineinfile: >
-    create=yes
-    dest=/etc/apt/apt.conf
-    group=root
-    line='Acquire::PDiffs "false";'
-    mode=644
-    owner=root
-
-- name: "aptitude(8): Don't install recommended packages by default"
-  tags:
-    - apt
-    - packages
-  lineinfile: >
-    create=yes
-    dest=/root/.aptitude/config
-    group=root
-    line='Apt::Install-Recommends "false";'
-    owner=root
-
-- name: update APT repositories (when outdated)
-  tags:
-    - apt
-    - packages
-  apt: >
-    update_cache=yes
-    cache_valid_time=3600
-
-- name: configure debconf(1) frontend
-  tags:
-    - debconf
-    - packages
-  debconf: >
-    name=debconf
-    question=debconf/frontend
-    value=Dialog
-    vtype=select
-
-- name: configure debconf(1) priority
-  tags:
-    - debconf
-    - packages
-  debconf: >
-    name=debconf
-    question=debconf/priority
-    value=low
-    vtype=select
+# tasks file for debian-base
 
 - name: install common packages
   tags:
     - packages
   apt: >
-    state=installed
+    state=present
     name={{ item }}
   with_items:
     - bash-completion
-    - busybox-static
     - ca-certificates
     - curl
     - debconf-utils
@@ -68,7 +16,6 @@
     - git
     - htop
     - less
-    - linux-image-amd64
     - lsb-base
     - lsb-release
     - psmisc
     - sudo
     - telnet-ssl
     - vim
+
+- 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=present
+    name=linux-image-amd64
+  when: "ansible_architecture == 'x86_64' and ansible_kernel.find('pve') < 1 and ansible_virtualization_type != 'openvz'"
+
+- name: install Linux kernel packages (i386; non Proxmox-VE hosts, non OpenVZ guest)
+  tags:
+    - packages
+  apt: >
+    state=present
+    name=linux-image-686-pae
+  when: "ansible_architecture == 'i386' and ansible_kernel.find('pve') < 1 and ansible_virtualization_type != 'openvz'"