Matt Southerden <southerde...@googlemail.com> writes:

> I'm new to puppet, and I have a couple of apt related problems I'm
> struggling to find solutions to.
>
> Firstly, we'd like to run an apt-get upgrade the very first time a
> node goes under puppet's control. Is there a good way to do this?

No.  The next release will be easier, but for now you need to be very, very
careful to get ordering right.  We have, roughly, this structure:

class apt::config {
  # install sources.list, and other *files* required for apt
}

class apt {
  exec { "/usr/bin/aptitude update": require => Class["apt::config"]
}

Package { require => Class["apt"] }

That helps ensure that the aptitude update runs before any package install in
puppet, but is ugly.  The next release (as I understand the roadmap) will
improve this by having "stages" where you can arrange it with less trouble.

[...]


[...]

> But reading the docs (and trying this out manually) the require parameter
> doesn't trigger the exec (so I have no idea how all these people are getting
> it to work *shrug*, or maybe they just think it's working...)

Drop the 'refreshonly' in the apt update 'exec', and it will work. :)

        Daniel

-- 
✣ Daniel Pittman            ✉ dan...@rimspace.net            ☎ +61 401 155 707
               ♽ made with 100 percent post-consumer electrons

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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.

Reply via email to