Re: [Puppet Users] puppet augeas - where to put augeas definition?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Per the snippet above, I'm simply trying to add in an extra entry into my /etc/apt/sources.list but I'm not sure where I would actually put the above piece of code. I currently have it sitting in my init.pp file for the corresponding class but I'm not sure if that's really where it belongs. Is the init.pp file the right place for this and if not, where would I put it? My apologies if this is a stupid question as I'm having a hard time wrapping my head around this one. The answer totally depends on how you would like to structure your modules. Given that you are managing apt-stuff I would assume that you have something like an apt-module and I would place it within there. You could place it there in the init.pp in the apt-class and on all your debian systems, you would do an include apt. However you might not want this repository to be present on all nodes, actually only on the ones that need the client-repo. So then a class called apt::repos::client (in the apt-modules in manifests/repos/client.pp ) might be the better place to put it and include this class on all nodes that require this repository. This has even a different advantage: Maybe the main purpose for this repository is have the packages available to install certain applications - that you are also managing by puppet. So you could include this repo-class only in the classes that manage the packages for these applications (specify a dependency!) and you have not anymore to think about this apt-dependency if you apply a certain application-class to a node. But this might already be a little bit off-the-topic. Anyway http://www.slideshare.net/PuppetLabs/roles-talk is really a good practice to structure your puppet code. ~pete -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlLg0tkACgkQbwltcAfKi3+YzACfSSsiJpa0nr9/XvpNjRNtIS1L RXwAn3UPFCCJVC4F3twiozCGNqI4PAoI =I0Xj -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/52E0D2DF.4070306%40immerda.ch. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Choo choo here comes the FOSDEM train
Hi everyone, This is starting to shape up nicely. We've got a group of about twenty people registered now, I'm guessing a few more will join us so I'm thinking we'll end up with about 30 people, which is good. As you all know, the FOSDEM beer party is taking place the night before in Delirium. If you haven't been to Delirium, even if you don't like beer, just go and have a look around. The sheer amount of beer available is mind-blowing. If you're wondering about the local cuisine, the Huffington Post is here to help you: http://www.huffingtonpost.com/2014/01/21/belgian-cuisine-food_n_4617498.html Johan: Do we have an idea yet where we can crash with 20-30 people? -- Daniele Sluijters -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/3cda1ead-993b-4b9d-9f50-75198552c88e%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Choo choo here comes the FOSDEM train
On 01/23/2014 11:18 AM, Daniele Sluijters wrote: Hi everyone, This is starting to shape up nicely. We've got a group of about twenty people registered now, I'm guessing a few more will join us so I'm thinking we'll end up with about 30 people, which is good. As you all know, the FOSDEM beer party is taking place the night before in Delirium. If you haven't been to Delirium, even if you don't like beer, just go and have a look around. The sheer amount of beer available is mind-blowing. If you're wondering about the local cuisine, the Huffington Post is here to help you: http://www.huffingtonpost.com/2014/01/21/belgian-cuisine-food_n_4617498.html Johan: Do we have an idea yet where we can crash with 20-30 people? Not really, maybe we should send out some scouts, and do a reservation in the neighbourhood ? Previous year, seems the puppeteers took over an italian restaurant :) Sogno D'italia. -- Daniele Sluijters -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/3cda1ead-993b-4b9d-9f50-75198552c88e%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Johan De Wit Open Source Consultant Red Hat Certified Engineer (805008667232363) Puppet Certified Professional 2013 (PCP006) _ Open-Future Phone +32 (0)2/255 70 70 Zavelstraat 72 Fax +32 (0)2/255 70 71 3071 KORTENBERG Mobile+32 (0)474/42 40 73 BELGIUM http://www.open-future.be _ Next Events: Puppet Fundamentals Training | http://www.open-future.be/puppet-fundamentals-training-4-till-6th-february Puppet Intruction Course | http://www.open-future.be/puppet-introduction-course-7th-february Zabbix Certified Training | http://www.open-future.be/zabbix-certified-training-10-till-12th-february Zabbix for Large Environments Training | http://www.open-future.be/zabbix-large-environments-training-13-till-14th-february Subscribe to our newsletter | http://eepurl.com/BUG8H -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/52E0EE98.4010403%40open-future.be. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Puppet Not Running chkconfig correctly.
Just thought I would post as I just had nearly the same issue on CentOS 6. The mode for my init script was '0750'. The init script would not register with Puppet, or by executing chkconfig servicename on. I changed the mode to '0755' like all the other existing init scripts and it works as expected now. On Monday, November 9, 2009 5:27:42 PM UTC-8, Douglas wrote: So, I noticed that when adding a service to puppet, puppet is running a chkconfig service. However, as far as I can tell, puppet should be running a chkconfig --add service, otherwise the symlinks don't get created from the service in /etc/rc.d/rc6.d back to the service in /etc/init.d. As as a result, the service is not stopped on shut down. I must be missing something here... Anyone? Doug -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/cfd3cea5-d367-4a9f-b512-4a3b8a8b911b%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] roll back update
You can also do zfs/btrfs snapshots before doing a distribution upgrade, allowing for a rollback of the OS. SuSE has rolled this into some of the most recent versions of their OS (I believe the command line tool is called snapper). EIther way, none of the solutions are particularly puppet oriented. On Wed 22 Jan 2014 06:00:57 PM EST, Steven VanDevender wrote: Jason Antman writes: There's nothing existing that I know of that works in the GUI-based way you seem to be talking about. Because, well, we *nix people usually don't do that. I've really only worked on RPM-based systems, so I'm not sure if this is still applicable in the debian world... Debian-based distributions have interactive tools like aptitude (curses-based) or synaptic (GNOME GUI) that can let you do selective package installation and upgrades on a host, in addition to the command-line apt-get and dpkg utilties. These don't really offer centralized management of a group of hosts, though. In the RPM world there's Spacewalk (or the Red Hat Satellite Server commercial product based on it) for doing centralized package management. There's probably some equivalent in the Debian world but I'm not aware of what that is. Setting up a local repository mirror can let you control what packages are visible to hosts so you can control package versions for installation and upgrades (in fact, I've seen people set up multiple mirrors visible to different environments so they can do things like staged upgrade testing). There are 2 types of updates I do 1) updating one package or a set of packages (like, updating Puppet from 3.1.0 to 3.4.1) which I do with the ensure parameter on the Package type. Some stuff is wrapped up in classes, and this can be done through an ENC (parameterized classes, or global params if need be) or Hiera. I'll change the version on one node, test it, then an environment, test it, and eventually apply it everywhere. If you need to downgrade/roll back, that *can* work... might work better in the apt/deb world than it does in yum/rpm. 2) Full system updates/upgrades, what RHEL-derivatives term as distribution upgrades, i.e. updating all packages from CentOS 6.3 to 6.4. I rebuild the box. No reason to mess with doing this through the distro, I just shut it down, clean the cert in puppet, do a fresh PXE boot (and kickstart) and let Puppet do its thing. This has the added benefit of reducing entropy, and even providing a nice DR test (like if you just log in and poweroff immediately...) -Jason On 01/22/2014 09:31 AM, Muhammad Yousuf Khan wrote: Hello All, i have seen so many apt modules on puppet forge website. they are more like changing source list path defining. HTTP proxy blah blah but what i want is a bit more. is there any apt module which can help me to update only selective updates (like in Microsoft Wsus does, it list down all the updates and people can select and apply those patches on selective nodes and if they find it problematic then can remotely uninstall it too.i want this to be done on my Debian server farm and and i also want to roll back as needed (for example if any securety or OS update creating problem of some kind i can roll it back with puppet live management/manual run). i dont know how practical it is. however as i have already got the concept of Wsus therefore my mind is trying to think of wsus like puppet module. Please help. thanks, MYK -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/52E117FA.1070906%40throwe.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Exporting a resource only once....
On Thursday, January 23, 2014 1:56:41 AM UTC-6, Krist van Besien wrote: Hello, I have a need for an exported resource that only gets exported once. So a class that exports this resource should test first if it hasn't already been exported, and only then export it. In pseudo code: if !exists X then @@X The problem is that I can't seem to find out how to test for the existence of an exported resource in puppet, without any side effects... Any hints? Yes: don't do that. It only makes sense to export resources that are somehow specific to or characteristic of the node whose catalog is being compiled. If you have such a resource to export, then structure your manifests so that no more than one declaration of the resource can be evaluated during any catalog compilation. No need for any tests in that case. If different nodes may export *similar* resources, then do ensure that they all have distinct titles (and names) across all nodes. On the other hand, if your resources are not characteristic of any particular node, then they are not suited for export. We might be able to suggest specific alternatives if you explained what you are trying to achieve in more detail. John -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/6510ee0c-99ae-4087-a9ce-26e361c934be%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Using Virtual Resources and create_resource combination
On Wednesday, January 22, 2014 8:19:15 PM UTC-6, CD wrote: Hi John, Thanks a lot for the information. I checked the variables and could not find anything defined twice. In my workaround I updated the module code slightly and managed to fix the issue I face. I'm glad you've resolved the issue. Though I haven't dive deep in module code it seems having title variable repeated with value eth0 when it runs for each server seems. Each node's catalog is compiled independently of every other node's, except for with respect to collecting exported resources. Moreover, it is extremely common for different nodes to each declare resources having the same type and title. I am confident, therefore, that that was not in itself your problem. I cannot explain what the problem really was, though. John -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/58fda493-eb11-409d-b5e9-f8f85e869640%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Puppet 3.4.2 with latest version of Hiera and Facter on OS X Mavericks
Hi guys, I know this is covered in here: https://github.com/puppetlabs/puppet/pull/1856 https://projects.puppetlabs.com/issues/18205 https://tickets.puppetlabs.com/browse/PUP-1384 But I am still having trouble getting puppet to run the simplest command; sudo puppet resource group puppet ensure=present It looks like it's because of the wrong symlink as reported in the links above OR something wrong with the fact that puppet is trying to run with ruby v2.1.0 as the error returned by running the above is: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- facter (LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require' from /Library/Ruby/Site/puppet.rb:6:in `top (required)' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require' from /Library/Ruby/Site/puppet/util/command_line.rb:12:in `top (required)' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require' from /usr/bin/puppet:3:in `main' Current version of ruby is 2.0.0p247 and RVM is using system ruby. Can anyone shed light on what I need to do? Build from source? Download earlier versions of puppet? Help please! Thanks in advance, Hesan -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/40f82cab-d17a-4e00-a8e8-4c8236e163ca%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Puppet 3.4.2 with latest version of Hiera and Facter on OS X Mavericks
Sorry meant to say running with Ruby v2.0 On Thursday, 23 January 2014 14:29:11 UTC, Hesan Yousif wrote: Hi guys, I know this is covered in here: https://github.com/puppetlabs/puppet/pull/1856 https://projects.puppetlabs.com/issues/18205 https://tickets.puppetlabs.com/browse/PUP-1384 But I am still having trouble getting puppet to run the simplest command; sudo puppet resource group puppet ensure=present It looks like it's because of the wrong symlink as reported in the links above OR something wrong with the fact that puppet is trying to run with ruby v2.1.0 as the error returned by running the above is: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- facter (LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require' from /Library/Ruby/Site/puppet.rb:6:in `top (required)' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require' from /Library/Ruby/Site/puppet/util/command_line.rb:12:in `top (required)' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require' from /usr/bin/puppet:3:in `main' Current version of ruby is 2.0.0p247 and RVM is using system ruby. Can anyone shed light on what I need to do? Build from source? Download earlier versions of puppet? Help please! Thanks in advance, Hesan -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/9f6924b7-f825-4d4c-a97d-4dbe4930cdd3%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Get data from password protected file SSL
On Tuesday, January 21, 2014 5:02:14 PM UTC-6, Gautam Chand Nutalapati wrote: I have a key and file A. usually to retrieve data from file, I guess we do something like $var = File(path/A) That would be spelled $var = file(path/A) How do we retrieve the data from same file if file A is protected by a key? (I have the Key) You probably want a custom function to use in place of file(). You can prototype it with an inline template: $var = inline_template(%= # Ruby code here that evaluates to the wanted plaintext %) Details will depend on the type of encryption, etc.. (Related to SSL) I have a private key file that i want to password protect and use puppet instead of user typing pass phrase every time. Encrypting whole contents of file is not possible, so planning to encrypt pass phrase. Any suggestions? I don't understand. If the point is that the user doesn't have to type the pass phrase, then doesn't that necessarily involve the file NOT being password-protected? How is Puppet supposed to change that? Puppet is involved only in managing the file itself; it has no role to play when the file is *used*. John -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/b913c7aa-8f7a-4a94-8dba-ee54743843de%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Get data from password protected file SSL
I'm not sure if this is exactly what you're looking for, but check out https://github.com/sihil/hiera-eyaml-gpg - Marc On 1/21/14 6:02 PM, Gautam Chand Nutalapati wrote: I have a key and file A. usually to retrieve data from file, I guess we do something like $var = File(path/A) How do we retrieve the data from same file if file A is protected by a key? (I have the Key) (Related to SSL) I have a private key file that i want to password protect and use puppet instead of user typing pass phrase every time. Encrypting whole contents of file is not possible, so planning to encrypt pass phrase. Any suggestions? -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/52E13029.702%40element84.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Problems with installing packages using mco and ubuntu 12.04
Hi all, I'm now looking forward to implement mcollective on some servers I manage and I found a strange issue with mco command-line tool. I need to install/remove packages using mcollective. When I'm trying to install a package I don't get any error response from mco however package is not installed: root@puppetmaster:/home/ubuntu# mco rpc --with-fact company_role=demo-test3 --json package install package=nano-tiny [ { data: { output: , properties: { status: missing, ensure: purged, error: ok, name: nano-tiny } }, statuscode: 0, statusmsg: OK, sender: ip-10-43-145-240, agent: package, action: install } ] The output on demo-test3 node: ubuntu@demo-test3:~$ dpkg -l | grep nano-tiny ubuntu@demo-test3:~$ I'm using the following versions of mcollective: root@puppetmaster:/home/ubuntu# dpkg -l | grep mcoll ii mcollective 2.2.4-1 build server orchestration or parallel job execution systems ii mcollective-client 2.2.4-1 build server orchestration or parallel job execution systems ii mcollective-common 2.2.4-1 build server orchestration or parallel job execution systems ii mcollective-facter-facts 1.0.0-1 Puppetlabs Facter facts plugin ii mcollective-package-client 4.2.0-1 Install and uninstall software packages ii mcollective-package-common 4.2.0-1 Install and uninstall software packages ii mcollective-puppet-agent 1.6.0-1 Run Puppet agent, get its status, and enable/disable it ii mcollective-puppet-client1.6.0-1 Run Puppet agent, get its status, and enable/disable it ii mcollective-puppet-common1.6.0-1 Run Puppet agent, get its status, and enable/disable it ubuntu@demo-test3:~$ dpkg -l | grep mcoll ii mcollective 2.2.4-1 build server orchestration or parallel job execution systems rc mcollective-client 1.2.1+dfsg-2ubuntu1.1 Build server orchestration or parallel job execution systems ii mcollective-common 2.2.4-1 build server orchestration or parallel job execution systems ii mcollective-facter-facts 1.0.0-1 Puppetlabs Facter facts plugin ii mcollective-puppet-agent 1.6.0-1 Run Puppet agent, get its status, and enable/disable it ii mcollective-puppet-common1.6.0-1 Run Puppet agent, get its status, and enable/disable it In the same time when I'm trying to uninstall already present package it works like a charm. Can anyone advice how to deal with installation of packages? Thanks in advance, Alex -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/fbeeff4a-d862-4660-9a98-2249ceffe7b7%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Exporting a resource only once....
On Thursday, January 23, 2014 2:59:29 PM UTC+1, jcbollinger wrote: It only makes sense to export resources that are somehow specific to or characteristic of the node whose catalog is being compiled. If you have such a resource to export, then structure your manifests so that no more than one declaration of the resource can be evaluated during any catalog compilation. No need for any tests in that case. If different nodes may export *similar* resources, then do ensure that they all have distinct titles (and names) across all nodes. On the other hand, if your resources are not characteristic of any particular node, then they are not suited for export. We might be able to suggest specific alternatives if you explained what you are trying to achieve in more detail. Basically my situation is the following: - A database server - Several web application servers. The whole managed using foreman/puppet My Web applications each need a database, so I would like to just export on the web application nodes the databases I need, and collect them on the database server. However, several nodes that run the same web application of course need the same database. What do I do when I have two nodes, that both need the same database? The logical, intuitive solution would be to export it on all of them, but only collect it once on the database server. Other situations are : backends to a loadbalancer that export both frontend and backend URLs. The loadbalancer collects both, and creates it's configuration based on them. Krist -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/e90564dd-9dbd-4680-8c3b-84ce8e3276eb%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Re: Puppet 3.4.2 with latest version of Hiera and Facter on OS X Mavericks
Hi Hesan, The code for Mavericks support in facter will be in Facter 1.7.5, which has not yet been officially released. However, this version is in release candidate (1.7.5-rc1). See the release announcement here: https://groups.google.com/forum/#!topic/puppet-users/wUwBVVJLayA. If you want to give the Release Candidate a try, download the mac package here: http://downloads.puppetlabs.com/mac/facter-1.7.5-rc1.dmg. On Thu, Jan 23, 2014 at 6:46 AM, Hesan Yousif hesan.you...@gmail.com wrote: Sorry meant to say running with Ruby v2.0 On Thursday, 23 January 2014 14:29:11 UTC, Hesan Yousif wrote: Hi guys, I know this is covered in here: https://github.com/puppetlabs/puppet/pull/1856 https://projects.puppetlabs.com/issues/18205 https://tickets.puppetlabs.com/browse/PUP-1384 But I am still having trouble getting puppet to run the simplest command; sudo puppet resource group puppet ensure=present It looks like it's because of the wrong symlink as reported in the links above OR something wrong with the fact that puppet is trying to run with ruby v2.1.0 as the error returned by running the above is: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- facter (LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require' from /Library/Ruby/Site/puppet.rb:6:in `top (required)' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require' from /Library/Ruby/Site/puppet/util/command_line.rb:12:in `top (required)' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require' from /usr/bin/puppet:3:in `main' Current version of ruby is 2.0.0p247 and RVM is using system ruby. Can anyone shed light on what I need to do? Build from source? Download earlier versions of puppet? Help please! Thanks in advance, Hesan -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/9f6924b7-f825-4d4c-a97d-4dbe4930cdd3%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Moses Mendoza Puppet Labs Join us at PuppetConf 2014, September 23-24 in San Francisco -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CA%2B421WbD5Cicf5pM8EjQe8kcT1iC2QErigqRhBGrwszsu6hVag%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Is it possible to include files in puppet.conf
Hi, Is it possible to include files in puppet.conf? I'd like to use this to be able to declare new environments in their own files rather than having to edit puppet.conf each time. I'm thinking something along the lines of how sudoers works with sudoers.d # puppet.conf include environments/* And then having an environments folder which contains files which declare environments i.e. environments/dev01.conf environments/dev02.conf environments/test01.conf environments/test02.conf environments/prod.conf etc Is anything like this currently supported by Puppet? It would make the task of automating the definition of environments much more straight forward than the current requirement to problematically amend/ munge puppet.conf. Cheers, Edd -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/7a28ad50-7130-4496-a7c6-c5931938e672%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Is it possible to include files in puppet.conf
Read about dynamic environments. Preview: make use of $environment in puppet.conf Regards, -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/78fcf9ae-91ea-4ef3-bd65-2e5a73dd35e4%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Install MSI packages
Hi, I would like to install Apache silently on Windows servers using Puppet. Here's my class: class base_apache { case $operatingsystem { windows: { file { 'apache_installer_package': path= 'D:/Downloads/Puppet/', ensure = directory, source = 'puppet:///files/Apache-Installers/', recurse = true, purge = false, source_permissions = ignore, replace = no, before = Package['apache 2.2.25'] } package { 'apache 2.2.25': ensure = installed, source = 'D:\\Downloads\\Puppet\\httpd-2.2.25-win32-x86-openssl-0.9.8y.msi', install_options = {'INSTALLDIR' = 'D:\Apache2.2'}, } } } } It works, in that it installs it. However, it doesn't create Apache service and it doesn't seem to know if Apache is already installed as it seems to create it on every agent run: C:\puppet agent -t Info: Retrieving plugin Info: Caching catalog for localhost Info: Applying configuration version '1390499627' Notice: /Stage[main]/Base_apache/Package[apache 2.2.25]/ensure: created Notice: Finished catalog run in 6.17 seconds Any ideas? Thanks Alex -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/65b79434-4cb8-4656-9a64-b80960af333a%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] puppet augeas - where to put augeas definition?
Hey Pete, Thanks for the info. I think adding a class and futureproofing for things like dependencies is probably the way to go, in this specific scenario. Many thanks for the link and for the great information below. I owe you a beer. Cheers, Mike On Thursday, January 23, 2014 12:29:19 AM UTC-8, Peter Meier wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Per the snippet above, I'm simply trying to add in an extra entry into my /etc/apt/sources.list but I'm not sure where I would actually put the above piece of code. I currently have it sitting in my init.pp file for the corresponding class but I'm not sure if that's really where it belongs. Is the init.pp file the right place for this and if not, where would I put it? My apologies if this is a stupid question as I'm having a hard time wrapping my head around this one. The answer totally depends on how you would like to structure your modules. Given that you are managing apt-stuff I would assume that you have something like an apt-module and I would place it within there. You could place it there in the init.pp in the apt-class and on all your debian systems, you would do an include apt. However you might not want this repository to be present on all nodes, actually only on the ones that need the client-repo. So then a class called apt::repos::client (in the apt-modules in manifests/repos/client.pp ) might be the better place to put it and include this class on all nodes that require this repository. This has even a different advantage: Maybe the main purpose for this repository is have the packages available to install certain applications - that you are also managing by puppet. So you could include this repo-class only in the classes that manage the packages for these applications (specify a dependency!) and you have not anymore to think about this apt-dependency if you apply a certain application-class to a node. But this might already be a little bit off-the-topic. Anyway http://www.slideshare.net/PuppetLabs/roles-talkhttp://www.google.com/url?q=http%3A%2F%2Fwww.slideshare.net%2FPuppetLabs%2Froles-talksa=Dsntz=1usg=AFQjCNHolEfAxdV3LspVmzjuAEgtIJLqHAis really a good practice to structure your puppet code. ~pete -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlLg0tkACgkQbwltcAfKi3+YzACfSSsiJpa0nr9/XvpNjRNtIS1L RXwAn3UPFCCJVC4F3twiozCGNqI4PAoI =I0Xj -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/7eaf0b77-9fd6-41c0-a5dd-d42119edb21b%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Puppet Post install
I have a complete and working Puppet setup. Now, I need to automate it. Looking at the following page: http://docs.puppetlabs.com/guides/installation.html#post-install I can see that it wants me to set up launchd processes for OS X in order to have the Puppet service start at boot. I just want to make sure that this is necessary. I have a master/agent configuration. In a master/agent setup, does it automate this by default or do I still have to setup launchd on each machine? This is a separate issue from the first one. I have completed my puppet-dashboard setup and it's running fine. However, I've noticed that after I reboot the machine, I no longer have any worker processes running. I have to manually run sudo -u puppet-dashboard env RAILS_ENV=production script/delayed_job -p dashboard -n 4 -m start before any they start working again. I assumed once I converted dashboard to run in apache that this would be automated. Am I wrong? Thanks in advance!! -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/57ad28a4-8c88-47c3-8b2a-78bda273a456%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Re: Exporting a resource only once....
On Thu, 2014-01-23 at 08:26 -0800, Krist van Besien wrote: Basically my situation is the following: - A database server - Several web application servers. The whole managed using foreman/puppet My Web applications each need a database, so I would like to just export on the web application nodes the databases I need, and collect them on the database server. However, several nodes that run the same web application of course need the same database. What do I do when I have two nodes, that both need the same database? The logical, intuitive solution would be to export it on all of them, but only collect it once on the database server. Other situations are : backends to a loadbalancer that export both frontend and backend URLs. The loadbalancer collects both, and creates it's configuration based on them. Krist We have something quite similar - as we use hiera extensively we managed to have a common yaml file with a list of databases in a hash, and used create_resources to create the databases (and users, and haproxy listeners) on the database/haproxy nodes. The application nodes that want to register with a load balancer export resources for themselves only, which are collected on the load balancer only. An alternative is to have a manifest that ensures there is a suitable database available, creating it if not, running on the web application servers - you've got a db client there already which should be able to access the db server. That approach also allows you to ensure there's a database created before attempting to populate it and start the app, exported resources mean you'll need several runs before everything is clean. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/1390501547.11665.13.camel%40debian.my.home. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Puppet Post install
This is in response to your dashboard question. Running dashboard via apache will handle the starting of the rails app itself, but what you've quoted is the dashboard-workers, which are separate processes that handle doing work for dashboard, like processing reports from the puppet master. There are some init scripts in the puppet-dashboard repo that should work on most platforms to enable the workers to start automatically on boot. On Thu, Jan 23, 2014 at 10:30 AM, Jason Hatman jason.hat...@gmail.comwrote: I have a complete and working Puppet setup. Now, I need to automate it. Looking at the following page: http://docs.puppetlabs.com/guides/installation.html#post-install I can see that it wants me to set up launchd processes for OS X in order to have the Puppet service start at boot. I just want to make sure that this is necessary. I have a master/agent configuration. In a master/agent setup, does it automate this by default or do I still have to setup launchd on each machine? This is a separate issue from the first one. I have completed my puppet-dashboard setup and it's running fine. However, I've noticed that after I reboot the machine, I no longer have any worker processes running. I have to manually run sudo -u puppet-dashboard env RAILS_ENV=production script/delayed_job -p dashboard -n 4 -m start before any they start working again. I assumed once I converted dashboard to run in apache that this would be automated. Am I wrong? Thanks in advance!! -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/57ad28a4-8c88-47c3-8b2a-78bda273a456%40googlegroups.com . For more options, visit https://groups.google.com/groups/opt_out. -- Matthaus Owens Release Manager, Puppet Labs Join us at PuppetConf 2014, September 23-24 in San Francisco -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CACD%3DwAfK2Dn9dgVL-NfR_C%2BbqK_Y7pXRLzkjAwZeoq5X_3QBBg%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Puppet Post install
On Thu, Jan 23, 2014 at 10:30 AM, Jason Hatman jason.hat...@gmail.com wrote: I have a complete and working Puppet setup. Now, I need to automate it. Looking at the following page: http://docs.puppetlabs.com/guides/installation.html#post-install I can see that it wants me to set up launchd processes for OS X in order to have the Puppet service start at boot. I just want to make sure that this is necessary. I have a master/agent configuration. In a master/agent setup, does it automate this by default or do I still have to setup launchd on each machine? Yes, generally speaking you will still need some form of service management script (launchd plist) in place anywhere you want the service to by running as a service. On OSX, puppet uses launchd to manage services, so on OSX `puppet resource service 'puppet' ensure=running enable=true` will rely on the existence of a launchd plist in place on that host. This is a separate issue from the first one. I have completed my puppet-dashboard setup and it's running fine. However, I've noticed that after I reboot the machine, I no longer have any worker processes running. I have to manually run sudo -u puppet-dashboard env RAILS_ENV=production script/delayed_job -p dashboard -n 4 -m start before any they start working again. I assumed once I converted dashboard to run in apache that this would be automated. Am I wrong? Thanks in advance!! -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/57ad28a4-8c88-47c3-8b2a-78bda273a456%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Moses Mendoza Puppet Labs Join us at PuppetConf 2014, September 23-24 in San Francisco -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CA%2B421WZ5Uyx0dRR6gW1QHj3JfUoW007R-qmMgd4uCAUZFZkosQ%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Announce: Hiera 1.3.1 Now Available
Hiera 1.3.1 -- Released January 23, 2014. *RC1: December 12, 2013. Hiera 1.3.1 Downloads -- Source: https://downloads.puppetlabs.com/hiera/hiera-1.3.1.tar.gz Available in native package format in the Puppet Labs yum and apt repositories: http://yum.puppetlabs.com and http://apt.puppetlabs.com Gems are available via rubygems at https://rubygems.org/downloads/hiera-1.3.1.gem or by using `gem install hiera` Mac packages are available at https://downloads.puppetlabs.com/mac/hiera-1.3.1.dmg Please report feedback via the Puppet Labs tickets site, using an affected hiera version of 1.3.1: https://tickets.puppetlabs.com/browse/HI Hiera 1.3.1 Release Notes -- Hiera 1.3.1 is a bug fix release in the 1.3 series. It fixes one bug: HI-65 https://tickets.puppetlabs.com/browse/HI-65: Empty YAML files can raise an exception (backported to stable as HI-71https://tickets.puppetlabs.com/browse/HI-71 ) Hiera 1.3.1 Contributors -- Adrien Thebo, Andrew Parker, Daniel De Marco, Justin Stoller, Melissa Stone Hiera 1.3.1 Changelog -- Adrien Thebo (1): d9f4961 (maint) Add test coverage for unexpected YAML values Andrew Parker (1): 7b75d0a (Maint) Restore soloris-11.cfg Daniel De Marco (1): 24f2ee6 (#23273) ignore empty YAML files Justin Stoller (3): 9248fa4 use pooling api abca841 use configurable gem source 2aa5bfb Use the same kind of gem source switching as Puppet Melissa Stone (3): 498416e (maint) Add fedora 20 to mock list 6243d44 (packaging) Update VERSION to 1.3.1-rc1 e89afc2 (packaging) Update VERSION to 1.3.1 -- Melissa Stone Release Engineer, Puppet Labs Join us at PuppetConf 2014, September 23-24 in San Francisco -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAHEe_kpZk1pdA2%2BEfoFxpvi6M7TU3%3DNxPbpBvtH8X7m-axdVsQ%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Install MSI packages
Hello Alex, On Thu, Jan 23, 2014 at 12:01 PM, pskovshu...@gmail.com wrote: Hi, I would like to install Apache silently on Windows servers using Puppet. Here's my class: class base_apache { case $operatingsystem { windows: { file { 'apache_installer_package': path= 'D:/Downloads/Puppet/', ensure = directory, source = 'puppet:///files/Apache-Installers/', recurse = true, purge = false, source_permissions = ignore, replace = no, before = Package['apache 2.2.25'] } package { 'apache 2.2.25': ensure = installed, source = 'D:\\Downloads\\Puppet\\httpd-2.2.25-win32-x86-openssl-0.9.8y.msi', install_options = {'INSTALLDIR' = 'D:\Apache2.2'}, } } } } It works, in that it installs it. However, it doesn't create Apache service and it doesn't seem to know if Apache is already installed as it seems to create it on every agent run: C:\puppet agent -t Info: Retrieving plugin Info: Caching catalog for localhost Info: Applying configuration version '1390499627' Notice: /Stage[main]/Base_apache/Package[apache 2.2.25]/ensure: created Notice: Finished catalog run in 6.17 seconds Any ideas? What version of puppet? Second, have you looked over http://docs.puppetlabs.com/windows/writing.html#packagepackage Specifically this: The title (or name) of the package must match the value of the package's DisplayName property in the registry, which is also the value displayed in the Add/Remove Programs or Programs and Features control panel. If the provided name and installed name don't match, Puppet will believe the package is not installed and try to install it again. Thanks Alex -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/65b79434-4cb8-4656-9a64-b80960af333a%40googlegroups.com . For more options, visit https://groups.google.com/groups/opt_out. -- Rob Reynolds Developer, Puppet Labs Join us at PuppetConf 2014, September 23-24 in San Francisco - http://bit.ly/pupconf14 Register now and save 40%! Offer expires January 31st. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAMJiBK6jrO-n1WW_hXCXkARxVr177gW0FXwEgoe6DNpZ31pF7w%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] puppetlabs-firewall question
In the documentation, it says: With the latest version, we now have in-built persistence, so this is no longer needed. However, you will still need some basic setup to define pre post rules. resources { firewall: purge = true } Firewall { before = Class['my_fw::post'], require = Class['my_fw::pre'], } class { ['my_fw::pre', 'my_fw::post']: } class { 'firewall': } Can this be in the init.pp of the my_fw class or does it still need to be in site.pp ? “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” (Bill Waterson: Calvin Hobbes) -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/43ae1636-98db-4663-b556-aa77509ed999%40me.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Re: Thoughts on roles/profiles class paradigm
On 1/22/2014 7:35 PM, Nathan Nobbe wrote: I read Craig's article numerous times and have recently published an article http://quickshiftin.com/blog/2014/01/composition-in-puppet/ on my thoughts. To summarize, I feel the big lesson from the article is composition is needed to define reusable grouped module declarations (aka /roles/). Whether or not you like the notion of the 2-layered approach (roles /and/ profiles) is something else and a bit extra IMO. That said I'm only managing tens of servers rather than hundreds or thousands so far, but for me one layer to represent 'roles' has worked great. What it amounts to for me is a simple guideline - leverage inheritance (or the hiera hierarchy) as much as possible and introduce composition on a need-to basis. Composition is necessary though, unless all your systems are identical. Thanks again Craig for the article. Neat to find you on the google group! -nathan If I had the 20-30 hours to write a Puppet Conf presentation it would be called The profile is the most important part of role/profile. :-) In a simple system with a webserver and database, profiles don't appear to add much. However in a complex system where an Apache server could be a proxy, app server, ssl terminator, or other function the added layer is very necessary. In my system I have 25+ roles half of which use profile::apache to get vastly different configs. In each case profile::apache provides the entry point for the data Hiera provides based on Role. Profile classes are where you get to be opinionated about your config. In my sample profile::apache class below my Apache module can remain generic and shareable while profile::apache pulls in things like collectd, logstash, etc that are specific to how *I* think any server with Apache should be installed. You might also check out Craig's later presentation on role profile which provides a clearer picture than his earlier blog post. http://www.slideshare.net/PuppetLabs/roles-talk Ramin class profile::apache { include ::apache include profile::logstash include profile::sslcerts collectd::plugin { 'apache': } logrotate::simple { 'apache':} $mymods = hiera('apache::a2mods', {}) create_resources('apache::a2mod', $mymods) $myvhosts = hiera('apache::vhosts', {}) create_resources('apache::vhost', $myvhosts) Sslcerts::Cert|| - Class['apache::service'] } -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/52E188C8.5020807%40badapple.net. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Puppet Post install
Thanks! -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/c256d938-c948-438c-81a1-2ecf8288f6be%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] ody/pkginventory problem / How do _you_ get a listing of all packages installed on a system?
Greetings, I am using ody/pkginventory [http://forge.puppetlabs.com/ody/pkginventory] as a way of getting information about what rpms are installed on a system. I am using this module over `puppet resource package` for two reasons: 1) Having it as a fact helps some of the other things we are doing and I don't know if-it's-possible/how to get the results of a `puppet resource package` as a fact and 2) I can't seem to figure out how to query the puppetmaster puppetdb (using curl) and pull back a full listing of installed packages on a node but I _can_ get the facts this way. We made a few small modifications to this package to add the Scientific and SLES OS's (which both OS's work just fine; just need to make the change in both pkg.rb files) and rolled out this module to our dev environment. That is when I noticed a problem. I realize I can get the kernel fact, I am just using the kernel package as an example as it is reproducible on many systems. The information I am really after is other packages which have the same problem. $ uname -r 2.6.32-431.1.2.el6.x86_64 $ facter -p | grep pkg_kernel pkg_kernel = 2.6.32-358.el6 $ puppet resource package kernel package { 'kernel': ensure = '2.6.32-358.el6', } $ rpm -qa | grep ^kernel-2 kernel-2.6.32-358.el6.x86_64 kernel-2.6.32-431.1.2.el6.x86_64 The problem is that neither the resource nor the module are returning the actual running kernel. In reality, I would like to know every package. My co-worker (who is a bit more familiar with Ruby then I am) made the following changes to lib/facter/pkg.rb: require 'facter/util/pkg' counter_hash = {} Facter::Util::Pkg.package_list.each do |key, value| if counter_hash[:#{key}].nil? counter_hash[:#{key}] = value else counter_hash[:#{key}] , #{value} end end counter_hash.each do |key, value| Facter.add(:pkg_#{key}) { setcode { value } } end This produces an output of : pkg_kernel = 2.6.32-358.el6, 2.6.32-431.1.2.el6 Much more desirable. So the question for this group is, before I roll this out to all my system does anyone have a better solution or suggestion on accomplishing this task? What I have after my co-workers mod works, but I am really curious how/if others are retrieving a list of all packages installed on a system. Thanks! -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/1570cc12-741a-40f3-bd3d-1cfbf5dbeb62%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Re: Exporting a resource only once....
On Thursday, January 23, 2014 7:25:47 PM UTC+1, Xav Paice wrote: We have something quite similar - as we use hiera extensively we managed to have a common yaml file with a list of databases in a hash, and used create_resources to create the databases (and users, and haproxy listeners) on the database/haproxy nodes. The application nodes that want to register with a load balancer export resources for themselves only, which are collected on the load balancer only. We don't use Hiera. We use foreman as ENC. Thus we also don't have per node manifests. What we do have is our own module, with classes we assign to host groups in foreman. We define a host group for or different categories of servers, and assign hosts to a host group based on what they are supposed to do. So if we for example want to add another backend we just create a new host in foreman, add it to the right host group, and then flip a switch. It powers on, bootstraps itself, installs all it needs, and exports what it needs from other servers. However we run in to the problem of duplicate external resources, which I have for the moment resolved through some ugly hacks. An alternative is to have a manifest that ensures there is a suitable database available, creating it if not, running on the web application servers - you've got a db client there already which should be able to access the db server. That approach also allows you to ensure there's a database created before attempting to populate it and start the app, exported resources mean you'll need several runs before everything is clean. For security reason we only allow root access to the mysql database from the host it runs on, via a unix socket. That is why the DB server needs to collect the databases and then create them. But that problem seems solvable also. But I am still interested in a general solution- We have virtual resources. This has allowed me to for example declare all the different VLANs in one class that all nodes include, but then only realize the lans needed on a per service basis. Something like exported virtual resources would be convenient. We also run in to trouble for example when dealing with users. We use a lot of the openstack classes on puppetforge. Some of those classes will try to create keystone user resources. Again these should be exported so the keystone server can collect and create them. But again, only once... -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/1075d1ba-36b7-4eec-ad2c-95b76b59d1e2%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.