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

Fixing unremoved cronjobs, Issue #41 #44

Closed
wants to merge 2 commits into from
Closed

Fixing unremoved cronjobs, Issue #41 #44

wants to merge 2 commits into from

Conversation

Phil-Friderici
Copy link
Contributor

When changing $run_in_noop from 'true' to 'false' only the reboot job's comment gets deleted but not the job itself. Danger of unwanted additional cronjobs and unexpected behaviour (OP vs NOOP).
Fixes #41 and includes fix for #43 (in lines 114 & 135)

user => $cron_user,
hour => $cron_hour,
minute => $cron_minute,
}

if $run_method == 'cron' {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this would remove the conditional for the run method. Remember that we want to support running as an agent, instead of cron.

@Phil-Friderici
Copy link
Contributor Author

it's still there (line 78), but now case is used instead of if else

 case $run_method {
    'service': {

@ghoneycutt
Copy link
Owner

it is failing travis - https://travis-ci.org/ghoneycutt/puppet-module-puppet/jobs/14197352

1) puppet::agent class puppet::agent Puppet agent cron at boot should contain Cron[puppet_agent_once_at_boot] with user => "root" and special => "reboot"
Failure/Error: })
expected that the catalogue would contain Cron[puppet_agent_once_at_boot]

@Phil-Friderici
Copy link
Contributor Author

Working on that at the moment…

@Phil-Friderici
Copy link
Contributor Author

et voilà

@ghoneycutt
Copy link
Owner

@Phil-Friderici sorry I didnt get this merged in a timely manner. Can you please rebase against master?

@Phil-Friderici Phil-Friderici deleted the fixing_cronjobs branch October 23, 2014 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

when changing from NOOP to OP old cronjob is not deleted
2 participants