Fix curator cron command string

The puppet syntax check complains about the '\%' in the cron command
string, but the % still does need to be escaped for the cron to work
properly. We double escape it here in the puppet string which will
result in a properly single-escaped command string in the crontab.

Change-Id: I3d97463a611c43ded12ddb788e9da5e13466e0c5
This commit is contained in:
Colleen Murphy 2017-06-11 19:18:20 +02:00
parent 2f689ee899
commit 567ae88a96
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ class logstash::curator (
hour => $cron_hour,
minute => $cron_minute,
environment => 'PATH=/usr/bin:/usr/local/bin',
command => "curator --logfile /var/log/curator.log delete indices --older-than ${keep_for_days} --time-unit days --timestring \%Y.\%m.\%d"
command => "curator --logfile /var/log/curator.log delete indices --older-than ${keep_for_days} --time-unit days --timestring \\%Y.\\%m.\\%d"
}
include ::logrotate