Actually nothing to do with the content of this post but is anyone else
getting a lot of mails from puppet-users at least twice? This particular
one came through 3 times with the same timestamp and same Message-Id.

On 31/08/2010 15:03, Martijn Grendelman wrote:
> Hi,
>
> For the past week, I have been trying to figure out the best way to do
> package management with Puppet on an Ubuntu system. I have studied many
> solutons I found on the web, but none of them seem to do exactly what I want.
>
> Among other things, I have tried everything that is discussed here:
> http://groups.google.com/group/puppet-users/browse_thread/thread/af7349171a5821a4/db96b809c97f6006
>
> but none of that really works.
>
> What I would like, is for Puppet to run `aptitude update` before it
> installs or upgrades packages. That doesn't seem out of the ordinary to
> me, but I can't make it work in Puppet.
>
> The approach I like best, is this one:
>
>     class apt-update {
>         exec { "/usr/bin/aptitude update":
>             refreshonly => true,
>         }
>     }
>
>     define apt_package($ensure="latest") {
>         include apt-update
>         package { $name:
>             ensure  => $ensure,
>             require => Class["apt-update"],
>         }
>     }
>
>     apt_package { "foo":
>     }
>
> but that doesn't work, it doesn't run apt-update before installing 'foo',
> because of the "refreshonly => true". If I remove it, it works, but then
> `aptitude update` is run on /every/ Puppet run, which is worse than not
> running it at all.
>
> Is it at all possible to achieve what I want with Puppet? If so, how?
>
> I have tried to fiddle around with the new run stages feature, but that
> got me in a circular dependency mess I couldn't get out of.
>
> Desperately hoping for hints...
>
> Best regards,
> Martijn.
>

-- 

Trevor Hemsley
Infrastructure Engineer
.................................................
* C A L Y P S O
* Brighton, UK   

OFFICE  +44 (0) 1273 666 350
FAX     +44 (0) 1273 666 351

.................................................
www.calypso.com

This electronic-mail might contain confidential information intended
only for the use by the entity named. If the reader of this message is
not the intended recipient, the reader is hereby notified that any
dissemination, distribution or copying is strictly prohibited.

* P * /*/ Please consider the environment before printing this e-mail /*/

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