Commit e1c2bc16 authored by nanahira's avatar nanahira

add permit root login

parent 31595d95
...@@ -7,6 +7,13 @@ ...@@ -7,6 +7,13 @@
backrefs: true 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" # Only self-managed servers when: "(ansible_user_id == 'root' or ansible_user_id == 'nanahira' or ansible_user_id == 'mycard' or ansible_user_id == 'zh99998') and not allow_password" # Only self-managed servers
notify: restart_sshd notify: restart_sshd
- name: permit root login
lineinfile:
path: /etc/ssh/sshd_config
regexp: '^#?PermitRootLogin (no|false|prohibit-password).*$'
line: 'PermitRootLogin yes'
backrefs: true
when: "ansible_user_id == 'root' and allow_password"
- name: sshd config GSSAPIAuthentication - name: sshd config GSSAPIAuthentication
become: true become: true
lineinfile: lineinfile:
......
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