Skip to content

Commit 52f8636

Browse files
authored
Merge pull request #551 from pixelpark/4.3_hotfix_cleanup_wazuh_template
Hotfix exec when wazuh-template.json do not exist
2 parents c5d0064 + 8b9cb4d commit 52f8636

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

manifests/filebeat_oss.pp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
# TODO: Include file into the wazuh/wazuh-puppet project or use file { checksum => '..' } for this instead of the exec construct.
4848
exec { 'cleanup /etc/filebeat/wazuh-template.json':
4949
command => '/bin/rm /etc/filebeat/wazuh-template.json',
50-
unless => "/bin/cmp -s '/etc/filebeat/wazuh-template.json' <(curl -s https://raw.githubusercontent.com/wazuh/wazuh/${wazuh_extensions_version}/extensions/elasticsearch/7.x/wazuh-template.json)",
50+
onlyif => '/bin/test -f /etc/filebeat/wazuh-template.json',
51+
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'",
5152
}
5253
-> file { '/etc/filebeat/wazuh-template.json':
5354
owner => 'root',

0 commit comments

Comments
 (0)