From 90365c57430c302e2798eabbb39ae14357a26c0f Mon Sep 17 00:00:00 2001 From: Vojtech Polasek Date: Wed, 31 May 2023 16:04:06 +0200 Subject: [PATCH] fix the find command used within Ansible remediation the group parameter accepts both group names and group ids --- shared/templates/file_groupowner/ansible.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/templates/file_groupowner/ansible.template b/shared/templates/file_groupowner/ansible.template index 8c8b5bc6c1b5..cc10e8964375 100644 --- a/shared/templates/file_groupowner/ansible.template +++ b/shared/templates/file_groupowner/ansible.template @@ -15,7 +15,7 @@ {{%- endif %}} - name: Find {{{ path }}} file(s) matching {{{ FILE_REGEX[loop.index0] }}}{{% if RECURSIVE %}} recursively{{% endif %}} - command: 'find -H {{{ path }}} {{{ FIND_RECURSE_ARGS }}} -type f ! -gid {{{ FILEGID }}} -regex "{{{ FILE_REGEX[loop.index0] }}}"' + command: 'find -H {{{ path }}} {{{ FIND_RECURSE_ARGS }}} -type f ! -group {{{ FILEGID }}} -regex "{{{ FILE_REGEX[loop.index0] }}}"' register: files_found changed_when: False failed_when: False