--- - name: Ensure destination for sshd_config exists ansible.builtin.file: path: "{{ openssh_sshd_config_path }}" mode: '0644' state: directory - name: Write sshd_config file ansible.builtin.template: src: sshd_config.j2 dest: "{{ openssh_sshd_config_path }}/sshd_config" mode: '0644' become: true notify: Restart sshd - name: Write banner file ansible.builtin.template: src: issue.net.j2 dest: "{{ openssh_banner_file }}" mode: '0644' when: openssh_banner