- name: sshd yaml hosts: all become: true gather_facts: false tasks: - name: sshd is installed yum: name: openssh-server state: latest - name: sshd is enabled and started service: name: sshd state: started enabled: yes - name: banner lineinfile: path: /etc/ssh/sshd_config line: 'Banner /etc/motd' - name: X11Fordw lineinfile: path: /etc/ssh/sshd_config line: 'X11Forwarding yes' - name: MaxAuthTries lineinfile: path: /etc/ssh/sshd_config line: 'MaxAuthTries 3'