enhance regexp for "Ensure sudo log file exists" task

Signed-off-by: Francesco Trentini <francesco.trentini@ris.bz.it>
This commit is contained in:
Francesco Trentini 2024-03-22 09:25:39 +01:00
parent 4d90fed61b
commit fe6fca34c9
No known key found for this signature in database
GPG key ID: F6671CF68B529CCB

View file

@ -30,7 +30,7 @@
- name: "5.3.3 | PATCH | Ensure sudo log file exists" - name: "5.3.3 | PATCH | Ensure sudo log file exists"
ansible.builtin.lineinfile: ansible.builtin.lineinfile:
path: /etc/sudoers path: /etc/sudoers
regexp: '^Defaults logfile=' regexp: '^Defaults\s+logfile='
line: 'Defaults logfile={{ rhel9cis_sudolog_location }}' line: 'Defaults logfile={{ rhel9cis_sudolog_location }}'
validate: '/usr/sbin/visudo -cf %s' validate: '/usr/sbin/visudo -cf %s'
when: when: