Commit de09a75c authored by nanahira's avatar nanahira

missing

parent 49431a71
- name: disable password access
become: true
lineinfile:
path: /etc/ssh/sshd_config
regexp: '^#?PasswordAuthentication (true|yes).*$'
line: 'PasswordAuthentication no'
backrefs: true
when: "(ansible_user_id == 'root' or ansible_user_id == 'nanahira' or ansible_user_id == 'mycard' or ansible_user_id == 'zh99998') and not allow_password is defined" # Only self-managed servers
notify: restart_sshd
- name: sshd config
become: true
lineinfile:
path: /etc/ssh/sshd_config
regexp: '^#?GSSAPIAuthentication (true|yes).*$'
line: 'GSSAPIAuthentication no'
backrefs: true
notify: restart_sshd
- name: sshd config
become: true
lineinfile:
path: /etc/ssh/sshd_config
regexp: '^#?UseDNS (true|yes).*$'
line: 'UseDNS no'
backrefs: true
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment