diff --git a/tasks/main.yml b/tasks/main.yml index 4cf826fde6aef01ab72c79d5cb81730154e19fd5..9d9b3b0e1192ff564a6524d01b5abfb95122d896 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,9 +1,10 @@ --- - name: Override existing sshd_config file - ansible.builtin.file: - path: /etc/ssh/sshd_config + ansible.builtin.copy: src: etc/ssh/sshd_config - mode: 0644 + dest: /etc/ssh/sshd_config + mode: 0644 # u=rw,g=r,o=r owner: root group: root - notify: sshd-restart \ No newline at end of file + notify: sshd-restart + become: true \ No newline at end of file