diff --git a/tasks/section_1/cis_1.6.x.yml b/tasks/section_1/cis_1.6.x.yml index 53fa9d3..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"