Skip to content

Commit

Permalink
Use complete names in ansible modules
Browse files Browse the repository at this point in the history
Signed-off-by: Edgar Aguilar <edgar.aguilar@oracle.com>
  • Loading branch information
Xeicker committed May 25, 2023
1 parent a291d8b commit 055bfad
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@
{{% set rx_end = "(?:-k[\s]+|-F[\s]+key=)[\S]+[\s]*$" %}}

- name: Service facts
service_facts:
ansible.builtin.service_facts:

- name: Check the rules script being used
command:
ansible.builtin.command:
grep '^ExecStartPost' /usr/lib/systemd/system/auditd.service
register: check_rules_scripts_result
changed_when: false
failed_when: false

- name: Set suid_audit_rules fact
set_fact:
ansible.builtin.set_fact:
suid_audit_rules:
- rule: '-a always,exit -F arch=b32 -S execve -C gid!=egid{{{ egid_arg }}} -k setgid'
regex: {{{ rx_beg + rx_b32 + rx_gid + rx_end }}}
Expand Down Expand Up @@ -70,12 +70,12 @@
with_items: "{{ suid_audit_rules }}"
{{%- if product in ['sle12', 'sle15'] %}}
- name: Restart auditd.service
systemd:
ansible.builtin.systemd:
name: auditd.service
state: restarted
{{%- else %}} # restarting auditd through systemd doesn't work, see: https://access.redhat.com/solutions/5515011
- name: Restart Auditd
command: /usr/sbin/service auditd restart
ansible.builtin.command: /usr/sbin/service auditd restart
{{%- endif %}}
when:
- (augenrules_audit_rules_privilege_function_update_result.changed or
Expand Down

0 comments on commit 055bfad

Please sign in to comment.