Re: [Puppet Users] Hudson/Jenkins updating host parameter?
On Fri, Feb 10, 2012 at 7:18 AM, mkochco mkoc...@gmail.com wrote: Can I get suggestions on how to accomplish step 3. I know foreman provides a REST API but it doesn't appear to allow modification of host parameters. AFAIK, all parameters can be modified over the API, including host parameters.. feel free to provide more details on the foreman users list. Cheers, Ohad -- 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: Time interval within execution of scripts from the server
Hi, I am running multiple scripts on number of machines through puppet server as my server is CentOS 5.6 clients are Ubuntu 11.04 the scripts are executed in above 2000 clients/nodes so I dont want to execute the scripts on multiple nodes at the same time. Thanks mukulm On Feb 10, 6:45 pm, Ygor y...@comcast.net wrote: http://lmgtfy.com/?q=cron+random+delay Inserting Random Delay In Cron Jobshttp://www.moundalexis.com/archives/76.php On Feb 9, 9:00 am, mukulm smilemukul2...@gmail.com wrote: Hi, I have multiple script to be copied executed from the puppet server on the client systems but i want to execute each script within a timeframe such as hourly, weekly or monthly from the puppet server as i dont want to execute all scripts on the same frequency. Any help will be greatly appreciated. Thanks mukulm -- 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] Time interval within execution of scripts from the server
Filling in discussion that happened off-list: On Feb 12, 2012, at 7:34 AM, mukulm wrote: Hi, I am running multiple scripts on number of machines through puppet server as my server is CentOS 5.6 clients are Ubuntu 11.04 the scripts are executed in above 2000 clients/nodes so I dont want to execute the scripts on multiple nodes at the same time. Thanks mukulm On Feb 11, 2012, at 11:10 AM, Dan White wrote: I do not use Puppet in that large an environment, so I would only be guessing at solutions. consider http://puppetlabs.com/mcollective/ I think it was designed for situations like yours. On Feb 10, 6:45 pm, Dan White wrote: http://lmgtfy.com/?q=cron+random+delay Inserting Random Delay In Cron Jobshttp://www.moundalexis.com/archives/76.php On Feb 9, 9:00 am, mukulm smilemukul2...@gmail.com wrote: Hi, I have multiple script to be copied executed from the puppet server on the client systems but i want to execute each script within a timeframe such as hourly, weekly or monthly from the puppet server as i dont want to execute all scripts on the same frequency. Any help will be greatly appreciated. Thanks mukulm On Thu, Feb 9, 2012 at 9:32 PM, Dan White wrote: http://keymon.wordpress.com/2010/08/06/setup-puppet-client-to-run-in-a-cron-task-with-a-random-minute/ -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Re: Anyone seeing odd agent behaviour with 2.7.10?
On Fri, Feb 10, 2012 at 3:38 PM, Craig White craig.wh...@ttiltd.com wrote: to my knowledge puppetd always runs as root because it needs the permissions in order to perform its magic. puppetmaster runs as user:puppet, group:puppet but not puppetd That is correct. There is a fix for this in 2.7.x and will be in the 2.7.11rc which should be out next week. Craig On Feb 10, 2012, at 4:14 PM, Will S. G. wrote: I was browsing the group to see if anyone else was experiencing the issue. I'm having the same with CentOS 6.2 x86_64. From what I see, puppetd should be running with the user puppet. However, the pid is now owned by root, which is obviously the issue. Someone made a mistake on the puppet RPM spec somewhere. On Jan 26, 4:00 am, Steph Gosling st...@chuci.org wrote: Hi all, Upgraded a master and a couple of clients to 2.7.10 and now see the following when running an agent if the daemon is also running: [steph@somehost ~]$ sudo puppet agent --onetime --verbose --no-daemonize info: Caching catalog for somehost.example.com info: Applying configuration version '1327578407' notice: /Stage[main]/Mysql-server/Package[mysql-server]/ensure: created notice: /Stage[main]/Mysql-server/Service[mysqld]/ensure: ensure changed 'stopped' to 'running' notice: Finished catalog run in 20.11 seconds err: Could not remove PID file /var/run/puppet/agent.pid [steph@somehost ~]$ I see that 2.7.10 fixed a bughttp://projects.puppetlabs.com/issues/5246and wonder if they're related? in 2.7.9 this would run without throwing the error, indeed in .10 the onetime run completes and the agent daemon is happy too: It's just unnerving to see pink messages :) Environment is CentOS 6.2 fwiw. -- Steph Gosling st...@chuci.org -- 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. -- Craig White ~ craig.wh...@ttiltd.com 1.800.869.6908 ~~ www.ttiassessments.com Need help communicating between generations at work to achieve your desired success? Let us help! -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Re: Newbie: Confused about where to start managing users...
On Thu, Feb 9, 2012 at 6:07 PM, jcbollinger john.bollin...@stjude.org wrote: It precisely describes the user configuration you want to achieve, and the 'allowdupe' should enable it to work. Supposing that users 'fred' and 'barney' are initially present with swapped UIDs, you should transiently have a situation where the two have the same UID (might be either one), and end with each having the correct UID. What you're trying to do is unusual, however, so you should test. If it doesn't work then that would constitute a Puppet bug. Sorry for my late reply. I've had the flue. I'm happy to report it works exactly like you describe. Thanks for all your help and guidance, John. Peter -- 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: Adding a parameter to a custom Puppet type/provider
Added to the pastie: http://pastie.org/private/em9dve6walcxyfjyssvya On Feb 11, 10:21 am, Stefan Schulte stefan.schu...@taunusstein.net wrote: Can you provide your resource definition where you use the logical_volume type? -Stefan On Sat, Feb 11, 2012 at 09:31:36AM -0600, Jason Koppe wrote: I do have /var/lib/puppet/lib/puppet/type/logical_volume.rb on my puppet master and I still get the same error. On Wed, Dec 7, 2011 at 6:01 AM, Stefan Schulte stefan.schu...@taunusstein.net wrote: On Tue, Dec 06, 2011 at 10:34:47AM -0800, Jason Koppe wrote: http://pastie.org/private/t9nl5wa91bd6rx1afad7sqis a pastie of my changes tohttps://github.com/puppetlabs/puppet-lvmand the error i'm seeing is err: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter physical_volume at file.pp:26 at node Parameter validation happens on your puppet master so I guess you have to update /var/lib/puppet/lib/puppet/type/logical_volume.rb on your master first. -Stefan -- Jason Koppe jason.robert.ko...@gmail.com Cell (210) 445-8242 -- 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 athttp://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] Using templates
Hi everyone, I'm learning Puppet and I want to configure ssh server with different port on different nodes. Puppet v2.7.1 I have created module ssh: content of modules/ssh/manifests/install.pp class ssh::install { package { ssh: ensure = present, } } content of modules/ssh/manifests/service.pp class ssh::service { service { ssh: ensure = running, hasstatus = true, hasrestart = true, enable = true, require= Class[ssh::config], } } content of modules/ssh/manifests/config.pp define ssh::config( $port = 22 ) { file { /etc/ssh/sshd_config: ensure = present, owner = 'root', group = 'root', mode= 0600, content = template(ssh/sshd_config.erb), require = Class[ssh::install], notify = Class[ssh::service], } } modules/ssh/manifests/init.pp define ssh($port = 22){ include ssh::install, ssh::service ssh::config{puppet: port = $port} } And in the nodes.pp: node default { include ssh ssh{ puppet: port = 3536 } } When I run puppet agent --no-daemonize --verbose --onetime I got: err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class ssh for pclient.testlab.dev at /etc/ puppet/manifests/nodes.pp:2 on node pclient.testlab.dev Tell me, please, how to pass parameter to the class from node? Thanks, Andrey. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Re: neatest way to determine a major version of centos/linux?
On 8 February 2012 02:37, d...@looprock.comtechnopathol...@gmail.com wrote: I use this: Facter.add(operatingsystemrelease_mv) do setcode do %x{cat /etc/redhat-release |awk \{'print $3'\}|cut - c1}.chomp end end I think that will fail on centos. This line is better, works on centos/rhel. cat /etc/redhat-release |awk -Frelease {'print $2'} | awk {'print $1'} | awk -F. {'print $1'} -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Re: How do I track updates to forge modules?
On 11 February 2012 01:15, Kelsey Hightower kel...@puppetlabs.com wrote: On Feb 2, 5:55 pm, John Warburton jwarbur...@gmail.com wrote: Is there a way to watch modules and be notified if they are updated? I can't see anything obvious in the documentation Currently there is no easy way to track when modules are updated on the Forge. One way I can think of to track updates to modules, but not necessarlly releases to the Forge, would be to follow the project on Github. This also sounds like a really good feature request which can be opened here: https://projects.puppetlabs.com/projects/module-site Thanks Kelsey - raised https://projects.puppetlabs.com/issues/12587 Regards 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.
Re: [Puppet Users] Re: neatest way to determine a major version of centos/linux?
There's also the 'operatingsystemrelease' fact that will evaluate to the full version. You could do this: Facter.add('operatingsystemmajor') do setcode do Facter.value('operatingsystemrelease').split('.').first end end If you do choose to use the shell command, you can do this: Facter.add('operatingsystemmajor') do setcode(cat /etc/redhat-release | awk \{'print $3'\}|cut - c1) end Passing a string to the setcode method in Facter will automatically pipe the command to Facter::Util::Resolution.exec which will execute the command and return the value from stdout. Using Facter::Util::Resolution.exec() is better than %x{} because it has a built-in timeout (so if your command hangs your facter/puppet run won't). It also handles nil values well, has a built-in PATH environment variable, and handles invalid commands a bit better than %x{} (plus, just passing an argument to setcode is a bit cleaner). On Sun, Feb 12, 2012 at 2:12 PM, Elias Abacioglu elias.r...@gmail.comwrote: On 8 February 2012 02:37, d...@looprock.comtechnopatholo**g...@gmail.comtechnopathol...@gmail.com wrote: I use this: Facter.add(**operatingsystemrelease_mv) do setcode do %x{cat /etc/redhat-release |awk \{'print $3'\}|cut - c1}.chomp end end I think that will fail on centos. This line is better, works on centos/rhel. cat /etc/redhat-release |awk -Frelease {'print $2'} | awk {'print $1'} | awk -F. {'print $1'} -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@** googlegroups.com puppet-users%2bunsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/** group/puppet-users?hl=enhttp://groups.google.com/group/puppet-users?hl=en . -- Gary Larizza Professional Services Engineer Puppet Labs -- 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: Using templates
Delete that include ssh line in the default node! That should make it work the way you expect. (You don't have a class named ssh, which is what include is looking for; instead, you have a defined type called ssh. The way nodes.pp is written now, it's trying to declare both class ssh and an instance of the ssh type.) On Feb 12, 2:06 pm, Andrey Ageyev a.age...@gmail.com wrote: Hi everyone, I'm learning Puppet and I want to configure ssh server with different port on different nodes. Puppet v2.7.1 I have created module ssh: content of modules/ssh/manifests/install.pp class ssh::install { package { ssh: ensure = present, } } content of modules/ssh/manifests/service.pp class ssh::service { service { ssh: ensure = running, hasstatus = true, hasrestart = true, enable = true, require = Class[ssh::config], }} content of modules/ssh/manifests/config.pp define ssh::config( $port = 22 ) { file { /etc/ssh/sshd_config: ensure = present, owner = 'root', group = 'root', mode = 0600, content = template(ssh/sshd_config.erb), require = Class[ssh::install], notify = Class[ssh::service], } } modules/ssh/manifests/init.pp define ssh($port = 22){ include ssh::install, ssh::service ssh::config{puppet: port = $port} } And in the nodes.pp: node default { include ssh ssh{ puppet: port = 3536 } } When I run puppet agent --no-daemonize --verbose --onetime I got: err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class ssh for pclient.testlab.dev at /etc/ puppet/manifests/nodes.pp:2 on node pclient.testlab.dev Tell me, please, how to pass parameter to the class from node? Thanks, Andrey. -- 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] Facter displaying multiple IP addresses?
Hi, I have a motd module (not mine) that rewrites /etc/motd with some useful host details. One particular piece of information is the IP address in motd.erb: FQDN: %= fqdn % IP: %= ipaddress % I have several hosts that have multiple IP addresses, and I need to display them as well. When I run facter | grep ipaddress, I get an array: ipaddress = 172.26.20.16 ipaddress_eth0 = 172.26.20.16 ipaddress_eth1 = 10.20.30.5 ipaddress_eth2 = 10.20.40.5 ipaddress_eth3 = 10.20.50.5 ipaddress_eth4 = 10.20.60.5 ipaddress_eth5 = 10.20.70.5 Is there a way to display eth{0-5} as well? -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Facter displaying multiple IP addresses?
On Mon, Feb 13, 2012 at 2:01 PM, Will S. G. w...@arw.in wrote: Is there a way to display eth{0-5} as well? You could do a for loop from 0 to N (5?) and check if the variable exists (if has_variable?(ipaddress_eth + index)) then print it. I'm sure there's probably a nicer way of doing this in Ruby :) - Gonzalo -- 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.