Re: [Puppet Users] Review of new type provider
Jesse Peterson wrote: Hello, I'm new to both Ruby and Puppet. Puppet is fantastic - loving it so far. I created a new type provider (of parsed file type) for modifying newsyslog.conf files and am hoping some folks would be willing to review it to make sure there are no glaring mistakes or perhaps some shortcuts or language features I've missed since I'm new to both. Any input would be welcome. Either email directly or just comment on the gist if it gets to be off topic: https://gist.github.com/1230749 Looks okay to me - I'd recommend writing some tests for it - ParsedFile providers are notorious for subtle bugs and small changes causing odd effects. How often do new types/providers make it into the base system? Should one pursue that avenue (or perhaps the puppet modules project?). We're trying to keep the core lean and mean. So I'd recommend creating and adding a module to the Forge (http://forge.puppetlabs.com) with your new type and provider. Regards James -- James Turnbull Puppet Labs 1-503-734-8571 Join us for PuppetConf http://www.bit.ly/puppetconfsig, September 22nd and 23rd in Portland, Oregon, USA. -- 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 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.
Re: [Puppet Users] Re: qualified variables in templates
Ok. so template and class share the scope and tehre's no need to qualify its vars. Thanks for your replies and for the link. Cheers, Arnau -- 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 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.
[Puppet Users] Software inventory
Howdy, Before I go about writing one myself, anyone out there written a software inventory module/fact for gathering a list of all installed rpms/debs on a system? Got a few ideas floating around in my head, but wanted to see if/what other folks have done .. -- I've seen things you people wouldn't believe. Attack ships on fire off the shoulder of Orion. I watched C-beams glitter in the dark near the Tannhauser gate. All those moments will be lost in time... like tears in rain... Time to die. -- 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 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.
[Puppet Users] Re: Puppet is very slow when running in AWS
DNS seems OK. It is looking like problem may be with EBS. I am collecting more data and may write another post later. On Sep 19, 7:00 pm, Romain Pelisse bela...@gmail.com wrote: I had some issues on my first trial with Puppet on AWS because of DNS resolution. I used Amazon R53 and the all damn thing was very slow (however you could clearly see this issue with wireshark). Maybe this hint will help you... On 20 September 2011 00:14, Troy Stribling troy.stribl...@gmail.com wrote: I am using Puppet 2.7.2 with ruby 1.8.7 (2010-01-10 patchlevel 249) and 64 bit Ubuntu 10.4. I have a Vagrant environment which I have been using for development. In the vagrant environment about 5 minutes is required to run all of the modules used for the configuration I have been developing. When I run exactly the same modules in AWS several hours are required. The Vagrant VM has 1 CPU and 1 GB of memory. The AWS VM is an M1.Large with 2 CPUs and 8GB of memory, When running in AWS the puppet process is consuming most a CPU the entire time. Memory usage is low and their is no excessive disk or network IO. The modules are eventually executed without error. Has anyone seen similar behavior? Thanks, -- 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 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. -- Romain PELISSE, *The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it -- Terry Pratchett*http://belaran.eu/wordpress/belaran -- 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 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.
Re: [Puppet Users] Software inventory
On Wed, Sep 21, 2011 at 9:45 AM, Glenn Bailey replic...@dallaslamers.orgwrote: Howdy, Before I go about writing one myself, anyone out there written a software inventory module/fact for gathering a list of all installed rpms/debs on a system? Got a few ideas floating around in my head, but wanted to see if/what other folks have done .. you can already do this with: puppet resource package this will generate a manifests that represents all of the packages installed on a system. -- I've seen things you people wouldn't believe. Attack ships on fire off the shoulder of Orion. I watched C-beams glitter in the dark near the Tannhauser gate. All those moments will be lost in time... like tears in rain... Time to die. -- 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 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. -- Join us for PuppetConf http://bit.ly/puppetconfsig, September 22nd and 23rd in Portland, OR. http://bit.ly/puppetconfsig -- 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 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.
Re: [Puppet Users] Software inventory
Well, puppet does include a native facility for doing this... try running and see if the output meets your needs: puppet resource package I guess the question before extending this to a module, is what exactly do you want to do with the data? -Brian On Wed, Sep 21, 2011 at 12:45 PM, Glenn Bailey replic...@dallaslamers.orgwrote: Howdy, Before I go about writing one myself, anyone out there written a software inventory module/fact for gathering a list of all installed rpms/debs on a system? Got a few ideas floating around in my head, but wanted to see if/what other folks have done .. -- I've seen things you people wouldn't believe. Attack ships on fire off the shoulder of Orion. I watched C-beams glitter in the dark near the Tannhauser gate. All those moments will be lost in time... like tears in rain... Time to die. -- 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 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. -- http://aws.amazon.com/solutions/solution-providers/brandorr/ -- 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 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.
Re: [Puppet Users] Software inventory
Before I go about writing one myself, anyone out there written a software inventory module/fact for gathering a list of all installed rpms/debs on a system? Got a few ideas floating around in my head, but wanted to see if/what other folks have done .. you can already do this with: puppet resource package this will generate a manifests that represents all of the packages installed on a system. Let me re-phrase a bit, I'm trying to get a fact setup to collect this information and I can report of my Puppet DB. Was just thinking of doing an auto-increment so it would be something like package0 = package_name-version package1 = package_name-version etc. Parsing puppet resource package will make it easier for writing a single module for rpm/deb .. -- 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 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.
Re: [Puppet Users] Software inventory
its also pretty easy to programatically access the information, which could make parsing it easier: require 'puppet' Puppet::Type.type(:package).instances On Wed, Sep 21, 2011 at 10:53 AM, Glenn Bailey replic...@dallaslamers.orgwrote: Before I go about writing one myself, anyone out there written a software inventory module/fact for gathering a list of all installed rpms/debs on a system? Got a few ideas floating around in my head, but wanted to see if/what other folks have done .. you can already do this with: puppet resource package this will generate a manifests that represents all of the packages installed on a system. Let me re-phrase a bit, I'm trying to get a fact setup to collect this information and I can report of my Puppet DB. Was just thinking of doing an auto-increment so it would be something like package0 = package_name-version package1 = package_name-version etc. Parsing puppet resource package will make it easier for writing a single module for rpm/deb .. -- 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 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. -- Join us for PuppetConf http://bit.ly/puppetconfsig, September 22nd and 23rd in Portland, OR. http://bit.ly/puppetconfsig -- 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 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.
Re: [Puppet Users] facter fails to detect network interfaces with long names
Looking at the gentoo response in the ticket, the decision to maintain the interface truncation looks pretty final. Regardless of this, supporting iproute2 should be a priority, since I've heard of minimal arch installs that don't include net-tools at all and we can expect the trend towards iproute2 to continue. On Tue, Sep 20, 2011 at 7:52 PM, Matthew Marlowe ma...@gentoo.org wrote: All, I put in a request to have the gentoo bug reopened and see if we can apply the same patch that the other distributions used. Thanks, Matt On Tue, Sep 20, 2011 at 11:16 AM, Alex L. Demidov alexeydemi...@gmail.com wrote: On Tue, Sep 20, 2011 at 06:50:25PM +0100, Ken Barber wrote: I think this gives a little weight to this ticket for Facter then: http://projects.puppetlabs.com/issues/1346 Although - I don't see a 9 char limitation on Debian Wheezy. Not sure where that patch came from though. I wonder how many other distros suffer from this. It seems that they (and RHEL/Fedora) patched this long ago. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=405521 Of slightly related interest - I do see a 15 character limit when using 'brctl addbr somelongnamefoo' to create a named interface - and that seems to exist for both ifconfig and ip addr when reading the interfaces. So I'm guessing 15 chars is the kernel limit or perhaps brctl limit :-). Luckily all my interface names under 15 chars length. ken. On Tue, Sep 20, 2011 at 6:31 PM, Alex L. Demidov alexeydemi...@gmail.com wrote: On Tue, Sep 20, 2011 at 06:24:40PM +0100, Ken Barber wrote: Hi Alex, What happens when you run 'ip addr list' instead? It shows interface names properly and not truncated. ken. On Tue, Sep 20, 2011 at 6:20 PM, Alex L. Demidov alexeydemi...@gmail.com wrote: I have Gentoo host where `ifconfig -a` prints long interface names truncated to 9 chars (there is closed bug report [1]). Unfortunately, `facter` uses `ifconfig -a` output to get list of interface names and because of truncation it generates `interfaces` fact with incorrect interface names. Also it fails to retrieve individual interface information with following message for each interface with name myinterface: Device myinterfa does not exist. myinterfa: error fetching interface information: Device not found [1]: https://bugs.gentoo.org/show_bug.cgi?id=179920 -- Alex L. Demidov (ALD9-RIPE). http://alexeydemidov.com/ Freelance Consulting. -- 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 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. -- 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 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. -- Alex L. Demidov (ALD9-RIPE). http://alexeydemidov.com/ Freelance Consulting. -- 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 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. -- 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 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. -- Adrien Thebo Puppet Labs Operations adr...@puppetlabs.com -- 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 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.
Re: [Puppet Users] Review of new type provider
On Tue, 20 Sep 2011 23:19:36 -0700, James Turnbull wrote: Jesse Peterson wrote: Hello, I'm new to both Ruby and Puppet. Puppet is fantastic - loving it so far. I created a new type provider (of parsed file type) for modifying newsyslog.conf files and am hoping some folks would be willing to review it to make sure there are no glaring mistakes or perhaps some shortcuts or language features I've missed since I'm new to both. Any input would be welcome. Either email directly or just comment on the gist if it gets to be off topic: https://gist.github.com/1230749 Looks okay to me - I'd recommend writing some tests for it - ParsedFile providers are notorious for subtle bugs and small changes causing odd effects. How often do new types/providers make it into the base system? Should one pursue that avenue (or perhaps the puppet modules project?). We're trying to keep the core lean and mean. So I'd recommend creating and adding a module to the Forge (http://forge.puppetlabs.com) with your new type and provider. Regards James I'd definitely recommend writing tests for it, as well. If you're looking for some examples of tests around parsed file based types, you might want to take a look at some of the work that was done to split out the mount type into two separate types[1]. The only tricky part of copying the test setup from the split mount types is that you'll need to have the puppet and facter source trees in addition to your new type's source tree, and make sure that it's available to ruby when you run the tests. I've been achieving this by running the tests with the following: RUBYLIB=`pwd`/../puppet/lib:`pwd`/../facter/lib rspec spec We should really go back and create a README with this info for the split mount type repo. [1] https://github.com/puppetlabs/puppetlabs-mount-providers -- Jacob Helwig , | Join us for PuppetConf, September 22nd and 23rd in Portland, OR | http://bit.ly/puppetconfsig ` signature.asc Description: Digital signature
Re: [Puppet Users] Announcement: Geppetto 2.0.0 released
We are experiencing problems with downloads from github at the moment. Trying to fix the issues. Regards - henrik On 9/19/11 4:59 AM, Henrik Lindberg wrote: The 2.0.0 release of Geppetto is available as download and updates from within Geppetto for all users of 1.0.x. Please see the FAQ at: http://cloudsmith.github.com/geppetto/faq.html for information if you run into problems updating. Checkout http://cloudsmith.github.com/geppetto/faq.html#2011/06/28/how-do-i-update if you need instructions how to run update. In this release === * Code completion of resource expressions (types and definitions) and their attributes. * Selection of puppet target (2.6 or 2.7) can now be made in preferences. Puppet 2.7 is now the default. * Tasks are now generated from comments. Comments with the tags todo or fixme (case insensitive) are interpreted as tasks and show up in the Task View. An exclamation mark ! anywhere in the message makes the task important. When comments ends with a tag, the text on the same line up to the tag is used as task text. e.g. '$mispeled = false # fixme'. * Support for search path and environment (removes many ambiguity warnings). This feature provides detailed control over what is visible and prioritizes among otherwise ambiguous matches. Preferences available globally and per project. * Wizards have been improved (added wizards, better names, error handling). * Improvements to validation (more cases and code-smells caught) * Suggestions and quickfix using soundex for unknown names-errors. Type 'gebud' and Geppetto will guess you meant 'debug'. * Preference pages added, and preferences per project supported. * Auto edit (auto insert) of '' () {} [] /* */ can be turned on/off individually via preferences. * Check for updates of Geppetto turned on by default in packaged Geppetto. Check out the preferences for detailed control over update policy. * Packaged Geppetto uses Eclipse Indigo as base (IDE version supports = Helios SR2). This means numerous bugfixes and enhancements to the general platform. * Nice icons for files, Modulefile, Manifests and puppet projects. * Supports alternate location of forge (mainly for testing). * Log View added to packaged Geppetto (it was hard to find details about some errors without this). * Numerous issues fixes. See https://github.com/cloudsmith/geppetto/wiki/Release-Notes for more detailed information about fixed issues. Update site is available. The full downloads are being uploaded as this message is going out... Hope to see you at PuppetConf. There will be demos... Regards - henrik -- 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 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.
[Puppet Users] deliberately causing template failure?
How do I cause template failure in the erb ruby? I'd like the same kind of failure as for a template syntax issue, where puppet keeps going. I know I can use exit in a template, but I haven't yet tested if that will simply cause my puppet agent to exit altogether. Background: I'm trying to template /etc/network/interfaces on Debian/Ubuntu, so of course there can be many different interfaces, but each one must have certain values (like ip address). I want it so that if a value in the data hash is missing then I can cause the template, and thus the file declaration to fail. That will save us from incorrect data entry when defining interfaces. As an example, I'd like something like the following, but if the nil caused the file to not be created, rather than created with the this file is portion as follows: # cat /etc/puppet/templates/xx.erb this file is %= if xx.has_key?('zz') xx['zz'] else nil end % # cat /tmp/xx.pp $xx = { yy = 'aa', qq = 'bb' } file { '/tmp/xx.txt': content = template('xx.erb'), } # puppet apply /tmp/xx.pp notice: /Stage[main]//File[/tmp/xx.txt]/ensure: defined content as '{md5}7433a07924aa1785f0c567cc7c5aedfb' # cat /tmp/xx.txt this file is # -- 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 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.
[Puppet Users] Re: Software inventory
On Sep 21, 10:53 am, Glenn Bailey replic...@dallaslamers.org wrote: Before I go about writing one myself, anyone out there written a software inventory module/fact for gathering a list of all installed rpms/debs on a system? Got a few ideas floating around in my head, but wanted to see if/what other folks have done .. you can already do this with: puppet resource package this will generate a manifests that represents all of the packages installed on a system. Let me re-phrase a bit, I'm trying to get a fact setup to collect this information and I can report of my Puppet DB. Was just thinking of doing an auto-increment so it would be something like package0 = package_name-version package1 = package_name-version etc. Parsing puppet resource package will make it easier for writing a single module for rpm/deb .. You could distribute a custom fact like this one: https://github.com/ripienaar/facter-facts/tree/master/facts-dot-d Then you can use a cron job that runs rpm -qa and populates /etc/ facts.d/pkgs.txt like so: pkg0=httpd-2.2.15-5.el6.centos.x86_64 pkg1=nscd-2.12-1.7.el6.x86_64 . . or even pkgs=httpd-2.2.15-5.el6.centos.x86_64:nscd-2.12-1.7.el6.x86_64:other_pkgs_colon_seperated Either way, it doesn't look elegant if a large number of packages is installed. If you care about certain packages only, you can populate the file with those package names. Or you can populate it with the output of yum check-update or apt- get upgrade -V -- 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 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.
Re: [Puppet Users] Software inventory
- Original Message - its also pretty easy to programatically access the information, which could make parsing it easier: require 'puppet' Puppet::Type.type(:package).instances the puppetral mcollective agent does something similar in a generic fashion so you can just query the network and gather this info. -- 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 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.
Re: [Puppet Users] deliberately causing template failure?
On Wed, Sep 21, 2011 at 12:00, Christopher Wood christopher_w...@pobox.com wrote: How do I cause template failure in the erb ruby? I'd like the same kind of failure as for a template syntax issue, where puppet keeps going. I know I can use exit in a template, but I haven't yet tested if that will simply cause my puppet agent to exit altogether. I believe you should be able to `raise Puppet::Error, your message here` and have that fail in the way you desire. Daniel -- ⎋ Puppet Labs Developer – http://puppetlabs.com ♲ 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-users@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.
Re: [Puppet Users] deliberately causing template failure?
using the fail function should work: content = inline_template('%= fail(doh) %') On Wed, Sep 21, 2011 at 12:56 PM, Daniel Pittman dan...@puppetlabs.comwrote: On Wed, Sep 21, 2011 at 12:00, Christopher Wood christopher_w...@pobox.com wrote: How do I cause template failure in the erb ruby? I'd like the same kind of failure as for a template syntax issue, where puppet keeps going. I know I can use exit in a template, but I haven't yet tested if that will simply cause my puppet agent to exit altogether. I believe you should be able to `raise Puppet::Error, your message here` and have that fail in the way you desire. Daniel -- ⎋ Puppet Labs Developer – http://puppetlabs.com ♲ 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-users@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. -- Join us for PuppetConf http://bit.ly/puppetconfsig, September 22nd and 23rd in Portland, OR. http://bit.ly/puppetconfsig -- 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 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.
Re: [Puppet Users] deliberately causing template failure?
Thank you to you and Daniel, both your methods do what I want. On Wed, Sep 21, 2011 at 12:58:38PM -0700, Dan Bode wrote: using the fail function should work: content = inline_template('%= fail(doh) %') On Wed, Sep 21, 2011 at 12:56 PM, Daniel Pittman [1]dan...@puppetlabs.com wrote: On Wed, Sep 21, 2011 at 12:00, Christopher Wood [2]christopher_w...@pobox.com wrote: How do I cause template failure in the erb ruby? I'd like the same kind of failure as for a template syntax issue, where puppet keeps going. I know I can use exit in a template, but I haven't yet tested if that will simply cause my puppet agent to exit altogether. I believe you should be able to `raise Puppet::Error, your message here` and have that fail in the way you desire. Daniel -- ⎋ Puppet Labs Developer – [3]http://puppetlabs.com ♲ 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 [4]puppet-users@googlegroups.com. To unsubscribe from this group, send email to [5]puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at [6]http://groups.google.com/group/puppet-users?hl=en. -- Join us for [7]PuppetConf, September 22nd and 23rd in Portland, OR. -- 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 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. References Visible links 1. mailto:dan...@puppetlabs.com 2. mailto:christopher_w...@pobox.com 3. http://puppetlabs.com/ 4. mailto:puppet-users@googlegroups.com 5. mailto:puppet-users%2bunsubscr...@googlegroups.com 6. http://groups.google.com/group/puppet-users?hl=en 7. http://bit.ly/puppetconfsig -- 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 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.
[Puppet Users] Two parameterized classes calling both a thirth class (results in already defined)
Hi all, I have three parameterized classes, named mq, mq_gsk and apache. The mq class always calls the mq_gsk class, but the apache class should only call the mq_gsk class when the mq class is not used in a hosts' node definition Here is my configuration class mq ( $gsk_version = undef ) { require mq::params . class { 'mq_gsk': gsk_version = ${mq::params::package_gsk_version}, } } class mq_gsk ( $gsk_version = undef ) { require mq_gsk::params package { $mq_gsk::params::gsk_packages: ensure = ${mq_gsk::params::package_gsk_version}, } } When a node needs to be configured as an MQ server, the mq class will be included and mq and the mq gsk software will be installed. However some servers only need to have an Apache server installed, but apache uses an additional plugin which requires the mq gsk software also. If I configure a host with either MQ or Apache all is well, but as soon as both classes are included in a node, I get a duplicate / already defined error (as expected) ERROR: Could not retrieve catalog from remote server: Error 400 on SERVER: Duplicate definition: Class[Mq_gsk] is already defined in file /etc/ puppet/modules/apache/manifests/init.pp at line 104; cannot redefine at /etc/puppet/modules/mq/manifests/init.pp:62 on node nodex.domainy.com Within my apache class, I tried to use if defined(), but this does not seem to work at all Here is one of my many attempts if defined(Package[mq_gsk]) { notice ( ${apache::params::module_name}, mq module defined, mq_gsk already included ) } else { notice ( ${apache::params::module_name}, mq module not defined, check websphere module defined ) if defined(Package[${apache::params::package_name_module_was}]) { notice ( ${apache::params::module_name}, websphere module defined, mq_gsk included ) class { 'mq_gsk': gsk_version = undef, } } } I also tried other things which I read on Puppet Users, like if defined(mq_gsk) { if defined(mg_gsk::gsk_version) { but nothings seems to work. It always says that the mq module is defined (while the mq class is not included in the host definition) or it says not included (while the mq class is included in the node) I wonder I 'defined' is to way forward, of if there is a better way to solve the 'already defined' issue. I'm using puppet 2.7.3 on CentOS/RHEL 5.7 -- 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 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.
[Puppet Users] Variable number of variables in external node output...
All, I have a situation where I need to get some fairly complex configuration files onto systems, and I'm wondering if puppet can even do this. Lets say that my external node script will go and source all the data it needs from an external database, and dump out all variables that the node will need. The relevant puppet module(s) will then have to inject these variables into templates to be deployed to the systems. Now, what if the number of variables that get dumped by the external node script is variable? And, what if these variables are broken into chunks that need to be split into different files on the remote system? How would I do such a complex thing in puppet? A lack of any type of looping constructs in puppet would seem to make this rather difficult. Doug. -- 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 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.
Re: [Puppet Users] Software inventory
On Wed, Sep 21, 2011 at 7:45 PM, Glenn Bailey replic...@dallaslamers.org wrote: Howdy, Before I go about writing one myself, anyone out there written a software inventory module/fact for gathering a list of all installed rpms/debs on a system? Got a few ideas floating around in my head, but wanted to see if/what other folks have done .. Not sure what exactly you are looking for, but a few years ago I wrote a rails [1] app to collect and show/search etc all packages across all hosts etc in a db Ohad [1] https://github.com/ohadlevy/dish -- I've seen things you people wouldn't believe. Attack ships on fire off the shoulder of Orion. I watched C-beams glitter in the dark near the Tannhauser gate. All those moments will be lost in time... like tears in rain... Time to die. -- 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 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. -- 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 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.
[Puppet Users] ANNOUNCE: Facter 1.6.1rc4 available
Facter 1.6.1rc4 is a maintenance release containing a fix for issue #9517, as detailed below. This release is available for download at: http://puppetlabs.com/downloads/facter/facter-1.6.1rc4.tar.gz See the Verifying Puppet Download section at: http://projects.puppetlabs.com/projects/puppet/wiki/Downloading_Puppet Please report feedback via the Puppet Labs Redmine site, using an affected version of 1.6.1rc4: http://projects.puppetlabs.com/projects/facter/ Full Release Notes at: https://projects.puppetlabs.com/projects/facter/wiki/ Facter 1.6.1rc4 Release Notes === -- Fix physicalprocessorcount on windows Fix #9517 A broken test led to a broken fact. The WMI.execquery was incorrectly stubbed to return an array when the actual WMI.execquery does not return an array. This means that length, which works on arrays, does not work with WMI.execquery. This fixes both the fact and the test. The test is unfortunately lifted to a higher level, but it has the benefit of being correct. Thanks to Eric Stonfer for the fact fix. -- CHANGELOG 3117e82 (#9517) Fix physicalprocessorcount on windows -- 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 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.
[Puppet Users] CloudPack's node install .... ignores certname
although in cloudpack.rb::install(...) user specified certname is supprted (i.e. options[:certname] ||= Guid.new.to_s), the certname is not passed to the method when supplied through command line. any idea? tx -- 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 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.
[Puppet Users] Re: Software inventory
Does anyone else have any concern about populating custom facts that list ALL packages installed on a system? My sense is that it has the potential to create a lot of overhead for facter, and in turn puppet itself. (A typical linux system will have hundreds of packages installed). I also don't think putting the data in facter as key value pairs necessarily presents the data in a useful form, but that may be in the eye of the beholder. -Brian On Sep 21, 3:14 pm, Ashay ashay.hum...@gmail.com wrote: On Sep 21, 10:53 am, Glenn Bailey replic...@dallaslamers.org wrote: Before I go about writing one myself, anyone out there written a software inventory module/fact for gathering a list of all installed rpms/debs on a system? Got a few ideas floating around in my head, but wanted to see if/what other folks have done .. you can already do this with: puppet resource package this will generate a manifests that represents all of the packages installed on a system. Let me re-phrase a bit, I'm trying to get a fact setup to collect this information and I can report of my Puppet DB. Was just thinking of doing an auto-increment so it would be something like package0 = package_name-version package1 = package_name-version etc. Parsing puppet resource package will make it easier for writing a single module for rpm/deb .. You could distribute a custom fact like this one:https://github.com/ripienaar/facter-facts/tree/master/facts-dot-d Then you can use a cron job that runs rpm -qa and populates /etc/ facts.d/pkgs.txt like so: pkg0=httpd-2.2.15-5.el6.centos.x86_64 pkg1=nscd-2.12-1.7.el6.x86_64 . . or even pkgs=httpd-2.2.15-5.el6.centos.x86_64:nscd-2.12-1.7.el6.x86_64:other_pkgs_colon_seperated Either way, it doesn't look elegant if a large number of packages is installed. If you care about certain packages only, you can populate the file with those package names. Or you can populate it with the output of yum check-update or apt- get upgrade -V -- 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 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.
Re: [Puppet Users] CloudPack's node install .... ignores certname
We recently noticed the same issue. I have a feeling that is may be related to the version of puppet that is running. What version are you running? We have actually been actively working on a fix in the following pull request: https://github.com/puppetlabs/puppetlabs-cloud-provisioner/pull/16 a fix should be available in master soon On Wed, Sep 21, 2011 at 2:13 PM, Hamoun gh hamoun...@gmail.com wrote: although in cloudpack.rb::install(...) user specified certname is supprted (i.e. options[:certname] ||= Guid.new.to_s), the certname is not passed to the method when supplied through command line. any idea? tx -- 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 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. -- Join us for PuppetConf http://bit.ly/puppetconfsig, September 22nd and 23rd in Portland, OR. http://bit.ly/puppetconfsig -- 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 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.
Re: [Puppet Users] Variable number of variables in external node output...
Puppet can do this. I would propose the following solution, but there may be other ways to do it. 1) Use a template. Templates have embedded ruby code and run on the clients. 2) Link to some library that allows you to query your database (You can use one or more require statements in your ruby code) 3) Embed ruby code to parse and format your variables into configuration See http://docs.puppetlabs.com/guides/templating.html for a bit more about templates. -Brian On Wed, Sep 21, 2011 at 4:20 PM, Douglas Garstang doug.garst...@gmail.comwrote: All, I have a situation where I need to get some fairly complex configuration files onto systems, and I'm wondering if puppet can even do this. Lets say that my external node script will go and source all the data it needs from an external database, and dump out all variables that the node will need. The relevant puppet module(s) will then have to inject these variables into templates to be deployed to the systems. Now, what if the number of variables that get dumped by the external node script is variable? And, what if these variables are broken into chunks that need to be split into different files on the remote system? How would I do such a complex thing in puppet? A lack of any type of looping constructs in puppet would seem to make this rather difficult. Doug. -- 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 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. -- http://aws.amazon.com/solutions/solution-providers/brandorr/ -- 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 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.
Re: [Puppet Users] Variable number of variables in external node output...
Remember too that if you can do it once (say with a define) Puppet will do it as many times as you like just by putting the data in an array. On Sep 21, 2011 2:39 PM, Brian Gupta brian.gu...@brandorr.com wrote: Puppet can do this. I would propose the following solution, but there may be other ways to do it. 1) Use a template. Templates have embedded ruby code and run on the clients. 2) Link to some library that allows you to query your database (You can use one or more require statements in your ruby code) 3) Embed ruby code to parse and format your variables into configuration See http://docs.puppetlabs.com/guides/templating.html for a bit more about templates. -Brian On Wed, Sep 21, 2011 at 4:20 PM, Douglas Garstang doug.garst...@gmail.comwrote: All, I have a situation where I need to get some fairly complex configuration files onto systems, and I'm wondering if puppet can even do this. Lets say that my external node script will go and source all the data it needs from an external database, and dump out all variables that the node will need. The relevant puppet module(s) will then have to inject these variables into templates to be deployed to the systems. Now, what if the number of variables that get dumped by the external node script is variable? And, what if these variables are broken into chunks that need to be split into different files on the remote system? How would I do such a complex thing in puppet? A lack of any type of looping constructs in puppet would seem to make this rather difficult. Doug. -- 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 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. -- http://aws.amazon.com/solutions/solution-providers/brandorr/ -- 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 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. -- 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 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.
Re: [Puppet Users] Software inventory
On Wed, Sep 21, 2011 at 9:45 AM, Glenn Bailey replic...@dallaslamers.org wrote: Howdy, Before I go about writing one myself, anyone out there written a software inventory module/fact for gathering a list of all installed rpms/debs on a system? Got a few ideas floating around in my head, but wanted to see if/what other folks have done .. We've written some custom facts that return a JSON string and then we wrote a custom function that uses PSON.parse() to process and return the native data. Since puppet supports arrays and dictionaries, this works well. One problem is if you have any Nones/Nulls in your JSON, PSON.parse() doesn't handle them right. Once bubbled up to puppet, they don't come out as undef.. they come out as some strange type that puppet doesn't recognize as false yet has no value. So we post process the PSON.parse() and clean out the Ruby nil's and just make them . -- 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 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.
Re: [Puppet Users] Re: Software inventory
On Wed, Sep 21, 2011 at 2:29 PM, Brian Gupta brian.gu...@brandorr.com wrote: Does anyone else have any concern about populating custom facts that list ALL packages installed on a system? My sense is that it has the potential to create a lot of overhead for facter, and in turn puppet itself. (A typical linux system will have hundreds of packages installed). I also don't think putting the data in facter as key value pairs necessarily presents the data in a useful form, but that may be in the eye of the beholder. Filling this use case was a big driver behind moving catalog requests from GET to POST in Puppet 2.7.x In earlier versions you'll often run into limitations with the amount of data being sent to the server with thousands of packages, but I did some tests in early 2.7.x with real-world Linux installs and facts for every installed package, and it worked reasonably well. -Brian On Sep 21, 3:14 pm, Ashay ashay.hum...@gmail.com wrote: On Sep 21, 10:53 am, Glenn Bailey replic...@dallaslamers.org wrote: Before I go about writing one myself, anyone out there written a software inventory module/fact for gathering a list of all installed rpms/debs on a system? Got a few ideas floating around in my head, but wanted to see if/what other folks have done .. you can already do this with: puppet resource package this will generate a manifests that represents all of the packages installed on a system. Let me re-phrase a bit, I'm trying to get a fact setup to collect this information and I can report of my Puppet DB. Was just thinking of doing an auto-increment so it would be something like package0 = package_name-version package1 = package_name-version etc. Parsing puppet resource package will make it easier for writing a single module for rpm/deb .. You could distribute a custom fact like this one:https://github.com/ripienaar/facter-facts/tree/master/facts-dot-d Then you can use a cron job that runs rpm -qa and populates /etc/ facts.d/pkgs.txt like so: pkg0=httpd-2.2.15-5.el6.centos.x86_64 pkg1=nscd-2.12-1.7.el6.x86_64 . . or even pkgs=httpd-2.2.15-5.el6.centos.x86_64:nscd-2.12-1.7.el6.x86_64:other_pkgs_colon_seperated Either way, it doesn't look elegant if a large number of packages is installed. If you care about certain packages only, you can populate the file with those package names. Or you can populate it with the output of yum check-update or apt- get upgrade -V -- 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 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. -- Nigel Kersten Product Manager, Puppet Labs Join us for PuppetConf http://www.bit.ly/puppetconfsig Sept 22/23 Portland, Oregon, USA. -- 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 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.
[Puppet Users] ANNOUNCE: Puppet-Dashboard 1.2.1 available
This is a maintenance release of Puppet Dashboard. This release resolves issues #7405, #9101, #8878, and #8803. More details below. This release is available for download at: http://downloads.puppetlabs.com/dashboard/ We have included Debian and RPM packages as well as a tarball. See the Verifying Puppet Download section at: http://projects.puppetlabs.com/projects/puppet/wiki/Downloading_Puppet Please report feedback via the Puppet Labs Redmine site, using an affected version of 1.2.1 http://projects.puppetlabs.com/projects/dashboard Documentation is available at: http://docs.puppetlabs.com/dashboard/index.html 1.2.1 Release Notes === -- Fix #7405 - Daemonized redhat init script for dashboard The previous redhat init script would not daemonize, but would merely background the dashboard server start, so running start over ssh would hang. This patch replaces the 'su -c' with daemon and passes -d to the server start command, so it daemonizes. Start can now be run over ssh without the hang. -- Fix #9101 - Fix Dashboard workers init script on RH The Red Hat Dashboard workers init script last set of fixes had a typo that caused it not to be recognized by chkconfig. This patch fixes that so the script is usable by chkconfig. It also removes duplicate and possibly conflicting blocks of comments that chkconfig can read. -- Fix #8878 - Add ability to add nodes from the group edit/create pages It's really unusable to have to go to each node's edit page to add a list of nodes to a group. Now you can just add the nodes on the group's create or edit page. * 99aa23a Updated CHANGELOG for release 1.2.1 * 881abbf Updated CHANGELOG for 1.2.1rc3 * 0e81c25 (#7405) Daemonized redhat init script for dashboard * 2d92f0f Updated CHANGELOG for 1.2.1rc2 * bcbdbe3 Updated CHANGELOG for 1.2.1rc1 * 3ab0029 (#9101) Fix Dashboard workers init script on RH * 6b10a5e maint: Move duplicated code to a helper method * 02ca4ff maint: Fix node_ids method by not overwriting it with and attr_accessor * a2b864d (#8878) Make code more DRY * 0075dd9 (#8878) Add ability to add nodes from the group edit/create pages * ee59af8 (#8803) A single report page has a header with too much padding -- 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 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.
Re: [Puppet Users] Variable number of variables in external node output...
Thanks, but I'm not sure templates will quite cut it. There is no way that I am aware of to iterate over all the variables obtained through an external node script, and put chunks into separate files. This falls outside the bounds of what embedded ruby can do. As for using define(), well, I am trying to separate the data from the manifest, and putting N number of defines in the manifests and passing values to it, breaks that. Doug. On Wed, Sep 21, 2011 at 2:48 PM, Aaron Grewell aaron.grew...@gmail.com wrote: Remember too that if you can do it once (say with a define) Puppet will do it as many times as you like just by putting the data in an array. On Sep 21, 2011 2:39 PM, Brian Gupta brian.gu...@brandorr.com wrote: Puppet can do this. I would propose the following solution, but there may be other ways to do it. 1) Use a template. Templates have embedded ruby code and run on the clients. 2) Link to some library that allows you to query your database (You can use one or more require statements in your ruby code) 3) Embed ruby code to parse and format your variables into configuration See http://docs.puppetlabs.com/guides/templating.html for a bit more about templates. -Brian On Wed, Sep 21, 2011 at 4:20 PM, Douglas Garstang doug.garst...@gmail.comwrote: All, I have a situation where I need to get some fairly complex configuration files onto systems, and I'm wondering if puppet can even do this. Lets say that my external node script will go and source all the data it needs from an external database, and dump out all variables that the node will need. The relevant puppet module(s) will then have to inject these variables into templates to be deployed to the systems. Now, what if the number of variables that get dumped by the external node script is variable? And, what if these variables are broken into chunks that need to be split into different files on the remote system? How would I do such a complex thing in puppet? A lack of any type of looping constructs in puppet would seem to make this rather difficult. Doug. -- 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 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. -- http://aws.amazon.com/solutions/solution-providers/brandorr/ -- 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 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. -- 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 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. -- Regards, Douglas Garstang http://www.linkedin.com/in/garstang Email: doug.garst...@gmail.com Cell: +1-805-340-5627 -- 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 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.
Re: [Puppet Users] Variable number of variables in external node output...
On Wed, Sep 21, 2011 at 1:20 PM, Douglas Garstang doug.garst...@gmail.com wrote: All, I have a situation where I need to get some fairly complex configuration files onto systems, and I'm wondering if puppet can even do this. Lets say that my external node script will go and source all the data it needs from an external database, and dump out all variables that the node will need. The relevant puppet module(s) will then have to inject these variables into templates to be deployed to the systems. Can you provide an example of a chunk of actual data and the desired end result to see if there's a better alternative Doug? Do you have full control over the external data source and external node script? Are there other systems in place that already rely upon your existing data formats in the external source? Now, what if the number of variables that get dumped by the external node script is variable? And, what if these variables are broken into chunks that need to be split into different files on the remote system? How would I do such a complex thing in puppet? A lack of any type of looping constructs in puppet would seem to make this rather difficult. Doug. -- 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 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. -- Nigel Kersten Product Manager, Puppet Labs Join us for PuppetConf http://www.bit.ly/puppetconfsig Sept 22/23 Portland, Oregon, USA. -- 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 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.
[Puppet Users] Announcing a new committer, plans for adding committers, and new mailing list.
One of the things we're doing to try and increase the community involvement in developing, and guiding Puppet, Facter, and Puppet Dashboard is adding committers that fall under the category of people that don't work for Puppet Labs. Please welcome Stefan Schulte as our newest committer to Puppet! Stefan has consistently provided great feedback and work on both the implementation details, and higher-level design of many, many things both on the mailing lists, and in the Redmine ticketing system. We're very happy that he has decided to become a committer for the open source projects. We plan on increasing the number of people that don't work for Puppet Labs committers as time progresses (hopefully they'll end up the majority), but this will be a little slow to happen at first, since we're not currently setup to add very many new committers and get them all up to speed very quickly. As the committer pool increases, this should be less and less of an issue, and we should be able to better accommodate making sure new committers get any support they need. In addition to reviewing and commenting on code (which we encourage everyone to do, whether or not they are a committer), committers are able to merge the code that they have reviewed into the official repositories. All committers (including those employed by Puppet Labs) are still required to submit their own code as a pull request to have it reviewed and merged by another committer. In addition to adding Stefan as a committer to the open source projects, we've also setup a puppet-ci Google Group[1]. This group is setup to receive the test-suite notifications from out Jenkins instance[2]. I imagine that this list will mainly be of interest to committers, but anyone is welcome to subscribe and post to this list. [1] https://groups.google.com/group/puppet-ci [2] https://jenkins.puppetlabs.com -- Jacob Helwig , | Join us for PuppetConf, September 22nd and 23rd in Portland, OR | http://bit.ly/puppetconfsig ` signature.asc Description: Digital signature
Re: [Puppet Users] Re: exported resources and templating
On Tue, Aug 23, 2011 at 06:21:48AM -0700, jcbollinger wrote: On Aug 22, 8:11 am, puppetlurker under.my.cont...@gmail.com wrote: Greetings, I'm having an issue with my implementation of exported resources. I have a memcache server pool, and want to update the /etc/php.d/ memcache.ini with the ips of all the servers. Previously, I hard coded the $memcacheservers array in the node manifest and the template collected and populated the template. Now that I'm moving to exported resouces, how do I get it to set an array in a way I can access it from a different scope? I tried moving the file { /etc/php.d/memcache.ini: content = template(memcache/ memcache.ini.erb) to the resource function (I understand exported resources shoulld not define other resources), but it only populates the first server collected, and complains about a duplicate resource if I have more than 1 exported server. I've tried defining the resource without the content the first time, then override the define with the content, but that only picks up the 2nd server. I've tried accessing the variable that gets populated after the Memcache::Servers | | but it doesn't get populated in this scope. I've tried looking up the scope.lookupvar('memcached::servers::memcacheservers') but the exported resource is a define not a class and I couldn't get it to work. I've tried just using a script to populate the file with the proper contents, but there is no way to ensure it is filled with all the servers, for example the script is executed out of order, replaced 3 times if there are 3 servers, and may contain 1, 2, or 3 servers after a puppet run. Any suggestions? The way to do this with exported resources is for each node to export a resource containing its own information only. The trick is choosing the resource to use for this. The simplest case would be if /etc/php.d/memcache.ini supports some kind of 'include' directive, especially if it understands globs. Then each server can export its own (distinctly-named) file intended for inclusion, and the node(s) that collect them need only to put the appropriate 'include' directive(s) into the main memcache.ini. So you can't do this with your own defines as the resource? I have various define calls like this: users::normal { bob: id = 107, email = 'b...@bob.com' } What I'm looking to do is collect all the emails into an array or something so I can use them in a template. I thought maybe I could make a define that does an array append or something? It sounds from what people are saying like there really isn't a reasonable way to do this yet? -Robin -- http://singinst.org/ : Our last, best hope for a fantastic future. Lojban (http://www.lojban.org/): The language in which this parrot is dead is ti poi spitaki cu morsi, but this sentence is false is na nei. My personal page: http://www.digitalkingdom.org/rlp/ -- 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 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.
[Puppet Users] Re: apt-get --force-yes
If you don't want to sign your packages try adding this to your apt.conf APT::Get::AllowUnauthenticated true; On Sep 17, 11:33 am, KarthiKeyan. Kesavan ksd@gmail.com wrote: Hi , Yes, i am trying to install the packages from my local repo . Regards Chebrian On Sat, Sep 17, 2011 at 9:01 PM, Sergey Zhuga sergey.zh...@gmail.comwrote: Do you use unsigned repositories? 17.09.2011 18:07, KarthiKeyan. Kesavan пишет: Hi, Not only for jdk i am getting for all the package installation . _Error status _ E: There are problems and -y was used without --force-yes Regards Chebrian On Sat, Sep 17, 2011 at 8:23 PM, Sergey Zhuga sergey.zh...@gmail.com mailto:sergey.zh...@gmail.com** wrote: You should create debconf seeds file before you will install the sun-jdk package, like this: http://blogs.cae.tntech.edu/__**mwr/2008/02/05/stupid-puppet-_** _trick-agreeing-to-the-sun-__**java-license-with-debconf-__** preseeds-and-puppet/http://blogs.cae.tntech.edu/__mwr/2008/02/05/stupid-puppet-__trick-ag... http://blogs.cae.tntech.edu/**mwr/2008/02/05/stupid-puppet-** trick-agreeing-to-the-sun-**java-license-with-debconf-** preseeds-and-puppet/http://blogs.cae.tntech.edu/mwr/2008/02/05/stupid-puppet-trick-agreei... Regards. 17.09.2011 17:39, CHEBRIAN пишет: Hi , I am trying to install jdk thru puppet . i am getting the force-yes error . err: /Stage[main]/Apiserver::Java/_**_Package[sun-java6-jdk]/** ensure: change from purged to present failed: Execution of '/usr/bin/apt-get - q -y -o DPkg::Options::=--force-__**confold install sun-java6-jdk' returned 100: Reading package lists... Please share your idea's to fix this issue, -- 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 mailto:puppet-users@**googlegroups.compuppet-users@googlegroups.com . To unsubscribe from this group, send email to puppet-users+unsubscribe@__goo**glegroups.comhttp://googlegroups.com mailto:puppet-users%**2bunsubscr...@googlegroups.compuppet-users%252bunsubscr...@googlegroups.com **. For more options, visit this group at http://groups.google.com/__**group/puppet-users?hl=enhttp://groups.google.com/__group/puppet-users?hl=en http://groups.google.com/**group/puppet-users?hl=enhttp://groups.google.com/group/puppet-users?hl=en . -- 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 unsubscribe from this group, send email to puppet-users+unsubscribe@**googlegroups.compuppet-users%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/**group/puppet-users?hl=enhttp://groups.google.com/group/puppet-users?hl=en . -- 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 unsubscribe from this group, send email to puppet-users+unsubscribe@** googlegroups.com puppet-users%2bunsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/** group/puppet-users?hl=enhttp://groups.google.com/group/puppet-users?hl=en . -- 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 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.