On May 27, 2010, at 5:00 AM, Marley Bacelar wrote:
> Shouldn't you use?
>
> class test {
> exec { "sudocmd" :
> cwd => "/home/server/",
> path => ["/usr/bin/","/usr/sbin/","/
> bin"],
> command => "sudo apt-get update -y",
> timeout => "-1"
> }
> }
I think the -y is only needed for upgrade dist-upgrade and other apt commands
that change packages, but I'm not sure.
I also recommend that you put in a timeout. Make it an hour or few if you
want, but it's usually a good idea to make it end eventually. Besides, update
should finish really fast because it doesn't even download packages.
Also, as someone else said, you probably don't need sudo because the puppet
client is probably already running as root.
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.