On 10/08/2012, at 3:20, Nigel Kersten <ni...@puppetlabs.com> wrote:
> On Thu, Aug 9, 2012 at 10:10 AM, Douglas Garstang > <doug.garst...@gmail.com> wrote: >> I'm on Ubuntu, and I wanted to always have 'apt-get update' run before >> attempting to install packages, so I put this in my top level site.pp >> file: >> >> exec { >> 'refresh-repos': >> command => '/usr/bin/apt-get update'; >> } >> >> Package { >> require => Exec['refresh-repos'] >> } >> >> However, that causes a nasty cyclic dependency error. I really HATE >> those because the error message makes it impossible to interpret >> what's actually going on. >> >> How can I do this without the awful cyclic error messages? > > What version of Puppet are you on? Can you paste or link to the error > message itself so we can actually tell what the dependency cycle is? > I have used stages to handle this sort of thing. Setting up a repo stage to refresh repos before the main stage. http://docs.puppetlabs.com/references/stable/metaparameter.html#stage Cheers -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.