Re: [Puppet Users] Re: running sudo commands

2010-05-27 Thread Peter Meier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/28/2010 07:30 AM, prudhvi wrote: > I face the same problem when trying the package type > [...] > It asks me for root privileges.. well I know 0 system-wide package management systems that don't require root to change the system. but if you got

Re: [Puppet Users] Re: running sudo commands

2010-05-27 Thread Patrick
You have two possible problems. It's also possible that the directory was locked because something else was doing stuff with packages. This is rather unlikely though. The puppet client runs as the user you run it as. If you start it as a service, it runs as root. If you start is as an ordin

[Puppet Users] Re: running sudo commands

2010-05-27 Thread prudhvi
I face the same problem when trying the package type class apache { package { ["apache"] : ensure => latest, } } err: //apache/Package[apache]/ensure: change from purged to latest failed: Could not update: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--

Re: [Puppet Users] Re: running sudo commands

2010-05-27 Thread Patrick
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 f

Re: [Puppet Users] Re: running sudo commands

2010-05-27 Thread Marley Bacelar
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" } } -- Marley Bacelar Project Fedora Ambassador VCP, VSP. VTSP., ITILF, IBM 000-076, IBM 000-330, IBM 000-331

[Puppet Users] Re: running sudo commands

2010-05-27 Thread DWIM
On May 27, 1:49 pm, DWIM wrote: > Hi Prudhvi, > > puppet = NOPASSWD: /usr/sbin/apt-get update > Oops, think to have forgotten a glob wildcard here and it should rather read uppet = NOPASSWD: /usr/sbin/apt-get update * But the first more unspecific rule I mentioned should accept any number

[Puppet Users] Re: running sudo commands

2010-05-27 Thread DWIM
Hi Prudhvi, though I'm a Puppet newbie I do think indeed that the puppetd usually is run as user root because most configuration changes do require root privileges. Was there any particular reason why you instead have your puppetd run as user puppet? Anyway, I would assume that in this case the