don't install dbus snd pam-systemd on non-systemd hosts
authorChristian Pointner <equinox@realraum.at>
Sat, 1 Apr 2017 02:06:29 +0000 (04:06 +0200)
committerChristian Pointner <equinox@realraum.at>
Sat, 1 Apr 2017 02:06:29 +0000 (04:06 +0200)
roles/base/tasks/main.yaml

index 02c1682..f93e286 100644 (file)
@@ -42,8 +42,6 @@
     - mtr-tiny
     - tcpdump
     - debian-goodies
-    - dbus
-    - libpam-systemd
     - lsof
     - haveged
     - ntp
     - file
     - zsh
 
+- name: install systemd specific packages
+  apt: name={{ item }} state=present
+  with_items:
+    - dbus
+    - libpam-systemd
+  when: ansible_service_mgr == "systemd"
+
 - name: install zshrc
   copy: src={{ item.src }} dest={{ item.dest }} mode=0640
   with_items: