- name: Protocol 2 lineinfile: path: /etc/ssh/sshd_config regexp: '^\s*Protocol\s+2' # insertbefore: '^\s*Match' insertbefore: BOF state: 'present' line: 'Protocol 2' - name: UseDNS no lineinfile: path: /etc/ssh/sshd_config regexp: '^\s*UseDNS\s+no' # insertbefore: '^\s*Match' insertbefore: BOF state: 'present' line: 'UseDNS no' - name: PermitEmptyPasswords no lineinfile: path: /etc/ssh/sshd_config regexp: '^\s*PermitEmptyPasswords\s+no' # insertbefore: '^\s*Match' insertbefore: BOF state: 'present' line: 'PermitEmptyPasswords no' - name: PermitRootLogin without-password lineinfile: path: /etc/ssh/sshd_config regexp: '^\s*PermitRootLogin\s+without-password' # insertbefore: '^\s*Match' insertbefore: BOF state: 'present' line: 'PermitRootLogin without-password'