From 488db9dd57074d043deccad8049041839b54ed35 Mon Sep 17 00:00:00 2001 From: Karl DeBisschop Date: Sun, 14 Jan 2024 09:24:36 -0500 Subject: [PATCH] Fix regex to prevent swallowing closing quote in bootloader config. Fixes #132 Signed-off-by: Karl DeBisschop --- 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 ddfa33a..279d618 100644 --- a/tasks/section_1/cis_1.6.x.yml +++ b/tasks/section_1/cis_1.6.x.yml @@ -39,8 +39,8 @@ regexp: "{{ item.regexp }}" replace: "{{ item.replace }}" with_items: - - { regexp: 'apparmor=[^\s"]', replace: 'apparmor=1' } - - { regexp: 'security=[^\s"]', replace: 'security=apparmor' } + - { regexp: 'apparmor=[^\s"]+', replace: 'apparmor=1' } + - { regexp: 'security=[^\s"]+', replace: 'security=apparmor' } when: - "'apparmor' in ubtu20cis_1_6_1_2_cmdline_settings.stdout" - "'security' in ubtu20cis_1_6_1_2_cmdline_settings.stdout"