Re: [Puppet Users] Re: Virtual resources and hashes

2011-06-08 Thread Sirtaj Singh Kang
On 08-Jun-11, at 9:31 PM, Brian Gallew wrote: [snip] See, there's the crux of the issue: arrays are *not* a method of looping. Puppet's DSL is declarative, not procedural (imperative). This isn't precisely true - every pure functional language I've seen has some sort of list map and filt

Re: [Puppet Users] Re: New Puppet report processors...

2011-06-08 Thread Don
Thanks for the help off-list, James. here's the stub I'm using to check if the log is error-ful, inside of process(): def process failure = false #iterate through each log object and look for failures self.logs.each do |log| if log.level.to_s == 'err' || 'alert' || 'emerg' |

[Puppet Users] ANNOUNCE: Puppet 2.7.0rc4 Available

2011-06-08 Thread Michael Stahnke
This release addresses issues with the Puppet 2.7.0rc3 series. This release is available for download at: http://www.puppetlabs.com/downloads/puppet/puppet-2.7.0rc4.tar.gz See the Verifying Puppet Download section at: http://projects.puppetlabs.com/projects/puppet/wiki/D

[Puppet Users] Prerun, Postrun Commands, and Stages

2011-06-08 Thread Josh Cooper
Hi all, I'm looking for background information about how bug #7127[1] should be fixed: prerun_command don't stop puppet on error I think there's general agreement that if the prerun command fails, then the catalog should not be applied, but the report should be sent, and the report's status shoul

Re: [Puppet Users] Re: New Puppet report processors...

2011-06-08 Thread James Turnbull
Don wrote: > > I'm running 2.6.4 on the master & client. pluginsync is true on both, > and reports = zenoss only on the master for this test. > > Why is self.status not working in this case? > The issue is that status is only available in the V2 report format in Puppet 2.6.5 and onwards. Before

[Puppet Users] Open Source Team iteration & planning summary 2011-06-08

2011-06-08 Thread Jacob Helwig
Finished backlog items: * #2128 - Allow arbitrary fact as node_name identifier There are now two new (mutually exclusive) configuration options on the agent in the 2.6.x branch to allow setting the node's name separately from the node's certificate name. node_name_value: This

Re: [Puppet Users] Re: New Puppet report processors...

2011-06-08 Thread James Turnbull
Don wrote: > (possible double-post) > > James, > > This is all wonderfully helpful and I just spent a little while > writing up a Zenoss processor to send an event on failure using > XMLRPC::Client, modeled directly after your puppet-zendesk module, > replacing the HTTParty guts with XMLRPC guts.

[Puppet Users] Re: New Puppet report processors...

2011-06-08 Thread Don Johnson
James, This is all wonderfully helpful and I just spent a little time writing up a Zenoss processor to send an event on failure using XMLRPC::Client, modeled directly after your puppet-zendesk module, replacing the HTTParty guts with XMLRPC guts. I've encountered a problem though (and we can refer

Re: [Puppet Users] Re: New Puppet report processors...

2011-06-08 Thread Don
(possible double-post) James, This is all wonderfully helpful and I just spent a little while writing up a Zenoss processor to send an event on failure using XMLRPC::Client, modeled directly after your puppet-zendesk module, replacing the HTTParty guts with XMLRPC guts. I've encountered a problem

[Puppet Users] Invitación a conectarnos en LinkedIn

2011-06-08 Thread Daniel Anibal Guerrero
LinkedIn Me gustaría añadirte a mi red profesional en LinkedIn. -Daniel Anibal Daniel Anibal Guerrero Bibliotecario en Museo Nacional del Inmigrante- Argentina Confirma que conoces a Daniel Anibal Guerrero https://www.linkedin.com/e/-7o0xwv-goouq8ed-3r/isd/3154013839/BukbDg4B

[Puppet Users] Re: New Puppet report processors...

2011-06-08 Thread treydock
Scratch my last question, had to restart puppetmaster. Thanks again for your help and these plugins - Trey On Jun 8, 5:01 pm, treydock wrote: > That did it!  I'm now getting messages over Jabber upon failure!! > > Is the debug output you refered to earlier, "Sending status for > name.of.host to

