File tree Expand file tree Collapse file tree 6 files changed +9
-9
lines changed Expand file tree Collapse file tree 6 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 11---
2- - name : Update-initramfs
2+ - name : Update-initramfs # noqa no-changed-when
33 ansible.builtin.command : update-initramfs -u
44
5- - name : Restart auditd # noqa command-instead-of-module
5+ - name : Restart auditd # noqa command-instead-of-module no-changed-when
66 ansible.builtin.command :
77 cmd : service auditd restart # rhel: see: https://access.redhat.com/solutions/2664811
88 when : molecule_yml.driver.name | default() != "docker" # restarting auditd in a container does not work
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ galaxy_info:
44 description : This Ansible role provides numerous security-related ssh configurations, providing all-round base protection.
55 company : Hardening Framework Team
66 license : Apache License 2.0
7- min_ansible_version : 2.9.10
7+ min_ansible_version : " 2.11 "
88 platforms :
99 - name : EL
1010 versions :
Original file line number Diff line number Diff line change 3535 path : /etc/systemd/coredump.conf.d
3636 owner : root
3737 group : root
38- mode : 0755
38+ mode : " 0755"
3939 state : directory
4040 when : ansible_service_mgr == "systemd"
4141
4545 dest : /etc/systemd/coredump.conf.d/custom.conf
4646 owner : root
4747 group : root
48- mode : 0644
48+ mode : " 0644"
4949 when : ansible_service_mgr == "systemd"
5050 notify : Reload systemd
5151
Original file line number Diff line number Diff line change 5353
5454- name : Set ownership of root user home directory(s) to 0700
5555 ansible.builtin.file :
56- mode : 0700
56+ mode : " 0700"
5757 owner : " {{ item }}"
5858 path : " {{ getent_passwd[item][4] }}"
5959 state : directory
100100
101101- name : Limit access to home directories of regular (non-system, non-root) accounts
102102 ansible.builtin.file :
103- mode : 0700
103+ mode : " 0700"
104104 owner : " {{ item }}"
105105 path : " {{ getent_passwd[item][4] }}"
106106 state : directory
Original file line number Diff line number Diff line change 100100 check_mode : false
101101 when : ssh_server_hardening | bool
102102
103- - name : Remove all small primes
103+ - name : Remove all small primes # noqa no-changed-when
104104 ansible.builtin.shell : >
105105 awk '$5 >= {{ sshd_moduli_minimum }}' {{ sshd_moduli_file }} > {{ sshd_moduli_file }}.new ; [ -r {{ sshd_moduli_file }}.new
106106 -a -s {{ sshd_moduli_file }}.new ] && mv {{ sshd_moduli_file }}.new {{ sshd_moduli_file }} || true
Original file line number Diff line number Diff line change 5757# The following tasks only get executed when selinux is installed, UsePam is
5858# 'yes' and the ssh_password module is installed. See
5959# http://danwalsh.livejournal.com/12333.html for more info
60- - name : Remove selinux-policy when Pam is used, because Allowing sshd to read the shadow file directly is considered a potential security risk
60+ - name : Remove selinux-policy when PAM is used, because allowing sshd to read the shadow file is considered a security risk # noqa no-changed-when
6161 ansible.builtin.command : semodule -r ssh_password
6262 when :
6363 - ssh_use_pam | bool
You can’t perform that action at this time.
0 commit comments