Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command ($which curator ) inside cron is not parse #5

Closed
lud97x opened this issue May 21, 2018 · 3 comments
Closed

Command ($which curator ) inside cron is not parse #5

lud97x opened this issue May 21, 2018 · 3 comments
Assignees

Comments

@lud97x
Copy link

lud97x commented May 21, 2018

Hello,

I am using ubuntu 16.04 , the cron doesn't work because it doesn't parse the 'which curator' command

CRON[1790]: (curator) CMD ($(which curator) /etc/curator/action_purge_syslog_linux_over_30days.yml> /dev/null 2>&1)
CRON[1789]: (curator) CMD ($(which curator) /etc/curator/action_purge_filebeat_over_30days.yml> /dev/null 2>&1)

So I set the full path of the curator binary inside job.pp:

cron { "curator_${name}":
ensure => $ensure,
command => "/usr/local/bin/curator ${::curator::config_path}/action_${action}.yml> /dev/null 2>&1",
hour => $hour,
minute => $minute,
month => $month,
monthday => $monthday,
user => $user,
weekday => $weekday,
}

And now it's works

CRON[25048]: (curator) CMD (/usr/local/bin/curator /etc/curator/action_purge_filebeat_over_30days.yml> /dev/null 2>&1)

@mvisonneau
Copy link
Owner

I've tested it on Ubuntu 16.04 as well and it works fine. I believe the error is due to something else. 🤔

@sergii-sakharov
Copy link

Probably due to docker image not having which package installed?

@mvisonneau
Copy link
Owner

mvisonneau commented Aug 1, 2018

You should now be able to configure it yourself :
https://github.com/mvisonneau/puppet-curator/blob/master/manifests/init.pp#L11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants