From f3d31896debb82116ab24ecbfe4d529a1bdcd841 Mon Sep 17 00:00:00 2001 From: Dan D Date: Wed, 4 Oct 2023 11:58:01 -0700 Subject: [PATCH] fixes regex catching the trailing quote Signed-off-by: Dan D --- tasks/section_1/cis_1.6.x.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/section_1/cis_1.6.x.yml b/tasks/section_1/cis_1.6.x.yml index de35664e..eb4757cd 100644 --- a/tasks/section_1/cis_1.6.x.yml +++ b/tasks/section_1/cis_1.6.x.yml @@ -42,8 +42,8 @@ regexp: "{{ item.regexp }}" replace: "{{ item.replace }}" with_items: - - { regexp: 'apparmor=\S+', replace: 'apparmor=1' } - - { regexp: 'security=\S+', replace: 'security=apparmor' } + - { regexp: 'apparmor=\w+', replace: 'apparmor=1' } + - { regexp: 'security=\w+', replace: 'security=apparmor' } when: - "'apparmor' in ubtu22cis_1_6_1_2_cmdline_settings.stdout" - "'security' in ubtu22cis_1_6_1_2_cmdline_settings.stdout"