[Puppet Users] Re: New Puppet report processors...

2011-06-08 Thread treydock
That did it! I'm now getting messages over Jabber upon failure!! Is the debug output you refered to earlier, "Sending status for name.of.host to XMMP user jabber.user" something I would see from Puppet or the Jabber server? I have yet to see similar output, but the IM is now working. Also now t

Re: [Puppet Users] Re: Creating Users and Hashing it's password.

2011-06-08 Thread Nigel Kersten
On Wed, Jun 8, 2011 at 2:38 PM, Nigel Kersten wrote: > > > On Wed, Jun 8, 2011 at 2:11 PM, Denmat wrote: > >> Hi, >> >> If your password hash has any $ in it the "..." will puppet make try to >> expand it. >> >> You need password => '$1$effggfdg' (single quotes). >> > > I like using puppet r

Re: [Puppet Users] Re: Creating Users and Hashing it's password.

2011-06-08 Thread Nigel Kersten
On Wed, Jun 8, 2011 at 2:11 PM, Denmat wrote: > Hi, > > If your password hash has any $ in it the "..." will puppet make try to > expand it. > > You need password => '$1$effggfdg' (single quotes). > I like using puppet resource for this. Set the password for an account, and use puppet resou

Re: [Puppet Users] Re: Creating Users and Hashing it's password.

2011-06-08 Thread Denmat
Hi, If your password hash has any $ in it the "..." will puppet make try to expand it. You need password => '$1$effggfdg' (single quotes). cheers, Den On 09/06/2011, at 5:18, vella1tj wrote: > so If I changed it to > user {'sysop': >#uid => 500, >

Re: [Puppet Users] Re: Virtual resources and hashes

2011-06-08 Thread Aaron Grewell
Nice! More good things to look forward to. :) On Wed, Jun 8, 2011 at 1:58 PM, Nigel Kersten wrote: > > > On Wed, Jun 8, 2011 at 1:36 PM, Aaron Grewell wrote: > >> We've looked at two different possibilities thus far: >> >> 1) Make all resource types hash-aware. This is what I was originally >

Re: [Puppet Users] Re: Virtual resources and hashes

2011-06-08 Thread Nigel Kersten
On Wed, Jun 8, 2011 at 1:36 PM, Aaron Grewell wrote: > We've looked at two different possibilities thus far: > > 1) Make all resource types hash-aware. This is what I was originally > asking for. It would mean changing the way resources are declared so that > in the case of a hash their represen

Re: [Puppet Users] Re: New Puppet report processors...

2011-06-08 Thread James Turnbull
treydock wrote: > I don't have any lines like that no. > > Could the daemon line for puppetmaster be effecting this? Is the "-- > reports" option necessary since my puppet.conf has that specified? > > PUPPETMASTER_EXTRA_OPTS="--reports puppet_dashboard --debug" > > Other than that and my puppet

[Puppet Users] How to do "array interpolation"?

