Commit 8f8c258a authored by Rafael Monnerat's avatar Rafael Monnerat

playbook: Fix restart of ssh services on multiple distros

parent f06e6c63
---
- name: restart ssh
service: name=ssh state=restarted
- name: restart ssh
service: name=ssh state=restarted
when: ansible_os_family == "Debian"
- name: restart sshd
service: name=sshd state=restarted
when: ansible_os_family == "RedHat"
......@@ -25,8 +25,10 @@
lineinfile: dest=/etc/ssh/sshd_config regexp="^PermitRootLogin (?!no)" line="PermitRootLogin no"
notify:
- restart ssh
- restart sshd
- name: update /etc/ssh/sshd_config
lineinfile: dest=/etc/ssh/sshd_config line="PermitRootLogin no"
notify:
- restart ssh
- restart sshd
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