From 89e6372648c37b2b7d16bcca8a3f61139186b64c Mon Sep 17 00:00:00 2001 From: Mark Bolwell Date: Thu, 26 Jan 2023 09:47:33 +0000 Subject: [PATCH] 5.6.3 tidy up Signed-off-by: Mark Bolwell --- tasks/section_5/cis_5.6.x.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tasks/section_5/cis_5.6.x.yml b/tasks/section_5/cis_5.6.x.yml index f03e213..941ec99 100644 --- a/tasks/section_5/cis_5.6.x.yml +++ b/tasks/section_5/cis_5.6.x.yml @@ -46,18 +46,18 @@ - name: "5.6.3 | PATCH | Ensure default user shell timeout is 900 seconds or less" ansible.builtin.blockinfile: - create: true - mode: 0644 - dest: "{{ item.dest }}" + path: "{{ item.dest }}" state: "{{ item.state }}" marker: "# {mark} CIS 5.6.3 ANSIBLE MANAGED" + create: true + mode: 0644 block: | TMOUT={{ rhel9cis_shell_session_timeout.timeout }} export TMOUT readonly TMOUT loop: - - { dest: "{{ rhel9cis_shell_session_timeout.file }}", state: present } - - { dest: /etc/profile, state: "{{ (rhel9cis_shell_session_timeout.file == '/etc/profile') | ternary('present', 'absent') }}" } + - { path: "{{ rhel9cis_shell_session_timeout.file }}", state: present } + - { path: /etc/profile, state: "{{ (rhel9cis_shell_session_timeout.file == '/etc/profile') | ternary('present', 'absent') }}" } when: - rhel9cis_rule_5_6_3 tags: