1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 19:52:06 +00:00
iiab/roles/sshd/tasks/main.yml

19 lines
491 B
YAML
Raw Normal View History

2017-05-27 18:09:50 +00:00
- name: Disable root login with password
lineinfile: dest=/etc/ssh/sshd_config
regexp='^PermitRootLogin'
line='PermitRootLogin without-password'
state=present
#TODO: use handler to reload ssh
- name: Enable sshd
service: name={{ sshd_service }}
enabled=yes
state=started
when: sshd_enabled
- name: Disable sshd
service: name={{ sshd_service }}
enabled=no
state=stopped
when: not sshd_enabled