From 641358713b8d93c5241f0a6de832a64298a60e3f Mon Sep 17 00:00:00 2001 From: Vishal Singh <86524500+vishalsingh48@users.noreply.github.com> Date: Wed, 31 Jan 2024 11:38:42 +0000 Subject: [PATCH 1/2] Add debug task to check the auditd config file content --- .../tasks/type-files/ubuntu-18-type.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/roles/cis_security/tasks/type-files/ubuntu-18-type.yml b/roles/cis_security/tasks/type-files/ubuntu-18-type.yml index 4558b4c..f01c779 100644 --- a/roles/cis_security/tasks/type-files/ubuntu-18-type.yml +++ b/roles/cis_security/tasks/type-files/ubuntu-18-type.yml @@ -1479,6 +1479,22 @@ tags: - 4.1.1.1 + - name: 4.1.2.[1-2] - Get AuditD config + ansible.builtin.shell: cat /etc/audit/auditd.conf + register: auditd_conf + tags: + - 4.1.2.1 + - 4.1.2.2 + - 4.1.2.3 + + - name: 4.1.2.[1-2] - Print AuditD config + ansible.builtin.debug: + msg: "{{ auditd_conf.stdout | string }}" + tags: + - 4.1.2.1 + - 4.1.2.2 + - 4.1.2.3 + - name: 4.1.1.2 - Enable auditd service ansible.builtin.service: name: auditd From e3b93db80d35d848b606053471a4cb8c860b01e5 Mon Sep 17 00:00:00 2001 From: Vishal Singh <86524500+vishalsingh48@users.noreply.github.com> Date: Wed, 31 Jan 2024 13:16:38 +0000 Subject: [PATCH 2/2] update task to use command module --- roles/cis_security/tasks/type-files/ubuntu-18-type.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/cis_security/tasks/type-files/ubuntu-18-type.yml b/roles/cis_security/tasks/type-files/ubuntu-18-type.yml index f01c779..8966db6 100644 --- a/roles/cis_security/tasks/type-files/ubuntu-18-type.yml +++ b/roles/cis_security/tasks/type-files/ubuntu-18-type.yml @@ -1480,7 +1480,7 @@ - 4.1.1.1 - name: 4.1.2.[1-2] - Get AuditD config - ansible.builtin.shell: cat /etc/audit/auditd.conf + ansible.builtin.command: cat /etc/audit/auditd.conf register: auditd_conf tags: - 4.1.2.1