Hi all,

We are busy migrating out puppet 2.7 code to puppet 3 and have run into a 
problem where we are getting dependency cycles when using tidy.
This mostly happens with stages (and yes, I completely understand why we 
should avoid them).

As an example we have a defined class that we use to create our cron jobs, 
and then a tidy to clean up anything that isn't defined.

class crond::cleanup {
    tidy {
        "/etc/cron.d":
        age => 0, recurse => true,
        matches => "*.puppet.cron"
    }
}

define crond::job($jobs,$comment,$mail="root") {
    include crond::cleanup
    file {
        "/etc/cron.d/${name}.puppet.cron":
        owner=>root,group=>root,
        content=>template("crond/job.erb")
    } 
}


and we get a dependency as follows:

(File[/etc/cron.d/puppetcheck.puppet.cron] => Tidy[/etc/cron.d] => 
Class[Crond::Cleanup] => Stage[main] => Stage[apps] => Stage[apps] => 
Stage[post] => Class[Puppet::Service] => Crond::Job[puppetcheck] => 
File[/etc/cron.d/puppetcheck.puppet.cron])

Does anyone know of a workaround?

Thanks
Chris


-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/01a1dc4a-ab91-4653-a879-ba4d4d26ea21%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to