FAQ
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?

Doug.

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Search Discussions

  • Nigel Kersten at Aug 9, 2012 at 5:20 pm

    On Thu, Aug 9, 2012 at 10:10 AM, Douglas Garstang 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?

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Denmat at Aug 9, 2012 at 8:59 pm

    On 10/08/2012, at 3:20, Nigel Kersten wrote:

    On Thu, Aug 9, 2012 at 10:10 AM, Douglas Garstang
    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+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Nigel Kersten at Aug 10, 2012 at 3:40 pm

    On Thu, Aug 9, 2012 at 2:00 PM, Denmat wrote:
    On 10/08/2012, at 3:20, Nigel Kersten wrote:

    On Thu, Aug 9, 2012 at 10:10 AM, Douglas Garstang
    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
    That's true, but stages aren't required to make this work.

    It's impossible for us to tell why there is a dependency cycle here
    without more info.

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedAug 9, '12 at 5:10p
activeAug 10, '12 at 3:40p
posts4
users3
websitepuppetlabs.com

People

Translate

site design / logo © 2021 Grokbase