From abd99426b8ebeaff76b81dac13f65bc0607da7c7 Mon Sep 17 00:00:00 2001 From: Mark Bolwell Date: Thu, 26 Jan 2023 09:31:27 +0000 Subject: [PATCH] replaced dest for path on file module Signed-off-by: Mark Bolwell --- tasks/section_1/cis_1.7.x.yml | 6 +++--- tasks/section_5/cis_5.1.x.yml | 20 ++++++++++---------- tasks/section_6/cis_6.1.x.yml | 16 ++++++++-------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/tasks/section_1/cis_1.7.x.yml b/tasks/section_1/cis_1.7.x.yml index 9848bea..1c20dca 100644 --- a/tasks/section_1/cis_1.7.x.yml +++ b/tasks/section_1/cis_1.7.x.yml @@ -49,7 +49,7 @@ - name: "1.7.4 | PATCH | Ensure permissions on /etc/motd are configured" ansible.builtin.file: - dest: /etc/motd + path: /etc/motd owner: root group: root mode: 0644 @@ -64,7 +64,7 @@ - name: "1.7.5 | PATCH | Ensure permissions on /etc/issue are configured" ansible.builtin.file: - dest: /etc/issue + path: /etc/issue owner: root group: root mode: 0644 @@ -79,7 +79,7 @@ - name: "1.7.6 | PATCH | Ensure permissions on /etc/issue.net are configured" ansible.builtin.file: - dest: /etc/issue.net + path: /etc/issue.net owner: root group: root mode: 0644 diff --git a/tasks/section_5/cis_5.1.x.yml b/tasks/section_5/cis_5.1.x.yml index 9edc7c7..f897c6c 100644 --- a/tasks/section_5/cis_5.1.x.yml +++ b/tasks/section_5/cis_5.1.x.yml @@ -15,7 +15,7 @@ - name: "5.1.2 | PATCH | Ensure permissions on /etc/crontab are configured" ansible.builtin.file: - dest: /etc/crontab + path: /etc/crontab owner: root group: root mode: 0600 @@ -30,7 +30,7 @@ - name: "5.1.3 | PATCH | Ensure permissions on /etc/cron.hourly are configured" ansible.builtin.file: - dest: /etc/cron.hourly + path: /etc/cron.hourly state: directory owner: root group: root @@ -46,7 +46,7 @@ - name: "5.1.4 | PATCH | Ensure permissions on /etc/cron.daily are configured" ansible.builtin.file: - dest: /etc/cron.daily + path: /etc/cron.daily state: directory owner: root group: root @@ -62,7 +62,7 @@ - name: "5.1.5 | PATCH | Ensure permissions on /etc/cron.weekly are configured" ansible.builtin.file: - dest: /etc/cron.weekly + path: /etc/cron.weekly state: directory owner: root group: root @@ -77,7 +77,7 @@ - name: "5.1.6 | PATCH | Ensure permissions on /etc/cron.monthly are configured" ansible.builtin.file: - dest: /etc/cron.monthly + path: /etc/cron.monthly state: directory owner: root group: root @@ -92,7 +92,7 @@ - name: "5.1.7 | PATCH | Ensure permissions on /etc/cron.d are configured" ansible.builtin.file: - dest: /etc/cron.d + path: /etc/cron.d state: directory owner: root group: root @@ -110,7 +110,7 @@ block: - name: "5.1.8 | PATCH | Ensure cron is restricted to authorized users | Remove cron.deny" ansible.builtin.file: - dest: /etc/cron.deny + path: /etc/cron.deny state: absent - name: "5.1.8 | PATCH | Ensure cron is restricted to authorized users | Check if cron.allow exists" @@ -120,7 +120,7 @@ - name: "5.1.8 | PATCH | Ensure cron is restricted to authorized users | Ensure cron.allow is restricted to authorized users" ansible.builtin.file: - dest: /etc/cron.allow + path: /etc/cron.allow state: '{{ "file" if rhel9cis_5_1_8_cron_allow_state.stat.exists else "touch" }}' owner: root group: root @@ -138,7 +138,7 @@ block: - name: "5.1.9 | PATCH | Ensure at is restricted to authorized users | Remove at.deny" ansible.builtin.file: - dest: /etc/at.deny + path: /etc/at.deny state: absent - name: "5.1.9 | PATCH | Ensure at is restricted to authorized users | Check if at.allow exists" @@ -148,7 +148,7 @@ - name: "5.1.9 | PATCH | Ensure at is restricted to authorized users | Ensure at.allow is restricted to authorized users" ansible.builtin.file: - dest: /etc/at.allow + path: /etc/at.allow state: '{{ "file" if rhel9cis_5_1_9_at_allow_state.stat.exists else "touch" }}' owner: root group: root diff --git a/tasks/section_6/cis_6.1.x.yml b/tasks/section_6/cis_6.1.x.yml index a1c638d..f7528d3 100644 --- a/tasks/section_6/cis_6.1.x.yml +++ b/tasks/section_6/cis_6.1.x.yml @@ -2,7 +2,7 @@ - name: "6.1.1 | PATCH | Ensure permissions on /etc/passwd are configured" ansible.builtin.file: - dest: /etc/passwd + path: /etc/passwd owner: root group: root mode: 0644 @@ -17,7 +17,7 @@ - name: "6.1.2 | PATCH | Ensure permissions on /etc/passwd- are configured" ansible.builtin.file: - dest: /etc/passwd- + path: /etc/passwd- owner: root group: root mode: 0644 @@ -32,7 +32,7 @@ - name: "6.1.3 | PATCH | Ensure permissions on /etc/group are configured" ansible.builtin.file: - dest: /etc/group- + path: /etc/group- owner: root group: root mode: 0644 @@ -47,7 +47,7 @@ - name: "6.1.4 | PATCH | Ensure permissions on /etc/group- are configured" ansible.builtin.file: - dest: /etc/group- + path: /etc/group- owner: root group: root mode: 0644 @@ -62,7 +62,7 @@ - name: "6.1.5 | PATCH | Ensure permissions on /etc/shadow are configured" ansible.builtin.file: - dest: /etc/shadow + path: /etc/shadow owner: root group: root mode: 0000 @@ -77,7 +77,7 @@ - name: "6.1.6 | PATCH | Ensure permissions on /etc/shadow- are configured" ansible.builtin.file: - dest: /etc/shadow- + path: /etc/shadow- owner: root group: root mode: 0000 @@ -92,7 +92,7 @@ - name: "6.1.7 | PATCH | Ensure permissions on /etc/gshadow are configured" ansible.builtin.file: - dest: /etc/gshadow + path: /etc/gshadow owner: root group: root mode: 0000 @@ -107,7 +107,7 @@ - name: "6.1.8 | PATCH | Ensure permissions on /etc/gshadow- are configured" ansible.builtin.file: - dest: /etc/gshadow- + path: /etc/gshadow- owner: root group: root mode: 0000