Skip to content
Snippets Groups Projects
Commit 7c54ee6f authored by nimrod's avatar nimrod
Browse files

- Add lock_root tasks file.

parent eb4f27bd
No related branches found
No related tags found
No related merge requests found
......@@ -13,3 +13,8 @@
service:
name: syslogd
state: restarted
- name: Restart ssh
service:
name: ssh
state: restarted
---
- name: Disable root account
user:
name: root
expires: 1
- name: Disable root SSH login
lineinfile:
dest: /etc/ssh/sshd_config
line: 'PermitRootLogin no'
regexp: '^PermitRootLogin '
notify:
- Restart ssh
......@@ -45,3 +45,6 @@
- include: unattended_upgrades.yml
when: unattended_upgrades|default(True) and ansible_os_family == 'Debian'
- include: lock_root.yml
when: lock_root|default(True)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment