File tree 6 files changed +9
-9
lines changed
6 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- - name : Update-initramfs
2
+ - name : Update-initramfs # noqa no-changed-when
3
3
ansible.builtin.command : update-initramfs -u
4
4
5
- - name : Restart auditd # noqa command-instead-of-module
5
+ - name : Restart auditd # noqa command-instead-of-module no-changed-when
6
6
ansible.builtin.command :
7
7
cmd : service auditd restart # rhel: see: https://access.redhat.com/solutions/2664811
8
8
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:
4
4
description : This Ansible role provides numerous security-related ssh configurations, providing all-round base protection.
5
5
company : Hardening Framework Team
6
6
license : Apache License 2.0
7
- min_ansible_version : 2.9.10
7
+ min_ansible_version : " 2.11 "
8
8
platforms :
9
9
- name : EL
10
10
versions :
Original file line number Diff line number Diff line change 35
35
path : /etc/systemd/coredump.conf.d
36
36
owner : root
37
37
group : root
38
- mode : 0755
38
+ mode : " 0755"
39
39
state : directory
40
40
when : ansible_service_mgr == "systemd"
41
41
45
45
dest : /etc/systemd/coredump.conf.d/custom.conf
46
46
owner : root
47
47
group : root
48
- mode : 0644
48
+ mode : " 0644"
49
49
when : ansible_service_mgr == "systemd"
50
50
notify : Reload systemd
51
51
Original file line number Diff line number Diff line change 53
53
54
54
- name : Set ownership of root user home directory(s) to 0700
55
55
ansible.builtin.file :
56
- mode : 0700
56
+ mode : " 0700"
57
57
owner : " {{ item }}"
58
58
path : " {{ getent_passwd[item][4] }}"
59
59
state : directory
100
100
101
101
- name : Limit access to home directories of regular (non-system, non-root) accounts
102
102
ansible.builtin.file :
103
- mode : 0700
103
+ mode : " 0700"
104
104
owner : " {{ item }}"
105
105
path : " {{ getent_passwd[item][4] }}"
106
106
state : directory
Original file line number Diff line number Diff line change 100
100
check_mode : false
101
101
when : ssh_server_hardening | bool
102
102
103
- - name : Remove all small primes
103
+ - name : Remove all small primes # noqa no-changed-when
104
104
ansible.builtin.shell : >
105
105
awk '$5 >= {{ sshd_moduli_minimum }}' {{ sshd_moduli_file }} > {{ sshd_moduli_file }}.new ; [ -r {{ sshd_moduli_file }}.new
106
106
-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 57
57
# The following tasks only get executed when selinux is installed, UsePam is
58
58
# 'yes' and the ssh_password module is installed. See
59
59
# 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
61
61
ansible.builtin.command : semodule -r ssh_password
62
62
when :
63
63
- ssh_use_pam | bool
You can’t perform that action at this time.
0 commit comments