diff --git a/ansible/inventory/host_vars/lab.yaml b/ansible/inventory/host_vars/lab.yaml index f45dca3..8cb132e 100644 --- a/ansible/inventory/host_vars/lab.yaml +++ b/ansible/inventory/host_vars/lab.yaml @@ -3,7 +3,7 @@ # connection ansible_user: ladmin -ansible_become_user: ladmin +ansible_become_user: root ansible_os_family: Arch # sshd diff --git a/ansible/roles/sshd/handlers/main.yml b/ansible/roles/sshd/handlers/main.yml index ea8be4f..68967ed 100644 --- a/ansible/roles/sshd/handlers/main.yml +++ b/ansible/roles/sshd/handlers/main.yml @@ -3,7 +3,4 @@ - name: restart openssh ansible.builtin.service: name: "{{ openssh_service }}" - state: restarted - when: - - not ansible_check_mode - - not openssh_restart_immediately \ No newline at end of file + state: restarted \ No newline at end of file diff --git a/ansible/roles/sshd/tasks/main.yml b/ansible/roles/sshd/tasks/main.yml index dbdae16..a63ba3b 100644 --- a/ansible/roles/sshd/tasks/main.yml +++ b/ansible/roles/sshd/tasks/main.yml @@ -36,6 +36,4 @@ enabled: yes - name: flush handlers - ansible.builtin.meta: flush_handlers - when: - - openssh_restart_immediately \ No newline at end of file + ansible.builtin.meta: flush_handlers \ No newline at end of file