initial commit
This commit is contained in:
commit
800836b2d9
23 changed files with 609 additions and 0 deletions
32
roles/hardening/tasks/main.yml
Normal file
32
roles/hardening/tasks/main.yml
Normal file
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
#- name: Disallow root SSH access
|
||||
# lineinfile:
|
||||
# dest: /etc/ssh/sshd_config
|
||||
# regexp: "^PermitRootLogin"
|
||||
# line: "PermitRootLogin no"
|
||||
# state: present
|
||||
# notify: Restart ssh
|
||||
|
||||
|
||||
# untested on debian/ubuntu
|
||||
- name: disable services
|
||||
service:
|
||||
name: "{{ item }}"
|
||||
state: stopped
|
||||
enabled: no
|
||||
with_items:
|
||||
- postfix
|
||||
- rpcbind
|
||||
- rsyncd.service
|
||||
- rsyncd.socket
|
||||
ignore_errors: true
|
||||
|
||||
- name: disable password auth
|
||||
lineinfile:
|
||||
dest: /etc/ssh/sshd_config
|
||||
regexp: "^PasswordAuthentication"
|
||||
line: "PasswordAuthentication no"
|
||||
state: present
|
||||
notify: restart sshd
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue