Skip to content

Commit 7e6e43e

Browse files
authored
Merge pull request #657 from dev-sec/min_ansible_ver
2 parents b79eb83 + eb47f4d commit 7e6e43e

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

Diff for: roles/os_hardening/handlers/main.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
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

Diff for: roles/os_hardening/meta/main.yml

+1-1
Original file line numberDiff line numberDiff 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:

Diff for: roles/os_hardening/tasks/limits.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
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

@@ -45,7 +45,7 @@
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

Diff for: roles/os_hardening/tasks/user_accounts.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
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
@@ -100,7 +100,7 @@
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

Diff for: roles/ssh_hardening/tasks/hardening.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
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

Diff for: roles/ssh_hardening/tasks/selinux.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
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

0 commit comments

Comments
 (0)