Skip to content

Commit 5d95dc7

Browse files
authored
Merge pull request #810 from dev-sec/audit_name
Add variable to set name_format for auditd
2 parents b6d11a0 + f70a74f commit 5d95dc7

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

roles/os_hardening/defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ os_auditd_disk_error_action: SUSPEND
348348
os_auditd_action_mail_acct: root
349349
os_auditd_log_group: root
350350
os_auditd_num_logs: 5
351+
os_auditd_name_format: NONE
351352

352353
# Set the SELinux state, which can be either disabled, permissive, or enforcing.
353354
os_selinux_state: enforcing

roles/os_hardening/meta/argument_specs.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,16 @@ argument_specs:
207207
description: This keyword specifies the maximum file size in megabytes. When
208208
this limit is reached, it will trigger a configurable action. The value
209209
given must be numeric.
210+
os_auditd_name_format:
211+
default: NONE
212+
type: str
213+
description: This keyword specifies how computer node names are inserted
214+
into the audit event stream.
215+
choices:
216+
- NONE
217+
- hostname
218+
- fqd
219+
- numeric
210220
os_auditd_num_logs:
211221
default: 5
212222
type: int

roles/os_hardening/templates/etc/audit/auditd.conf.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ freq = {{ os_auditd_freq }}
1111
num_logs = {{ os_auditd_num_logs }}
1212
disp_qos = lossy
1313
dispatcher = /sbin/audispd
14-
name_format = NONE
14+
name_format = {{ os_auditd_name_format }}
1515
max_log_file = {{ os_auditd_max_log_file }}
1616
max_log_file_action = {{ os_auditd_max_log_file_action }}
1717
space_left = {{ os_auditd_space_left }}

0 commit comments

Comments
 (0)