aboutsummaryrefslogblamecommitdiffstatshomepage
path: root/roles/sshd/tasks/main.yml
blob: d31ac794cea126336fabc24f3fdf9d32d89abd03 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                  
- name: Configure sshd
  become: true
  ansible.builtin.template:
    src: sshd_config
    dest: /etc/ssh/sshd_config
    owner: root
    group: root
    mode: '644'
  register: sshd_config

- name: Restart sshd
  become: true
  ansible.builtin.systemd_service:
    name: sshd
    state: restarted
  when: sshd_config.changed