Re: [Puppet Users] Re: Looking for solution on working configuration for new testing Puppet servers in existing environments
Hi Ken, Your site and your practices (and the problems that go with it) are similar to our own. I've answered by describing what we think the way forward for Puppet is for us, hopefully you find it helpful and get some ideas :-) I feel your pain when you say there are changes languishing in Dev for too long that get inadvertently pushed out to other environments. Once I accidentally rolled out a whole set of 'work in progress' changes that a colleague of mine was committing and pushing to one environment (we use Git) and I cut a new tag and pushed a whole heap of these unfinished changes to the next environment up the chain. After this I realised our current model really wasn't going to work in the long run: this happened with only two Admins working on Puppet in the last week when we employ almost a dozen who could potentially make the same mistakes. While we're still stuck in this model now, we think the way forward for us is to take a page out of our Development Team's book and set up a fully fledged CI environment for Puppet. It would be even more awesome if our Developer's CI was also our CI - but considering they've got half a million unit tests and we've got zero, we've got a long way to go. How this plays out practically is that all our admins commit into our Puppet repository and those changes start getting applied immediately to our Dev/CI servers and they start getting tested against immediately (hence the unit tests). Problems will always occur, but they will occur almost immediately and we'll have feedback to fix it. In response to your reply to Trevor: Can you explain how you see maintaining three slightly different environments with one Puppet Master and a firewall is more difficult than three individual Puppet Masters? You've already got all the differences written down in your existing manifests - different IP addresses for different services, different users/passwords, etc, maybe slightly different packages, or am I missing something? Without knowing more about your site (so hopefully this suggestion is relevant), here's what I would do: I would slowly start to encourage people to separate out your data from your code using a shared repository. Take a look at Hiera if you haven't already, I'd recommend using it but other data sources would suffice as well. So right now you've got your Dev data in your Dev modules, your Staging data in your Staging modules, etc. Take one of your modules (lets say DNS, it's easy), and put it's data (DNS server IP addresses) into a shared data store that each of your Dev, Staging and Prod Puppet Masters can access. Then change your Dev module to remove the data and pull it from the data store. Then do Staging, the same data store but different information, then finally Prod. If your three separate DNS modules don't look *exactly* the same now, you've done something wrong. Do that for every module and you've now got no reason not to run a single Puppet Master. The changes would take some time to do every module but if you encourage every admin to make a small step forward each change they make, eventually you'd get there. What kind of changes are you making 5-10 times a day? The same changes for the same people? We have a situation here where our Developers sometimes need to change the configuration of our application every hour. Right now we don't manage those systems with Puppet because making that many changes of the same thing over and over is a monumental waste of our time. I hack on Hiera a little bit to get some extra functionality from it, mainly the ability to tier my data sources. What I plan on doing is to have a low priority data store that's managed by Developers. Since all our modules will (eventually) look to the data stores to configure themselves, our Developers will be able to make their own system configuration changes. Our Admins control the modules (we write *how* it's done) and the higher priority data stores so we can override whatever the Developers enter if need be (we don't want a Developer changing the root password now). The Developers then trigger their own Puppet run and they've reconfigured the system using the same method (same Puppet modules) as Production so I don't have to worry about things being done differently in Dev. -Luke On 18/04/12 21:08, Ken Lareau wrote: Trevor, Thank you for the response; I believe you got the idea pretty well and while your suggestion makes sense, it is something we definitely can't follow through with right now; our configuration is massive and complex and having to maintain three different yet similar sets of configuration would be difficult and reduce our response time to necessary user changes (of which we get anywhere from 5-10 a day). It's just not feasible without a complete reworking of how we do things right now, and not at the top of our priority lists. I do appreciate the input, however. Thank
[Puppet Users] ensure file content with filename different on each host
Hi, I have several hosts. Each host have to contain a file like /a/path/com.apple.screensaver.BC2A8418-FC5B-5825-B3F1-0072B100A4B4.plist. The content have to be the same on all hosts. But the BC2A8418-FC5B-5825-B3F1-0072B100A4B4 part of the file name is different on each host. Is it possible to manage this situation with puppet ? If yes how ? Regards, -- *Fabien COMBERNOUS* /unix system engineer/ www.kezia.com http://www.kezia.com/ *Tel: +33(0)4 6787 0704 / +33(0)6 2584 0337* Kezia -- 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: ensure file content with filename different on each host
Great help was provided by irc. Here the manifest : class screensaver { $username = admin file { /Users/$username/Library/Preferences/ByHost/ com.apple.screensaver.$::sp_platform_uuid.plist: owner = $username, group = staff, mode= 600, ensure = present, source = puppet:///modules/screensaver/ com.apple.screensaver.plist } } On 19 avr, 04:53, Fabien COMBERNOUS fcombern...@kezia.com wrote: Hi, I have several hosts. Each host have to contain a file like /a/path/com.apple.screensaver.BC2A8418-FC5B-5825-B3F1-0072B100A4B4.plist. The content have to be the same on all hosts. But the BC2A8418-FC5B-5825-B3F1-0072B100A4B4 part of the file name is different on each host. Is it possible to manage this situation with puppet ? If yes how ? Regards, -- *Fabien COMBERNOUS* /unix system engineer/www.kezia.comhttp://www.kezia.com/ *Tel: +33(0)4 6787 0704 / +33(0)6 2584 0337* Kezia -- 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: function template: use of variable '$string' = BUG?
Hi, A little love about my bug? Am I the only one with this problem or are we thousand :D ? On Tue, Apr 17, 2012 at 10:57 PM, Antidot SAS antidot...@gmail.com wrote: Hi everyone, I am using puppet setup with gem: -- root@linux-install:/tmp# facter |egrep -i pupp|lsbdistdescription lsbdistdescription = Debian GNU/Linux 6.0.4 (squeeze) puppetversion = 2.7.9 root@linux-install:/tmp# gem list puppet *** LOCAL GEMS *** puppet (2.7.9) -- I think I found a bug but was not able to see if it was declared, here is the puppet file: root@linux-install:/tmp# cat test.pp $string = 'A bug? ' $test_var = 'test' file { '/tmp/bug': path= '/tmp/bug', ensure = present, content = template('test.erb'), } root@linux-install:/tmp# cat /etc/puppet/templates/test.erb # puppet file # Here is a sample Here is a value: %= test_var % root@linux-install:/tmp# puppet apply test.pp notice: /Stage[main]//File[/tmp/bug]/ensure: created notice: Finished catalog run in 0.21 seconds root@linux-install:/tmp# cat /tmp/bug A bug? root@linux-install:/tmp# Is that normal? Bug? Regards, JM -- 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: $lsbdistcodename stays the same after dist-upgrade
Just in case someone stumbles upon this. The cause is this bug: https://projects.puppetlabs.com/issues/9109 The solution is to update the puppetmaster to =2.7.8. Best regards, Mate 2012. április 18., szerda 14:50:59 UTC+2 időpontban ScOut3R a következőt írta: Dear List, i was running a few natty systems and upgraded one of them to oneiric. Facter shows the right lsbdistcodename, lsbdistrelease, etc. parameters, but when i'm running puppet agent the modules has access to the previous (natty, etc.) values. As i see on puppetmaster in /var/ lib/puppet/yaml/{facts,node} the output from facter and the agent is cached and won't update (even after 24 hours). How could i update these values so my templates will have the right values from the parameters? Best regards, Mate -- You received this message because you are subscribed to the Google Groups Puppet Users group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/MRWTOE9IvnUJ. 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: Virtual resources for a list of server ip addresses in Apache config
On Apr 18, 7:09 am, Robert Rothenberg rob...@gmail.com wrote: I should add that I am using a masterless puppet environment, so a global list of all nodes is not available. As far as I am aware, there is no solution available entirely Puppet that would work in masterless mode. Some Googling suggested the use of multiple files that are concatenated, but I think that's a messy kluge, and would like to avoid doing that. If a puppetmaster were involved then you could look at either exported resources or a shared central data source to approach this problem. There are viable solutions along each path. Without a master, the issue of clients registering themselves is hard, especially if you require any kind of trust management. With no master to mediate data transfer (or trust), you'll need to come up with something custom. Here are some possible alternatives: * You could build a Puppet-aware registration service on the web server. It could control an actual Puppet manifest defining your array of client IPs, or else a data file that one of your manifests relies upon. * You could have clients manage registration files in some shared network filesystem, and have the server collect them and extract the pertinent data. * You could create a registration database to which clients would write and from which the master would read. The read / write interfaces might be implementable via templates, but it would be cleaner to build custom types (and providers) for that. * You could give up on self-registration, and manage the client list on the server separately from the clients themselves. That would be the least up-front work and the most secure approach, but slightly more ongoing work as clients are added and removed. John -- 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] ssh_authorized_keys fails if a line is empty
Hi group, we want to manage our authorized_keys with puppet and are trying ssh_authorized_keys. Everything works as expected, but if ~/.ssh/ authorized_keys contains en empty line, puppet raises an error and generate a complete new file: debug: Prefetching parsed resources for ssh_authorized_key err: Could not prefetch ssh_authorized_key provider 'parsed': Could not parse line at /root/.ssh/authorized_keys:3 If the line contains a blank, it works. How can we change this behaviour? We've looked into /usr/lib64/ruby/vendor_ruby/1.8/puppet/ provider/ssh_authorized_key/parsed.rb but I believe the match statement is correct: text_line :blank, :match = /^\s+/ It seems that puppet fails before any matching is done, but I'm not familar with ruby and puppet development. We are using puppet 2.6.12 on SLES11. Thanks in advance and greetings, Maurice -- 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] puppet-lint error
Hi, this is not strictly puppet related but I am hoping someone here who uses puppet-lint can tell me what is going on here. $ puppet-lint init.pp /Users/jc/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/ rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead. /Users/jc/.rvm/gems/ruby-1.9.3-p125/gems/puppet-lint-0.1.13/bin/puppet- lint:89:in `top (required)': undefined method `each' for service.pp:String (NoMethodError) from /Users/jc/.rvm/gems/ruby-1.9.3-p125/bin/puppet-lint:19:in `load' from /Users/jc/.rvm/gems/ruby-1.9.3-p125/bin/puppet-lint:19:in `main' puppet (2.7.12) puppet-lint (0.1.13) Thx! J. -- 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] access variables from calling ressource
I need to create a XML file for our Nagios server. This XML file needs to contain all Tomcats on this server, which are created with a parameterized puppet ressource. What I need is something like this: root nametest1/name nametest2/name /root from these ressources example::ressource { test1: } example::ressource { test2: } Here is an example puppet module https://github.com/xorpaul/puppet-example How can I access the $name variable from the example::ressource? Can I do something like $ressourcename = $example::ressource::name At first I tried using puppet-concat and it worked until I needed to specify a concat::fragment only once and still be able to access the ressource parameters. Is there a simple solution I'm just not seeing here? -- You received this message because you are subscribed to the Google Groups Puppet Users group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/VqZyokMU5UYJ. 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] vcsrepo rake installation?
Hi, I have trouble installing vcsrepo. I cloned vcsrepo onto my Centos6 and when I run rake i get this: (in /etc/puppet/modules/vcsrepo) ** Invoke default (first_time) ** Invoke spec (first_time) ** Execute spec ./spec/unit/puppet/provider/vcsrepo/cvs_spec.rb:3: undefined method `describe_provider' for main:Object (NoMethodError) from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/ example_group_runner.rb:15:in `load' from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/ example_group_runner.rb:15:in `load_files' from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/ example_group_runner.rb:14:in `each' from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/ example_group_runner.rb:14:in `load_files' from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/ options.rb:133:in `run_examples' from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/ command_line.rb:9:in `run' from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/bin/spec:5 rake aborted! Command /usr/bin/ruby -Ilib:lib:spec /usr/lib/ruby/gems/1.8/gems/ rspec-1.3.0/bin/spec spec/unit/puppet/provider/vcsrepo/cvs_spec.rb spec/unit/puppet/provider/vcsrepo/svn_spec.rb spec/unit/puppet/ provider/vcsrepo/bzr_spec.rb spec/unit/puppet/provider/vcsrepo/ hg_spec.rb spec/unit/puppet/provider/vcsrepo/git_spec.rb failed /usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/rake/spectask.rb: 177:in `define' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb::in `verbose' /usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/rake/spectask.rb: 153:in `define' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:635:in `call' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:635:in `execute' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:630:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:630:in `execute' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain' /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:589:in `invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:606:in `invoke_prerequisites' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:603:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:603:in `invoke_prerequisites' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:595:in `invoke_with_call_chain' /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:589:in `invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:582:in `invoke' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2050:in `invoke_task' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2028:in `top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2028:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2028:in `top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2067:in `standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2022:in `top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2000:in `run' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2067:in `standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1997:in `run' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 /usr/bin/rake:19:in `load' /usr/bin/rake:19 PS: my puppet and ruby packages are from epel: puppet-2.7.13-1.el6.noarch puppet-dashboard-1.2.4-1.el6.noarch puppet-server-2.7.13-1.el6.noarch ruby-1.8.7.352-7.el6_2.x86_64 ruby-augeas-0.4.1-1.el6.x86_64 rubygem-puppet-lint-0.1.6-1.el6.rf.noarch rubygem-rake-0.8.7-2.1.el6.noarch rubygem-rspec-1.3.0-2.el6.noarch rubygems-1.3.7-1.el6.noarch ruby-irb-1.8.7.352-7.el6_2.x86_64 ruby-libs-1.8.7.352-7.el6_2.x86_64 ruby-mysql-2.8.2-1.el6.x86_64 ruby-rdoc-1.8.7.352-7.el6_2.x86_64 ruby-shadow-1.4.1-13.el6.x86_64 -- 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] Trying to build Ruby 1.8.7 on a RHEL5 systems
On Apr 18, 2012, at 6:27 PM, Dan White wrote: On Apr 18, 2012, at 6:08 PM, Jo Rhett wrote: On Apr 16, 2012, at 6:51 PM, Dan White wrote: I got a bunch of error complaining about rpaths, and in the output was a suggestion to prepend an environment setting to the command -- like this: QA_RPATHS=$[ 0x0001|0x0010 ] rpmbuild -ba ~/rpmbuild/SPECS/ruby.spec When I ran this, the previous errors were now warnings, and I got a set of RPM's. Is this The Way It Works ? Is it possible to eliminate the errors/warnings ? Would a link to a PatchBin of the build output help ? Yes, this is the way it works. Read up on what those particular rpath errors mean, and I think you'll come to understand why they don't matter. But it's best to read for yourself ;-) FYI, go edit that spec file and put the latest ruby patch release in there. There's some important fixes in the latest ruby patches, and the spec file and patches work just great with the latest ruby release. Might you be able to provide a few links or pointers to documentation and patches ? I'm not sure what you mean. For ruby, go to ruby.org and find the latest patchlevel for 1.8.7 and put that number at the top of the spec file. For rpath, try http://www.lmgtfy.com/ ;-) -- Jo Rhett Net Consonance : consonant endings by net philanthropy, open source and other randomness -- 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] puppet-lint error
It looks like an incompatibility between puppet-lint and ruby 1.9, which removed the String#each method that was in earlier versions. On Wed, Apr 18, 2012 at 11:30 PM, Joseph cheng...@gmail.com wrote: Hi, this is not strictly puppet related but I am hoping someone here who uses puppet-lint can tell me what is going on here. $ puppet-lint init.pp /Users/jc/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/ rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead. /Users/jc/.rvm/gems/ruby-1.9.3-p125/gems/puppet-lint-0.1.13/bin/puppet- lint:89:in `top (required)': undefined method `each' for service.pp:String (NoMethodError) from /Users/jc/.rvm/gems/ruby-1.9.3-p125/bin/puppet-lint:19:in `load' from /Users/jc/.rvm/gems/ruby-1.9.3-p125/bin/puppet-lint:19:in `main' puppet (2.7.12) puppet-lint (0.1.13) Thx! J. -- 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] Cron job isn't running
I only need to run puppet weekly, so I made this little shell script and put in the the /etc/cron.weekly folder, but it's not running. If I run the script manually, it works just fine. Why not from cron? #!/bin/bash # # Cron job managed by Puppet # # Randomize 15 minutes to avoid overloading server sleep $((RANDOM % 900)) exec puppet agent --no-daemonize --onetime -- You received this message because you are subscribed to the Google Groups Puppet Users group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/Ccx8LJ7QCRMJ. 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] Trying to build Ruby 1.8.7 on a RHEL5 systems
- Jo Rhett jrh...@netconsonance.com wrote: For ruby, go to ruby.org and find the latest patchlevel for 1.8.7 and put that number at the top of the spec file. FYI: ruby.org is a parked domain. “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 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] Cron job isn't running
Usually cron problems like this are because of the way cron shrinks your $PATH environment variable. Read man 5 crontab and man 8 cron, or find them on the web. Or use the full path to your puppet executable. Why don't you have puppet set up the cron job for you? That way puppet will install its own cron job on the first (manual, setup) run and will work automatically thereafter. Plus if you want to change your run time later, you need only change your central manifest. cron { 'run puppet': command = /usr/bin/puppet agent --no-daemonize --onetime, user = 'root', weekday = 2, hour = 1, minute = fqdn_rand(59), } On Thu, Apr 19, 2012 at 12:43:16PM -0700, thinkwell wrote: I only need to run puppet weekly, so I made this little shell script and put in the the /etc/cron.weekly folder, but it's not running. If I run the script manually, it works just fine. Why not from cron? #!/bin/bash # # Cron job managed by Puppet # # Randomize 15 minutes to avoid overloading server sleep $((RANDOM % 900)) exec puppet agent --no-daemonize --onetime -- You received this message because you are subscribed to the Google Groups Puppet Users group. To view this discussion on the web visit [1]https://groups.google.com/d/msg/puppet-users/-/Ccx8LJ7QCRMJ. 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. https://groups.google.com/d/msg/puppet-users/-/Ccx8LJ7QCRMJ -- 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] Migrate installation to different directory
Hi Everyone; I want puppet to be installed in /app/puppet instead of the default /etc. I cannot figure out how to get the puppetmasterd to look for the config file (puppet.conf) in /app/puppet instead of /etc/puppet. If anyone can help, I would really appreciate it! -- 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] Migrate installation to different directory
On Apr 19, 2012, at 12:56 PM, JA wrote: Hi Everyone; I want puppet to be installed in /app/puppet instead of the default /etc. I cannot figure out how to get the puppetmasterd to look for the config file (puppet.conf) in /app/puppet instead of /etc/puppet. If anyone can help, I would really appreciate it! not exactly responsive to your question as I suspect that the path is hard coded but... If you're hard pressed for disk space why not make a symlink from /app/puppet to /etc/puppet so that puppetmasterd would never know the difference? Craig -- 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] ssh_authorized_keys fails if a line is empty
On Thu, Apr 19, 2012 at 07:20:10AM -0700, Maurice Meeden wrote: Hi group, we want to manage our authorized_keys with puppet and are trying ssh_authorized_keys. Everything works as expected, but if ~/.ssh/ authorized_keys contains en empty line, puppet raises an error and generate a complete new file: debug: Prefetching parsed resources for ssh_authorized_key err: Could not prefetch ssh_authorized_key provider 'parsed': Could not parse line at /root/.ssh/authorized_keys:3 If the line contains a blank, it works. How can we change this behaviour? We've looked into /usr/lib64/ruby/vendor_ruby/1.8/puppet/ provider/ssh_authorized_key/parsed.rb but I believe the match statement is correct: text_line :blank, :match = /^\s+/ The match means »one or more whitespace characters at the beginning of a line«. So it would match » aaa« or » « but not »«. It should read text_line :blank, :match = /^\s*$/ which means »beginning of a line, followed by zero, one or more whitespace characters, followed by the end of line. Would you mind opening a ticket on redmine? This is clearly a bug http://projects.puppetlabs.com/issues -Stefan -- 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] access variables from calling ressource
Hi, This should work: $res = ['test1','test2'] example::ressource { $res: } with the caveat that I can't see your code or how you get your vars. Have tried Hiera? Makes these things relatively simple. Den On 20/04/2012, at 1:23, Andreas Paul xorp...@googlemail.com wrote: I need to create a XML file for our Nagios server. This XML file needs to contain all Tomcats on this server, which are created with a parameterized puppet ressource. What I need is something like this: root nametest1/name nametest2/name /root from these ressources example::ressource { test1: } example::ressource { test2: } Here is an example puppet module https://github.com/xorpaul/puppet-example How can I access the $name variable from the example::ressource? Can I do something like $ressourcename = $example::ressource::name At first I tried using puppet-concat and it worked until I needed to specify a concat::fragment only once and still be able to access the ressource parameters. Is there a simple solution I'm just not seeing here? -- You received this message because you are subscribed to the Google Groups Puppet Users group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/VqZyokMU5UYJ. 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] Migrate installation to different directory
On Thu, Apr 19, 2012 at 03:56:37PM -0400, JA wrote: Hi Everyone; I want puppet to be installed in /app/puppet instead of the default /etc. I cannot figure out how to get the puppetmasterd to look for the config file (puppet.conf) in /app/puppet instead of /etc/puppet. If anyone can help, I would really appreciate it! It should work if you start your master with --confdir /app/puppet -Stefan -- 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] Cron job isn't running
Well, I tried adding the full command path, and set the cron job to cron.hourly but that didn't work. :-( The reason I used a cron job (managed by Puppet as a file) was so that anacron would run the job on reboot if the system was down at 4:00 AM Sunday. I only need once-a-week running, but I do want to make sure each week gets its run, whether the machine was running or not. One thing I'm noticing is my apache2 logs. What does this activity represent? 127.0.1.1:8140 ip_address - - [19/Apr/2012:19:07:49 -0400] PUT /production/report/system.sys1.lan HTTP/1.1 200 4220 - - 127.0.1.1:8140 ip_address - - [19/Apr/2012:19:09:25 -0400] POST /production/catalog/weaverex.sys2.com HTTP/1.1 400 4492 - - 127.0.1.1:8140 ip_address - - [19/Apr/2012:19:09:26 -0400] PUT /production/report/weaverex.sys2.com HTTP/1.1 200 4220 - - 127.0.1.1:8140 ip_address - - [19/Apr/2012:19:09:35 -0400] POST /production/catalog/system.sys3.lan HTTP/1.1 400 4492 - - 127.0.1.1:8140 ip_address - - [19/Apr/2012:19:09:36 -0400] PUT /production/report/system.sys3.lan HTTP/1.1 200 4220 - - 127.0.1.1:8140 ip_address - - [19/Apr/2012:19:11:21 -0400] POST /production/catalog/system.sys4.lan HTTP/1.1 400 4492 - - 127.0.1.1:8140 ip_address - - [19/Apr/2012:19:11:22 -0400] PUT /production/report/system.sys4.lan HTTP/1.1 200 4220 - - 127.0.1.1:8140 ip_address - - [19/Apr/2012:19:12:45 -0400] POST /production/catalog/system.sys5.lan HTTP/1.1 400 4476 - - 127.0.1.1:8140 ip_address - - [19/Apr/2012:19:12:46 -0400] PUT /production/report/system.sys6.lan HTTP/1.1 200 4220 - - 127.0.1.1:8140 ip_address - - [19/Apr/2012:19:14:55 -0400] POST /production/catalog/system.sys7.lan HTTP/1.1 400 4492 - - 127.0.1.1:8140 ip_address - - [19/Apr/2012:19:14:56 -0400] PUT /production/report/system.sys8.lan HTTP/1.1 200 4220 - - 127.0.1.1:8140 ip_address - - [19/Apr/2012:19:15:14 -0400] POST /production/catalog/system.sys8.lan HTTP/1.1 400 4492 - - 127.0.1.1:8140 ip_address - - [19/Apr/2012:19:15:15 -0400] PUT /production/report/system.sys8.lan HTTP/1.1 200 4220 - - 127.0.1.1:8140 ip_address - - [19/Apr/2012:19:17:09 -0400] POST /production/catalog/system.sys9.lan HTTP/1.1 400 4492 - - 127.0.1.1:8140 ip_address - - [19/Apr/2012:19:17:10 -0400] PUT /production/report/system.sys9.lan HTTP/1.1 200 4220 - - 127.0.1.1:8140 ip_address - - [19/Apr/2012:19:17:45 -0400] POST /production/catalog/system.sys10.lan HTTP/1.1 400 4476 - - 127.0.1.1:8140 ip_address - - [19/Apr/2012:19:17:46 -0400] PUT /production/report/system.sys10.lan HTTP/1.1 200 4220 - - 127.0.1.1:8140 ip_address - - [19/Apr/2012:19:18:26 -0400] POST /production/catalog/system.sys11.lan HTTP/1.1 400 4492 - - 127.0.1.1:8140 ip_address - - [19/Apr/2012:19:18:27 -0400] PUT /production/report/system.sys11.lan HTTP/1.1 200 4220 - - 127.0.1.1:8140 ip_address - - [19/Apr/2012:19:19:40 -0400] POST /production/catalog/system.sys12.lan HTTP/1.1 400 4492 - - 127.0.1.1:8140 ip_address - - [19/Apr/2012:19:19:41 -0400] PUT /production/report/system.sys12.lan HTTP/1.1 200 4220 - - 127.0.1.1:8140 ip_address - - [19/Apr/2012:19:19:44 -0400] POST /production/catalog/system.sys13.lan HTTP/1.1 400 4476 - - 127.0.1.1:8140 ip_address - - [19/Apr/2012:19:19:45 -0400] PUT /production/report/system.sys13.lan HTTP/1.1 200 4220 - - -Original Message- From: puppet-users@googlegroups.com [mailto:puppet-users@googlegroups.com] On Behalf Of Christopher Wood Sent: Thursday, April 19, 2012 3:55 PM To: puppet-users@googlegroups.com Subject: Re: [Puppet Users] Cron job isn't running Usually cron problems like this are because of the way cron shrinks your $PATH environment variable. Read man 5 crontab and man 8 cron, or find them on the web. Or use the full path to your puppet executable. Why don't you have puppet set up the cron job for you? That way puppet will install its own cron job on the first (manual, setup) run and will work automatically thereafter. Plus if you want to change your run time later, you need only change your central manifest. cron { 'run puppet': command = /usr/bin/puppet agent --no-daemonize --onetime, user = 'root', weekday = 2, hour = 1, minute = fqdn_rand(59), } On Thu, Apr 19, 2012 at 12:43:16PM -0700, thinkwell wrote: I only need to run puppet weekly, so I made this little shell script and put in the the /etc/cron.weekly folder, but it's not running. If I run the script manually, it works just fine. Why not from cron? #!/bin/bash # # Cron job managed by Puppet # # Randomize 15 minutes to avoid overloading server sleep $((RANDOM % 900)) exec puppet agent --no-daemonize --onetime -- You received this message because you are subscribed to the Google Groups Puppet Users group. To view this discussion on the web visit [1]https://groups.google.com/d/msg/puppet-users/-/Ccx8LJ7QCRMJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe
[Puppet Users] Migrating from an older version of puppet. classes not found.
Hello! I'm migrating from an older version of puppet (puppet --version = 0.25.4) to 2.6.2. The current directory structure of puppet is: puppet | |---manifest | | | |---site.pp | |---classes | | | |---whole bunch of .pp files,no sub directories, no init.pp, not being detected | |---modules | |---whole buch of modules, able to be imported An example of one of the clasess/*.pp files is: # Software required for core servers as per the service catalogue # This is in addition to base software which is the minimum for a running server # class admin_tools { package { screen: ensure = latest } package { lynx: ensure = latest } package { lsscsi: ensure = latest } package { dosfstools: ensure = latest } } The problem I'm having is puppet --test gives me: err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not parse for environment production: No file(s) found for import of 'classes/*.pp' at /etc/puppet/manifests/site.pp:13 on node zvsv02.opus.co.nz My site.pp file looks like: # Root manifest file. Must exist; everything gets included from here. # Also includes some root level configuration (file buckets etc) #NB: No default node. If a client doesn't match, we want to know about it, not carry on blithely import common import classes/*.pp bunch of declared nodes I'm confident the nodes are properly formatted so I have committed them. The the problem I find is if I comment out import classes/*.pp then I don't get the error about importing the classes/*.pp, but then the nodes can't import the .pp files that are located inside the classes directory because it hasn't been imported. So I guess my question is, how can I get puppet to import all these .pp files (which I assume are classes) so that nodes can find 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.
[Puppet Users] Using puppet for release management?
I'm trying to convince my company to use puppet as the release management engine to publish the bits for Drupal to the web servers. The reason why I want this is to cut off the developers from production, but also create a process and procedure for code release to the stage and production environments. While this is possible, my question is, do you use puppet in such manner? Thanks. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/C4voRFNujyEJ. 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.