From 61b343b7f04e127fba1983d79086ff9e5a717ec5 Mon Sep 17 00:00:00 2001 From: L3D Date: Thu, 8 Aug 2024 16:33:35 +0200 Subject: [PATCH] Change SSHD restart CLOSE https://github.com/roles-ansible/ansible_collection_users/issues/27 --- roles/sshd/handlers/main.yml | 4 ++-- roles/sshd/tasks/main.yml | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/roles/sshd/handlers/main.yml b/roles/sshd/handlers/main.yml index d4db2cb..6efa2a6 100644 --- a/roles/sshd/handlers/main.yml +++ b/roles/sshd/handlers/main.yml @@ -3,6 +3,6 @@ become: true listen: 'systemctl restart sshd' ansible.builtin.systemd: - name: "{{ l3d_users__sshd_service }}" + name: "{{ l3d_users__sshd_service | default(sshd) }}" state: restarted - when: l3d_users__sshd__service is defined and ansible_service_mgr == 'systemd' + when: nsible_service_mgr == 'systemd' diff --git a/roles/sshd/tasks/main.yml b/roles/sshd/tasks/main.yml index 16a03e1..2f42210 100644 --- a/roles/sshd/tasks/main.yml +++ b/roles/sshd/tasks/main.yml @@ -5,7 +5,8 @@ when: submodules_versioncheck | bool - name: Load l3d_users_sshd_service variable - ansible.builtin.include_vars: "{{ lookup('first_found', l3d_users_sshd__service_var_path) }}" + ansible.builtin.include_vars: + file: "{{ lookup('first_found', l3d_users_sshd__service_var_path) }}" - name: Install openssh server ansible.builtin.include_tasks: