File: ansible.template

package info (click to toggle)
scap-security-guide 0.1.76-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 110,644 kB
  • sloc: xml: 241,883; sh: 73,777; python: 32,527; makefile: 27
file content (57 lines) | stat: -rw-r--r-- 2,074 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# platform = multi_platform_rhel,multi_platform_fedora,multi_platform_ol,multi_platform_rhv,multi_platform_ubuntu,multi_platform_almalinux
# reboot = true
# strategy = restrict
# complexity = low
# disruption = low

#
# What architecture are we on?
#
- name: Set architecture for audit {{{ SYSCALL | join(", ") }}} tasks
  set_fact:
    audit_arch: "b64"
  when:
  - ansible_architecture == "aarch64" or
    ansible_architecture == "ppc64" or
    ansible_architecture == "ppc64le" or
    ansible_architecture == "s390x" or
    ansible_architecture == "x86_64"

- name: Perform remediation of Audit rules for {{{ SYSCALL | join(", ") }}} for 32bit platform
  block:
    {{{ ansible_audit_augenrules_add_syscall_rule(
      action_arch_filters="-a always,exit -F arch=b32",
      other_filters="-F "~POS~"&03 -F path="~PATH,
      auid_filters="-F auid>="~auid~" -F auid!=unset",
      syscalls=SYSCALL,
      key="modify",
      syscall_grouping=SYSCALL_GROUPING,
      )|indent(4) }}}
    {{{ ansible_audit_auditctl_add_syscall_rule(
      action_arch_filters="-a always,exit -F arch=b32",
      other_filters="-F "~POS~"&03 -F path="~PATH,
      auid_filters="-F auid>="~auid~" -F auid!=unset",
      syscalls=SYSCALL,
      key="modify",
      syscall_grouping=SYSCALL_GROUPING,
      )|indent(4) }}}

- name: Perform remediation of Audit rules for {{{ SYSCALL | join(", ") }}} for 64bit platform
  block:
    {{{ ansible_audit_augenrules_add_syscall_rule(
      action_arch_filters="-a always,exit -F arch=b64",
      other_filters="-F "~POS~"&03 -F path="~PATH,
      auid_filters="-F auid>="~auid~" -F auid!=unset",
      syscalls=SYSCALL,
      key="modify",
      syscall_grouping=SYSCALL_GROUPING,
      )|indent(4) }}}
    {{{ ansible_audit_auditctl_add_syscall_rule(
      action_arch_filters="-a always,exit -F arch=b64",
      other_filters="-F "~POS~"&03 -F path="~PATH,
      auid_filters="-F auid>="~auid~" -F auid!=unset",
      syscalls=SYSCALL,
      key="modify",
      syscall_grouping=SYSCALL_GROUPING,
      )|indent(4) }}}
  when: audit_arch == "b64"