Created
September 30, 2015 06:30
-
-
Save huangyg11/2ff2f11fc393eef27f88 to your computer and use it in GitHub Desktop.
ansible playbook. disable ssh key auth
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: all | |
tasks: | |
- name: disable ssh key auth | |
lineinfile: | |
dest: /etc/ssh/sshd_config | |
regexp: ^PasswordAuthentication | |
line: PasswordAuthentication no | |
notify: | |
restart ssh | |
handlers: | |
- name: restart ssh | |
service: | |
name: sshd | |
state: restarted |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment