From 0430b9a016716bef6cd9d2aa334d262cb310497e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gardais=20J=C3=A9r=C3=A9my?= Date: Fri, 8 Sep 2017 09:15:05 +0200 Subject: [PATCH] Ensure to restart `systemd-logind` to avoid 'Failed to create session' error (fix #4). --- CHANGELOG.md | 1 + README.md | 1 + handlers/main.yml | 5 +++++ tasks/main.yml | 2 ++ 4 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d0dab52..eef707e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ### Fix * For Debian Stretch ensure to also install `ca-certificates` (fix #2). * Ensure to add only one time the sudoers line in `/etc/nsswitch.conf` file (fix #3). +* Ensure to restart `systemd-logind` to avoid 'Failed to create session' error (fix #4). ## v1.1.1 diff --git a/README.md b/README.md index 0f6d390..a2efd98 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,7 @@ This role will : * Create an additional configuration file to only store the bind_password (`/etc/sssd/conf.d/domain.bind.conf`). * Remove `sss` directive for `sudoers` in `/etc/nsswitch.conf` file. * Manage `sssd` service. +* Restart `systemd-logind` service. ## Development diff --git a/handlers/main.yml b/handlers/main.yml index 534bcb1..b76463a 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -4,3 +4,8 @@ service: name: '{{ sssd_service_name }}' state: restarted + +- name: restart logind + service: + name: systemd-logind + state: restarted diff --git a/tasks/main.yml b/tasks/main.yml index bac5173..ed69ec1 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -39,6 +39,7 @@ when: sssd_conf_manage notify: - restart sssd + - restart logind - name: "CONFIG conf.d/{{ sssd_domain }}.conf" blockinfile: @@ -55,6 +56,7 @@ when: sssd_conf_manage notify: - restart sssd + - restart logind - name: Ensure home directories are created upon login with pam lineinfile: