aboutsummaryrefslogblamecommitdiffstatshomepage
path: root/roles/sshd/tasks/main.yml
blob: ed60e75041a771f0d680ec348d8e2b823b29cbdb (plain) (tree)
1
2
3
4


                           
                       











                                  
- name: Configure sshd
  become: true
  ansible.builtin.template:
    src: sshd_config.j2
    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