25 lines
740 B
YAML
25 lines
740 B
YAML
---
|
|
|
|
- name: Configure ssh-server daemon
|
|
ansible.builtin.copy:
|
|
src: "{{ role_path }}/files/hardened_sshd.conf"
|
|
dest: /etc/ssh/sshd_config.d/hardened_sshd.conf
|
|
mode: u=rw,g=r,o=r
|
|
notify: restart ssh-server
|
|
when: ansible_facts['distribution'] == 'Ubuntu'
|
|
|
|
- name: Configure ssh-server daemon
|
|
ansible.builtin.copy:
|
|
src: "{{ role_path }}/files/hardened_sshd.conf"
|
|
dest: /etc/ssh/sshd_config.d/hardened_sshd.conf
|
|
mode: u=rw,g=r,o=r
|
|
notify: restart sshd-server
|
|
when: ansible_facts['distribution'] == 'Debian'
|
|
|
|
- name: Configure ssh client
|
|
remote_user: ansible
|
|
ansible.builtin.copy:
|
|
src: "{{ role_path }}/files/hardened_ssh.conf"
|
|
dest: /etc/ssh/ssh_config.d/hardened_ssh.conf
|
|
mode: u=rw,g=r,o=r
|