From 7243cb3ea16c05b93b1fe850d993ad6c5dd29951 Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Tue, 7 Nov 2017 10:27:18 +0000 Subject: [PATCH] lingering improvements --- tasks/linger.yml | 2 ++ tasks/main.yml | 2 ++ tasks/setup_Debian.yml | 7 +++++++ 3 files changed, 11 insertions(+) create mode 100644 tasks/setup_Debian.yml diff --git a/tasks/linger.yml b/tasks/linger.yml index 7aa6993..8413e44 100644 --- a/tasks/linger.yml +++ b/tasks/linger.yml @@ -5,6 +5,8 @@ path: /var/lib/systemd/linger/{{item}} register: _users_systemd_linger_stat with_items: "{{ users.keys() }}" + when: + - users[item].linger is defined - name: set systemd lingering command: diff --git a/tasks/main.yml b/tasks/main.yml index c5bc5b6..c1e9891 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,5 +1,7 @@ --- +- include: setup_{{ansible_os_family}}.yml + - include: user_groups.yml when: user_groups is defined diff --git a/tasks/setup_Debian.yml b/tasks/setup_Debian.yml new file mode 100644 index 0000000..6032363 --- /dev/null +++ b/tasks/setup_Debian.yml @@ -0,0 +1,7 @@ +--- + +- name: install debian packages + package: + name: "{{ item }}" + with_items: + - dbus