---
# Forked from imaging/driving_os/roles/secure_sshd
- block:
  - name: Add custom welcome message
    copy:
      src: "ssh_welcome_message"
      dest: "/etc/ssh/sshd-banner"
      owner: root
      group: root
      mode: '644'
    notify: Restart sshd

  - name: Add trusted user ca keys
    copy:
      src: trusted_user_ca_public_key
      dest: "/etc/ssh/trusted_user_ca.pub"
      owner: root
      group: root
      mode: '644'
    notify: Restart sshd

  - name: Copy the sshd config file
    template:
      src:  sshd_config
      dest: /etc/ssh/sshd_config
      owner: root
      group: root
      mode: '600'
    notify: Restart sshd

  - meta: flush_handlers
  become: yes
