File tree Expand file tree Collapse file tree 16 files changed +38
-0
lines changed
auditing/auditd_configure_rules
directory_permissions_var_log_audit/ansible
file_group_ownership_var_log_audit/ansible
file_ownership_var_log_audit_stig/ansible
file_permissions_var_log_audit/ansible
accounts-pam/locking_out_password_attempts/account_password_selinux_faillock_dir/ansible
accounts-restrictions/password_expiration
accounts_password_set_max_life_existing/ansible
accounts_password_set_min_life_existing/ansible
accounts-session/accounts_user_dot_no_world_writable_programs/ansible
ensure_rsyslog_log_file_configuration/rsyslog_cron_logging/ansible
ensure_rtc_utc_configuration/ansible
network/network-nftables/set_nftables_loopback_traffic/ansible
software/integrity/software-integrity/aide
aide_verify_ext_attributes/ansible Expand file tree Collapse file tree 16 files changed +38
-0
lines changed Original file line number Diff line number Diff line change 88 ansible.builtin.command : grep -iw ^log_file /etc/audit/auditd.conf
99 check_mode : False
1010 failed_when : false
11+ changed_when : false
1112 register : log_file_exists
1213
1314- name : " {{{ rule_title }}} - Set audit log file fact"
2829 ansible.builtin.command : grep -iw ^log_group /etc/audit/auditd.conf
2930 check_mode : False
3031 failed_when : false
32+ changed_when : false
3133 register : log_group_exists
3234
3335- name : " {{{ rule_title }}} - Set audit log directory mode to 0700"
Original file line number Diff line number Diff line change 77- name : " {{{ rule_title }}} - Get Audit Log Files"
88 ansible.builtin.command : grep -iw ^log_file /etc/audit/auditd.conf
99 failed_when : false
10+ changed_when : false
11+ check_mode : false
1012 register : log_file_exists
1113
1214- name : " {{{ rule_title }}} - Set Log File Facts"
3335- name : " {{{ rule_title }}} - Get Audit Log Group"
3436 ansible.builtin.command : grep -iw ^log_group /etc/audit/auditd.conf
3537 failed_when : false
38+ changed_when : false
39+ check_mode : false
3640 register : log_group_exists
3741
3842- name : " {{{ rule_title }}} - Set Log Group Facts"
Original file line number Diff line number Diff line change 88 ansible.builtin.command : grep -iw ^log_file /etc/audit/auditd.conf
99 check_mode : False
1010 failed_when : false
11+ changed_when : false
1112 register : log_file_exists
1213
1314- name : " {{{ rule_title }}} - Set audit log file fact"
Original file line number Diff line number Diff line change 77- name : Get audit log files
88 ansible.builtin.command : grep -iw ^log_file /etc/audit/auditd.conf
99 failed_when : false
10+ changed_when : false
11+ check_mode : false
1012 register : log_file_exists
1113
1214- name : Parse log file line
1315 ansible.builtin.command : awk -F '=' '/^log_file/ {print $2}' /etc/audit/auditd.conf
1416 register : log_file_line
17+ changed_when : false
18+ check_mode : false
1519 when : log_file_exists is not skipped and (log_file_exists.stdout | length > 0)
1620
1721- name : Set default log_file if not set
2832- name : Get log files group
2933 ansible.builtin.command : grep -m 1 ^log_group /etc/audit/auditd.conf
3034 failed_when : false
35+ changed_when : false
36+ check_mode : false
3137 register : log_group_line
3238
3339- name : Parse log group line
3440 ansible.builtin.command : awk -F '=' '/log_group/ {print $2}' /etc/audit/auditd.conf
41+ changed_when : false
42+ check_mode : false
3543 register : log_group
3644 when : (log_group_line is not skipped) and (log_group_line.stdout | length > 0)
3745
Original file line number Diff line number Diff line change 88 ansible.builtin.shell : |-
99 grep -oP '^\s*(?:auth.*pam_faillock.so.*)?dir\s*=\s*(\S+)' "{{ item }}" | sed -r 's/.*=\s*(\S+)/\1/'
1010 register : faillock_output
11+ changed_when : false
12+ check_mode : false
1113 with_items :
1214 - /etc/security/faillock.conf
1315 {{% if 'ol' not in families %}}
Original file line number Diff line number Diff line change 99 ansible.builtin.command :
1010 cmd : awk -F':' '(/^[^:]+:[^!*]/ && ($5 > {{ var_accounts_maximum_age_login_defs }} || $5 == "")) {print $1}' /etc/shadow
1111 register : user_names
12+ changed_when : false
13+ check_mode : false
1214
1315- name : Change the maximum time period between password changes
1416{{% if product in ["ol7"] %}}
Original file line number Diff line number Diff line change 1010 ansible.builtin.command : >
1111 awk -F':' '(/^[^:]+:[^!*]/ && ($4 < {{ var_accounts_minimum_age_login_defs }} || $4 == "")) {print $1}' /etc/shadow
1212 register : user_names
13+ changed_when : false
14+ check_mode : false
1315
1416- name : Change the minimum time period between password changes
1517{{% if product in ["sle12", "sle15", "slmicro6"] %}}
Original file line number Diff line number Diff line change 2424 ansible.builtin.shell : |
2525 find / -xdev -type f -perm -0002 2> /dev/null
2626 register : world_writable_files
27+ changed_when : false
28+ check_mode : false
2729
2830- name : {{{ rule_title }}} - Find referenced_files in init files
2931 ansible.builtin.find :
Original file line number Diff line number Diff line change 1212 {{% endif %}}
1313 register : cron_log_config_exists
1414 failed_when : false
15+ changed_when : false
16+ check_mode : false
1517
1618- name : " {{{ rule_title }}} - Ensure the /etc/rsyslog.d directory exists"
1719 ansible.builtin.file :
Original file line number Diff line number Diff line change 55 timedatectl status | grep -i 'Time zone'| grep -iv 'UTC\|GMT' || true
66 register : check_tz
77 failed_when : " check_tz.rc not in [ 0 , 1 ]"
8+ changed_when : false
9+ check_mode : false
810
911- name : Configure OS to use 'UTC' timezone
1012 ansible.builtin.command : timedatectl set-timezone UTC
You can’t perform that action at this time.
0 commit comments