2011-06-08 Thread Toby
Hello all, sort of a puppet newbie here, I have some constructs that are like so: class hosts { file {"/etc/hosts": owner => root, group => root, mode => 644, source => ["puppet://puppet/files/etc/hosts.$hostname", "puppet://puppet/files/etc/hosts.$

[Puppet Users] Re: how do I tell puppet do nothing if the condition is true

2011-06-08 Thread hyzhang
Thank you all. That works! -Haiyan On Jun 8, 3:28 pm, Patrick wrote: > On Jun 8, 2011, at 11:01 AM, hyzhang wrote: > > > Hi, > > > I have a piece of puppet code. I want puppet do nothing if it is true. > > How do I do that? Of course this code would not code. > > > exec { 'runlevel': > >        

Re: [Puppet Users] Re: Virtual resources and hashes

2011-06-08 Thread Aaron Grewell
We've looked at two different possibilities thus far: 1) Make all resource types hash-aware. This is what I was originally asking for. It would mean changing the way resources are declared so that in the case of a hash their representation of $name was appropriate for use with defines and virtua

Re: [Puppet Users] Re: New Puppet report processors...

2011-06-08 Thread Ohad Levy
On 2011 6 8 20:16, "Craig" wrote: > > Hi, > > These sample reports have been very useful, thanks! > > Is there is a way to only send a report once every 24 hours (say)? > For example, I want to know about failed runs, but not every time > someone is hacking around, changing something, re-running e

Re: [Puppet Users] Re: Virtual resources and hashes

2011-06-08 Thread Randall Hansen
On Wed, Jun 8, 2011 at 12:07 PM, Aaron Grewell wrote: > All I'm saying is that I think hashes should be first-class citizens in > Puppet and right now they're not. I agree with that as a high-level problem statement, but to make progress we need to put legs on it. John's got one possibility: a

Re: [Puppet Users] how do I tell puppet do nothing if the condition is true

2011-06-08 Thread Patrick
On Jun 8, 2011, at 11:01 AM, hyzhang wrote: > Hi, > > I have a piece of puppet code. I want puppet do nothing if it is true. > How do I do that? Of course this code would not code. > > exec { 'runlevel': >command => $is_virtual ? { >'false' => "/bin/sed -i 's/id:3:initde

[Puppet Users] Re: Creating Users and Hashing it's password.

2011-06-08 Thread vella1tj
so If I changed it to user {'sysop': #uid => 500, #groups => 'admin', comment=> 'Sysop', ensure=> present, home => '/home/sysop', shell

Re: [Puppet Users] Creating Users and Hashing it's password.

2011-06-08 Thread Nathan Clemons
What I do is set the password on one host, and then copy the hash out of /etc/shadow into the Puppet definition to be set on the other hosts. By default the Puppet providers expect that the password field will be hashed as used on the system, not plaintext. -- Nathan Clemons http://www.livemocha.

[Puppet Users] Creating Users and Hashing it's password.

2011-06-08 Thread vella1tj
Hi everyone I would like to first of all say thanks to anyone willing to help me. I was tasked with creating a Admin account using puppet to push to all of our Macs that we have deployed around the Campus. user {'sysop': #uid => 500, #groups

Re: [Puppet Users] Re: Virtual resources and hashes

2011-06-08 Thread Aaron Grewell
All I'm saying is that I think hashes should be first-class citizens in Puppet and right now they're not. Every other object can be placed in an array and easily and scalably declared. Hashes are "special" because you can declare them like anything else, but you can't use them like anything else.

[Puppet Users] Re: Virtual resources and hashes

2011-06-08 Thread jcbollinger
On Jun 8, 12:17 pm, Randall Hansen wrote: > On Tue, Jun 7, 2011 at 4:15 PM, Aaron Grewell wrote: > > $users = [{ username => "bill", uid => "12345" }, > > { username => "ted",  uid => "12346" }] > > Aaron, I think this is a completely sane request.  We've talked about > it before, but

[Puppet Users] Re: Virtual resources and hashes

2011-06-08 Thread jcbollinger
On Jun 8, 11:33 am, Aaron Grewell wrote: > If you look at what I tried to do you'll realize that's not the case.  I > understand what you're saying, but the issue is one of Puppet not supporting > its own 'syntactic sugar' consistently.  I created an array (this is not a > convenience for a larg

Re: [Puppet Users] Virtual resources and hashes

2011-06-08 Thread Aaron Grewell
The request in the ticket is related but might not solve the same problem. What I think I'm looking for is the generic ability to specify an array of hashes as a resource title and have Puppet handle it intelligently (that is, produce a locally scoped hash split from the array and easily accessible

Re: [Puppet Users] how do I tell puppet do nothing if the condition is true

2011-06-08 Thread Nigel Kersten
On Wed, Jun 8, 2011 at 11:01 AM, hyzhang wrote: > Hi, > > I have a piece of puppet code. I want puppet do nothing if it is true. > How do I do that? Of course this code would not code. > > exec { 'runlevel': >command => $is_virtual ? { >'false' => "/bin/sed -i 's/id:3:init

Re: [Puppet Users] Puppet Support for OSX

2011-06-08 Thread Nigel Kersten
On Wed, Jun 8, 2011 at 8:00 AM, James Turnbull wrote: > Mister IT Guru wrote: > > Hi guys – I was wondering how well puppet performs on OSX. Anyone here > > had any experience using puppet under OSX? > > > > Very well and it's well supported. Google uses it to manage their > internal OSX deskto

[Puppet Users] Re: New Puppet report processors...

2011-06-08 Thread treydock
I don't have any lines like that no. Could the daemon line for puppetmaster be effecting this? Is the "-- reports" option necessary since my puppet.conf has that specified? PUPPETMASTER_EXTRA_OPTS="--reports puppet_dashboard --debug" Other than that and my puppet.conf I haven't found any furthe

[Puppet Users] how do I tell puppet do nothing if the condition is true

2011-06-08 Thread hyzhang
Hi, I have a piece of puppet code. I want puppet do nothing if it is true. How do I do that? Of course this code would not code. exec { 'runlevel': command => $is_virtual ? { 'false' => "/bin/sed -i 's/id:3:initdefault:/id: 5:initdefault:/' /etc/inittab", '

Re: [Puppet Users] Re: Virtual resources and hashes

2011-06-08 Thread Aaron Grewell
I suspect the root of the problem I'm running into may be the simple nature of $name. It's not capable of being an arbitrary object. I consider that an architectural issue in a system that supports hashes which are structured objects that can't really be reduced to a string. IMHO for a future ve

Re: [Puppet Users] Installing Virtualbox on Mac osx with pkg dmg provider

2011-06-08 Thread Nigel Kersten
On Wed, Jun 8, 2011 at 6:13 AM, Marc wrote: > Hello > > I can't manage to install VB on osx via puppet and pkgdmg provider.*Jun 8 > 15:02:29 info-starbuck installer[85815]: * > > *./postflight: Register file extensions for * > > *Jun 8 15:02:29 info-starbuck installer[85815]: ./postflight:

Re: [Puppet Users] Re: New Puppet report processors...

2011-06-08 Thread James Turnbull
Craig wrote: > Hi, > > These sample reports have been very useful, thanks! > > Is there is a way to only send a report once every 24 hours (say)? > For example, I want to know about failed runs, but not every time > someone is hacking around, changing something, re-running etc. > > I can think o

Re: [Puppet Users] Virtual resources and hashes

2011-06-08 Thread Randall Hansen
On Tue, Jun 7, 2011 at 4:15 PM, Aaron Grewell wrote: > $users = [{ username => "bill", uid => "12345" }, > { username => "ted",  uid => "12346" }] Aaron, I think this is a completely sane request. We've talked about it before, but I can't find an existing ticket. This one seems close,

[Puppet Users] Re: New Puppet report processors...

2011-06-08 Thread Craig
Hi, These sample reports have been very useful, thanks! Is there is a way to only send a report once every 24 hours (say)? For example, I want to know about failed runs, but not every time someone is hacking around, changing something, re-running etc. I can think of all sorts of workarounds, jus

Re: [Puppet Users] Re: How do you handle deleted nodes with exported resources in this situation?

2011-06-08 Thread Brian Gallew
On Jun 8, 2011, at 8:50 AM, jcbollinger wrote: > > > On Jun 7, 11:12 am, Stefan Schulte > wrote: >> You can download the puppet sources. In the ext Directory you'll find a >> script »puppetstoredconfigclean.rb NODE_TO_BE_REMOVED«. AFAIK the script will >> set the ensure property of all exporte

Re: [Puppet Users] Re: Virtual resources and hashes

2011-06-08 Thread Aaron Grewell
If you look at what I tried to do you'll realize that's not the case. I understand what you're saying, but the issue is one of Puppet not supporting its own 'syntactic sugar' consistently. I created an array (this is not a convenience for a large number of machines, it's a requirement) but since

Re: [Puppet Users] Re: New Puppet report processors...

2011-06-08 Thread James Turnbull
treydock wrote: > My [master] has : > > report = true > reports = http, store, xmpp > pluginsync = true > > The [agent] includes: >report = true >listen = true >pluginsync = true > > > The second agent I tested with also has the same configuration as the > above [agent]

Re: [Puppet Users] Re: Virtual resources and hashes

2011-06-08 Thread Aaron Grewell
Here's the thing though: since arrays are the only native method of looping, Puppet needs to handle arrays of all native types well. If it doesn't, from an end-user perspective that's broken. On Wed, Jun 8, 2011 at 8:36 AM, jcbollinger wrote: > > > On Jun 7, 6:15 pm, Aaron Grewell wrote: > > Hm

Re: [Puppet Users] Re: Virtual resources and hashes

2011-06-08 Thread Brian Gallew
On Jun 8, 2011, at 8:45 AM, Aaron Grewell wrote: > Here's the thing though: since arrays are the only native method of looping, > Puppet needs to handle arrays of all native types well. If it doesn't, from > an end-user perspective that's broken. See, there's the crux of the issue: arrays are

[Puppet Users] Re: How do you handle deleted nodes with exported resources in this situation?

2011-06-08 Thread jcbollinger
On Jun 7, 11:12 am, Stefan Schulte wrote: > On Tue, Jun 07, 2011 at 07:10:22AM -0700, jcbollinger wrote: > > > On Jun 6, 6:40 pm, Larry Ludwig wrote: > > > I have an issue where for a file type of an exported resource I must > > > define > > > as such: > > > >                 force    => false

[Puppet Users] Re: Virtual resources and hashes

2011-06-08 Thread jcbollinger
On Jun 7, 6:15 pm, Aaron Grewell wrote: > Hmmm, either I'm doing something wrong or virtual resources are incompatible > with hashes. I think it's a mix of about two parts "doing something wrong" to one part "incompatible", coming out to more or less "Puppet doesn't do what I wish it would."

Re: [Puppet Users] Puppet Support for OSX

2011-06-08 Thread James Turnbull
Mister IT Guru wrote: > Hi guys – I was wondering how well puppet performs on OSX. Anyone here > had any experience using puppet under OSX? > Very well and it's well supported. Google uses it to manage their internal OSX desktops as do a number of other companies, universities, etc. Regards J

[Puppet Users] Installing Virtualbox on Mac osx with pkg dmg provider

2011-06-08 Thread Marc
Hello I can't manage to install VB on osx via puppet and pkgdmg provider. puppet client : 2.6.8 on osx snow leopard 10.6.7 puppetmaster : 2.6.8-1~bpo60+1 on debian squeeze The puppet logs say : [...] debug: Puppet::Type::Package::ProviderPkgdmg: Executing '/usr/bin/curl -o /tmp/VirtualBox-4.0

[Puppet Users] Puppet Support for OSX

2011-06-08 Thread Mister IT Guru
Hi guys ­ I was wondering how well puppet performs on OSX. Anyone here had any experience using puppet under OSX? -- 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 unsubscrib

R: Re: [Puppet Users] Managing /etc/fstab options with augeas

2011-06-08 Thread pinto.e...@gmail.com
There is a specific example of this on the puppet Wiki iirc. Or very similar . Regards. Messaggio originale Da: Adam Heinz Inviato: 08/06/2011, 16:17 A: puppet-users@googlegroups.com Oggetto: Re: [Puppet Users] Managing /etc/fstab options with augeas On Thu, Jun 2, 2011 at 4:22 AM, Gio

Re: [Puppet Users] Puppet managed hosts in multiple nagios hostgroups

2011-06-08 Thread Chris Phillips
updated, and hopefully finished: Facter.add(:bp_nagios_hostgroups) do setcode do if FileTest.exists?("/var/lib/puppet/classes.txt") bp_nagios_hostgroups = "" File.open("/var/lib/puppet/classes.txt") { |file| file.each { |line|

Re: [Puppet Users] Puppet managed hosts in multiple nagios hostgroups

2011-06-08 Thread Chris Phillips
Actually, I think I see what you mean here, I have a custom fact mid write which looks like this: Facter.add(:nagios_hostgroups) do setcode do if FileTest.exists?("/var/lib/puppet/classes.txt") nagios_hostgroups = "" File.open("/var/lib/puppet/classes.txt") { |

Re: [Puppet Users] Managing /etc/fstab options with augeas

2011-06-08 Thread Adam Heinz
On Thu, Jun 2, 2011 at 4:22 AM, Giovanni Bordello wrote: > I'm trying to manage mount options in /etc/fstab with Augeas but can't > figure out how to add more than one option. Have you looked at puppet's 'mount' type? -- You received this message because you are subscribed to the Google Groups

Re: [Puppet Users] Puppet managed hosts in multiple nagios hostgroups

2011-06-08 Thread Chris Phillips
Some more specifics on *exactly* how you manage this text file would be appreciated. On 8 June 2011 15:00, Brian Gallew wrote: > I solved this in a similar manner. I wrote a custom fact (which > essentially returned /var/lib/puppet/state/classes.txt) and then a custom > function that generated

Re: [Puppet Users] Puppet managed hosts in multiple nagios hostgroups

2011-06-08 Thread Brian Gallew
I solved this in a similar manner. I wrote a custom fact (which essentially returned /var/lib/puppet/state/classes.txt) and then a custom function that generated a list of hostgroups based on that. On Wed, Jun 8, 2011 at 6:47 AM, Chris Phillips wrote: > > > On 8 June 2011 13:30, Martijn Grendel

Re: [Puppet Users] Puppet managed hosts in multiple nagios hostgroups

2011-06-08 Thread Chris Phillips
On 8 June 2011 13:30, Martijn Grendelman wrote: > Hi, > > > i want to archive the following: > > > > i define an exported ressource for HostX to be monitored in nagios: > > > > @@nagios_host { $fqdn: > > ensure => present, > > alias => $hostname, >

Re: [Puppet Users] extlookup error

2011-06-08 Thread Markus Falb
On 8.6.2011 13:54, R.I.Pienaar wrote: > yes, it works. you need to be sure to run the extlookup.rb that > comes with the new puppet not the old one I had removed extlookup.rb from my module but now I found another instance of extlookup in libdir on puppetmaster. Working now. Thank You. > > --

Re: [Puppet Users] Puppet managed hosts in multiple nagios hostgroups

2011-06-08 Thread Martijn Grendelman
Hi, > i want to archive the following: > > i define an exported ressource for HostX to be monitored in nagios: > > @@nagios_host { $fqdn: > ensure => present, > alias => $hostname, > address=> $ipadress, > use

[Puppet Users] Puppet managed hosts in multiple nagios hostgroups

2011-06-08 Thread elderdakkar
Hello i want to archive the following: i define an exported ressource for HostX to be monitored in nagios: @@nagios_host { $fqdn: ensure => present, alias => $hostname, address=> $ipadress, use=> "generi

Re: [Puppet Users] cucumber-puppet -- storeconfigs -- Feature #4724

2011-06-08 Thread Nikolay Sturm
* denmat [2011-06-07]: > Where would I add/replace see this code? What does it do? cucumber-puppet does not yet deal with storeconfigs and as the warning is harmless, I suggest you just silence it by raising the loglevel in your Scenario: Given I use storeconfigs HTH, Nikolay -- "It's

Re: [Puppet Users] extlookup error

2011-06-08 Thread R.I.Pienaar
hey, yes, it works. you need to be sure to run the extlookup.rb that comes with the new puppet not the old one - Original Message - > Hi, > > Until now I used puppet 0.25.5. I tried upgrading to 2.6.8 > extlookup does not work for me anymore > > err: Could not retrieve catalog from rem

[Puppet Users] extlookup error

2011-06-08 Thread Markus Falb
Hi, Until now I used puppet 0.25.5. I tried upgrading to 2.6.8 extlookup does not work for me anymore err: Could not retrieve catalog from remote server: Error 400 on SERVER: undefined local variable or method `parser' for # at /var/puppet/data-prod/manifests/XXX/nodes.pp:17 on node XXX I remove