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: