diff --git a/manifests/filebeat_oss.pp b/manifests/filebeat_oss.pp index 63b317eb..c9b24c25 100644 --- a/manifests/filebeat_oss.pp +++ b/manifests/filebeat_oss.pp @@ -46,10 +46,12 @@ # Needed since GitHub can only ETAG and result in changes of the mtime everytime. # TODO: Include file into the wazuh/wazuh-puppet project or use file { checksum => '..' } for this instead of the exec construct. exec { 'cleanup /etc/filebeat/wazuh-template.json': - command => '/bin/rm -f /etc/filebeat/wazuh-template.json', - onlyif => '/bin/test -f /etc/filebeat/wazuh-template.json', - unless => "/bin/curl -s 'https://raw.githubusercontent.com/wazuh/wazuh/${wazuh_extensions_version}/extensions/elasticsearch/7.x/wazuh-template.json' | /bin/cmp -s '/etc/filebeat/wazuh-template.json'", + path => ['/usr/bin', '/bin', '/usr/sbin', '/sbin'], + command => 'rm -f /etc/filebeat/wazuh-template.json', + onlyif => 'test -f /etc/filebeat/wazuh-template.json', + unless => "curl -s 'https://raw.githubusercontent.com/wazuh/wazuh/${wazuh_extensions_version}/extensions/elasticsearch/7.x/wazuh-template.json' | cmp -s '/etc/filebeat/wazuh-template.json'", } + -> file { '/etc/filebeat/wazuh-template.json': owner => 'root', group => 'root',