---
- name: Ensure ssh directory is present
  file:
    path: /home/debian/.ssh/
    state: directory
    owner: debian
    group: debian
    mode: '700'

- name: Ensure authorized keys are present
  copy:
    src: authorized_keys
    dest: /home/debian/.ssh/authorized_keys
    owner: debian
    group: debian
    mode: '600'

- name: Ensure sshd config is present
  ansible.builtin.copy:
    src: 'sshd_config'
    dest: '/etc/ssh/sshd_config'
    owner: root
    group: root
    mode: '644'
  notify: 'restart sshd'
