[Puppet Users] Capture the output of exec command

2012-02-21 Thread sateesh
Hi, I need to capture the output of an exec command in puppet manifest variable. How can I do this. Thanks in advance, Sateesh B. -- 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] Re: Capture the output of exec command

2012-02-21 Thread Paul Tötterman
Hi Sateesh, I need to capture the output of an exec command in puppet manifest variable. How can I do this. You cannot, since the manifest is compiled into a catalog on the puppet master and then the catalog is sent to the agent, which can be on a different machine, and only then is the

[Puppet Users] Re: Capture the output of exec command

2012-02-21 Thread Alexander Swen
You cannot, since the manifest is compiled into a catalog on the puppet master and then the catalog is sent to the agent, which can be on a different machine, and only then is the command defined by the exec run. Ehrm, personly I would try: exec { put text in a file: command = ls

[Puppet Users] file and user permissions on the puppet master, best practice

2012-02-21 Thread paulS
Hi all. New puppet developer. Very excited. I have the agents communicating with the puppet master. I'm wondering now about best practice for file and user permissions on the puppet master. Most of my wonder probably stems from general lack of understanding in this area. I'd like to get it right

[Puppet Users] Re: question regarding case and facts

2012-02-21 Thread Stefan Wiederoder
Hello Marc, thanks for your reply, I´ll give it a try. On 13 Feb., 15:24, Marc DiBlasi marc.dibl...@gmail.com wrote: You can do: case $factA$factB { } Or even better, assign them to a new variable: $concatenatedFacts = $factA$factB case $concatenatedFacts { } Or if it makes it

Re: [Puppet Users] Example42 MySQL puppet-module

2012-02-21 Thread Felix Frank
Hi, On 02/10/2012 03:09 AM, Will S. G. wrote: Hi there, I thought I understood how this module works, but I guess I missed something. Here is what I have in my nodes.pp node 'mysql' inherits default { include mysql mysql::user { db1:

Re: [Puppet Users] Example42 MySQL puppet-module

2012-02-21 Thread Thomas Jones
mysql::grant { [db1, db2]: mysql_privileges = ALL, mysql_password = password, mysql_db = db1, mysql_user = [db1, db2], mysql_host = % } } Keep in mind this sets both users with same pw for both dbs. It would be better to just copy n paste another grant directive and chg according to another user.

[Puppet Users] Re: Cannot see node on Live Management

2012-02-21 Thread Mark B
Yes...I was able to do the mco ping and the only node that responded was the puppet master ..not the client. Both activemq and mcollective appear to be working. is there a pe-users group? I thought that is what this was ? On Feb 20, 2:58 pm, Justin Stoller jus...@puppetlabs.com wrote: Have you

[Puppet Users] Re: Parameterized classes override of parameter

2012-02-21 Thread jcbollinger
On Feb 20, 10:24 am, Jos Houtman j...@hyves.nl wrote: Hi group, I expect parameterized classes to behave simular to types in relation to overrides, but obviously this is not the case. Could someone what is should then expect from overriding an parameterized class. what I have is:

[Puppet Users] Re: Capture the output of exec command

2012-02-21 Thread jcbollinger
On Feb 21, 3:00 am, sateesh bbalasate...@gmail.com wrote: I need to capture the output of an exec command in puppet manifest variable. How can I do this. As Paul observed, what you ask is inconsistent with Puppet's manner of operation. How you should proceed instead depends on what you are

Re: [Puppet Users] Problem with Custom Facter

2012-02-21 Thread Matt Mencel
Hi Nathan, Excellent! Thanks for the tip. Matt On Mon, Feb 20, 2012 at 5:33 PM, Matt Mencel m...@techminer.net wrote: I am trying to write a custom facter for CentOS/RHEL that tells me how many updates are found on a run of 'yum check-update' Sorry I replied hastily. After replying I

[Puppet Users] Re: Problem with Custom Facter

2012-02-21 Thread jcbollinger
On Feb 20, 7:14 pm, Nathan Powell nat...@nathanpowell.org wrote: On Mon, Feb 20, 2012 at 5:33 PM, Matt Mencel m...@techminer.net wrote: I am trying to write a custom facter for CentOS/RHEL that tells me how many updates are found on a run of 'yum check-update' Sorry I replied hastily.  

Re: [Puppet Users] Re: Problem with Custom Facter

2012-02-21 Thread Nathan Powell
On Tue, Feb 21, 2012 at 9:57 AM, jcbollinger john.bollin...@stjude.org wrote: Alternatively, `yum -q check-update | grep '\\w' | wc --lines`.chomp Yep, lots of ways to do it. sudo is not needed to run yum queries, and avoiding sudo when you don't need it is good practice.  Personally, I

Re: [Puppet Users] Re: Cannot see node on Live Management

2012-02-21 Thread Kenneth Lo
In PE, pe-activemq is the server service (master need that service) and pe-mcollective is the client service (agents). If you don't see your agents listed in LM normally means that the pe-mcollective service is not running on the clients. What I've experienced with PE is that under normal

Re: [Puppet Users] file and user permissions on the puppet master, best practice

2012-02-21 Thread Craig White
On Feb 21, 2012, at 2:52 AM, paulS wrote: Hi all. New puppet developer. Very excited. I have the agents communicating with the puppet master. I'm wondering now about best practice for file and user permissions on the puppet master. Most of my wonder probably stems from general lack of

Re: [Puppet Users] Re: Problem with Custom Facter

2012-02-21 Thread Matt Mencel
John, The only examples I've seen of timeout have it outside the setcode block. Can anyone confirm it's behavior depending on whether it's inside or outside setcode? The docs for it are pretty thin. Thanks, Matt On Tue, Feb 21, 2012 at 8:57 AM, jcbollinger john.bollin...@stjude.orgwrote:

Re: [Puppet Users] exec: How to logoutput = on_failure and get STDERR too?

2012-02-21 Thread Felix Frank
Hi, On 02/14/2012 04:05 PM, Peter Valdemar Mørch wrote: It seems brittle, shell dependent, non-portable and redundant to have to put 21 at the end of all exec commands, so I'm hoping there is a better way... while I disagree as far as portability, dependability and savour are concerned ;-) I

[Puppet Users] Re: Cannot see node on Live Management

2012-02-21 Thread Mark B
The pe-activemq is running on the server and the pe-mcollective is running on the agent. The reports from the client are showing up on the puppet console. Just not seeing the node on live management screen. Is there a way to manually do a new puppet run to try and force it? On Feb 21, 10:17 am,

[Puppet Users] mcollective plugin question

2012-02-21 Thread Kenneth Lo
We've been using mcollective primarily for coordinate service restart across nodes as well as facts-finding, which are all well and good. One thing we would like to utilize this tool is to create an arbitrary shell command plugins/services so our master can really act as a command center. I

[Puppet Users] Re: Triggering an action on ensure: removed

2012-02-21 Thread jcbollinger
On Feb 20, 5:05 pm, James purplei...@gmail.com wrote: Dear Puppet, I wish to run an Exec when a puppet define is removed. It is always a bad idea for Puppet manifests to try to employ introspective logic, basing decisions or actions on a dynamic determination of whether a certain class or

[Puppet Users] Re: Cannot see node on Live Management

2012-02-21 Thread Mark B
I restarted the mcollective and I see the following in the logs: I, [2012-02-21T11:18:13.485565 #13326] INFO -- : stomp.rb:79:in `on_connectfail' Connction to stomp://mcollect...@puppett..xxx.xxx:61613 failed on attempt 11 On Feb 21, 11:12 am, Kenneth Lo k...@paydiant.com wrote: Just try

Re: [Puppet Users] Re: Cannot see node on Live Management

2012-02-21 Thread Gary Larizza
On Tue, Feb 21, 2012 at 8:21 AM, Mark B mlitt...@indiana.edu wrote: I restarted the mcollective and I see the following in the logs: I, [2012-02-21T11:18:13.485565 #13326] INFO -- : stomp.rb:79:in `on_connectfail' Connction to stomp://mcollect...@puppett..xxx.xxx :61613 failed on

[Puppet Users] Re: Problem with Custom Facter

2012-02-21 Thread jcbollinger
On Feb 21, 9:21 am, Matt Mencel m...@techminer.net wrote: The only examples I've seen of timeout have it outside the setcode block.  Can anyone confirm it's behavior depending on whether it's inside or outside setcode?  The docs for it are pretty thin. I can tell you this for sure: 1) the

[Puppet Users] Re: Cannot see node on Live Management

2012-02-21 Thread Mark B
Yes...since this is out puppet test server we call it puppett On Feb 21, 11:36 am, Gary Larizza g...@puppetlabs.com wrote: On Tue, Feb 21, 2012 at 8:21 AM, Mark B mlitt...@indiana.edu wrote: I restarted the mcollective and I see the following in the logs: I, [2012-02-21T11:18:13.485565

[Puppet Users] Re: file and user permissions on the puppet master, best practice

2012-02-21 Thread paulS
(By the way, I should have referred to myself as a new Puppet _user_. I certainly didn't mean to imply that I'm a developer of Puppet open source software. I'm obviously not up to that challenge.) Thanks a lot, Craig. I'm using Webrick now, and will move to Apache before release to production. I

[Puppet Users] Re: Cannot see node on Live Management

2012-02-21 Thread Mark B
BTW...yes I can ping it from the client and the 3 ports are open On Feb 21, 11:36 am, Gary Larizza g...@puppetlabs.com wrote: On Tue, Feb 21, 2012 at 8:21 AM, Mark B mlitt...@indiana.edu wrote: I restarted the mcollective and I see the following in the logs: I,

[Puppet Users] Re: Puppet on Windows - client installer?

2012-02-21 Thread Shawn Turpin
Is this .MSI available (at least for testing)? When I click on the link it takes me to a login screen. I am trying to pilot it in my test lab environment and would love to give it a whirl. Especially since this testlab environment has limited Internet connectivity (read that as none) so trying

[Puppet Users] white space in fileservers.conf file causes 'connection refused - connect(2)' error

2012-02-21 Thread paulS
This is a heads up. I didn't see this particular root cause to the 'connection refused' error upon google search, so thought I'd pass it on. I tried to make a bug report, but couldn't figure out how to do that. I may not have permission. Arguably it's a 'sensitivity,' though an undocumented one.

Re: [Puppet Users] Re: file and user permissions on the puppet master, best practice

2012-02-21 Thread Craig White
On Feb 21, 2012, at 11:46 AM, paulS wrote: (By the way, I should have referred to myself as a new Puppet _user_. I certainly didn't mean to imply that I'm a developer of Puppet open source software. I'm obviously not up to that challenge.) Thanks a lot, Craig. I'm using Webrick now, and

Re: [Puppet Users] white space in fileservers.conf file causes 'connection refused - connect(2)' error

2012-02-21 Thread Craig White
On Feb 21, 2012, at 12:59 PM, paulS wrote: This is a heads up. I didn't see this particular root cause to the 'connection refused' error upon google search, so thought I'd pass it on. I tried to make a bug report, but couldn't figure out how to do that. I may not have permission. Arguably

[Puppet Users] Caching Facts

2012-02-21 Thread Matt Mencel
I'm curious about the section Caching Ruby Facts on this doc page... http://docs.puppetlabs.com/guides/custom_facts.html#configuring-facts Apparently this ability to assign a TTL value to a fact will be in place in 1.7.0. I've looked through the Facter source and wiki though and find no mention

Re: [Puppet Users] Re: Problem with Custom Facter

2012-02-21 Thread Nan Liu
On Tue, Feb 21, 2012 at 6:57 AM, jcbollinger john.bollin...@stjude.org wrote: On Feb 20, 7:14 pm, Nathan Powell nat...@nathanpowell.org wrote: On Mon, Feb 20, 2012 at 5:33 PM, Matt Mencel m...@techminer.net wrote: I am trying to write a custom facter for CentOS/RHEL that tells me how many

[Puppet Users] Struggle with erb syntax

2012-02-21 Thread thinkwell
Hello everyone, I'm new to puppet ruby - some experience with Python. I'm working at getting some templates coded with hashes conditionals, and using a contrived example here to get myself started: This works as I expect in ruby code: pets = {snakes=[python, boa constrictor], kitties=[tomcat,

Re: [Puppet Users] puppet ssl issues.

2012-02-21 Thread Nan Liu
On Mon, Feb 20, 2012 at 7:24 PM, Digital Ninja dsw.ninja...@gmail.com wrote: So I come in to work monday only to find that none of our puppet clients are working. When I run puppetd -t I get these errors: http://pastebin.com/6iwhG2Y2 I go to the puppet master server and look at

[Puppet Users] Re: white space in fileservers.conf file causes 'connection refused - connect(2)' error

2012-02-21 Thread paulS
I'm checking out a stacks directory from subversion into /opt/stacks on the puppet master then mounting /opt/stacks. The stacks directory contains configuration files for the server stacks, which I'll want to manage with Puppet. I'm not yet using the [file] mount but am using the [stacks] mount,

[Puppet Users] Puppet Labs is growing - now hiring for 2 jobs based anywhere in US!

2012-02-21 Thread PuppetRecruiter
Puppet Labs continues to grow! (Seriously - we're now at 70 employees and continuing to hire more!) I'm currently hiring a Sr Professional Services engineer to work with our clients on custom engagements, lead Puppet trainings, and more. In addition, we've added a new Senior Sales Engineer role

[Puppet Users] Re: Researching Puppet - Local host variations

2012-02-21 Thread thinkwell
I'm getting this worked through in my head, I think. I wanted to make sure that Puppet would totally support me if the migration is made. I've concluded that I can standardize a bit more than I have, and with Daniel's suggestion, quoted below, I'm well impressed! : file {

[Puppet Users] Recent updates to ruby break puppet

2012-02-21 Thread Forrie
I went to update our ruby-1.8 installation and unfortunately, it appears to have broken something that Puppet depends on: # service puppetmaster start Starting puppetmaster: /usr/lib/ruby/site_ruby/1.8/rubygems.rb:334: warning: parenthesize argument(s) for future version

[Puppet Users] Re: Recent updates to ruby break puppet

2012-02-21 Thread Forrie
Nevermind, I accidentally built in the wrong directory an older version. -- 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

Re: [Puppet Users] Caching Facts

2012-02-21 Thread Michael Stahnke
On Tue, Feb 21, 2012 at 2:04 PM, Matt Mencel m...@techminer.net wrote: I'm curious about the section Caching Ruby Facts on this doc page... http://docs.puppetlabs.com/guides/custom_facts.html#configuring-facts Apparently this ability to assign a TTL value to a fact will be in place in 1.7.0.  

[Puppet Users] Re: file and user permissions on the puppet master, best practice

2012-02-21 Thread paulS
Nice! Thanks! sam@puppetmaster:~$ getent passwd | grep puppet # /bin/false is not good puppet:x:108:113:Puppet configuration management daemon,,,:/var/lib/ puppet:/bin/false sam@puppetmaster:~$ sudo chsh puppet -s /bin/bash sam@puppetmaster:~$ getent passwd | grep puppet # that's better

[Puppet Users] Re: puppet ssl issues.

2012-02-21 Thread Digital Ninja
How old is your CA cert? Did your CA expire by any chance? I guess this is the golden question. I'm not really sure. I'm not 100% on how webrick even serves the ssl. From all my checking it seems open ssl used /usr/lib/ssl openssl version -d OPENSSLDIR: /usr/lib/ssl Is this the correct ssl to

[Puppet Users] Re: puppet ssl issues.

2012-02-21 Thread Digital Ninja
100% correct. /var/lib/puppet//ssl was my issue. On Feb 21, 12:01 am, Gary Larizza g...@puppetlabs.com wrote: On Mon, Feb 20, 2012 at 9:50 PM, Digital Ninja dsw.ninja...@gmail.comwrote: I have the puppet master set up to auto sign them. I did a puppetca -- clean FQDN and tried to readd it

[Puppet Users] SSLv3 read server certificate B: certificate verify failed. -- Not time related

2012-02-21 Thread Jon Davis
I recently built, added to puppet and then nuked a server. Before I re-added the machine (after I rebuilt it, with the same name), I went to the puppet server and ran `puppet cert revoke dev-8.company.com` and `puppet cert clean dev-8.company.com`. Now when puppet runs on ANY server in my

Re: [Puppet Users] SSLv3 read server certificate B: certificate verify failed. -- Not time related

2012-02-21 Thread Russell Van Tassell
Just a couple of issues... On Tue, Feb 21, 2012 at 4:56 PM, Jon Davis j...@snowulf.com wrote: I recently built, added to puppet and then nuked a server. Before I re-added the machine (after I rebuilt it, with the same name), I went to the puppet server and ran `puppet cert revoke

[Puppet Users] Re: Struggle with erb syntax

2012-02-21 Thread thinkwell
Well, harrumph. Scratchin' mah head - totally baffled, perplexed. I went to eat and gave it a break. Came back and re-verified syntax checks. Syntax OK - just as before. Ran puppet validate for the first time with no errors. Then, for kicks and giggles, I again to apply the config to the node.

Re: [Puppet Users] Re: Struggle with erb syntax

2012-02-21 Thread Russell Van Tassell
On Tue, Feb 21, 2012 at 5:32 PM, thinkwell thinkwelldesi...@gmail.comwrote: Shazzam - it worked; yet I had made no changes. :-( Very nice it's working, but why the earlier err: Could not retrieve catalog from remote server: wrong header line format that cost me so much time? Seems buggy, but

[Puppet Users] Multiple default providers for package: dpkg, pip; using dpkg, Why?

2012-02-21 Thread Kyle Anderson
Can someone help me understand how why this is happening? I have two Ubuntu laptops that are pretty much the same. Neither of them have pip installed, but even if I do install pip, it doesn't seem to make a difference. I've boiled down my manifests to try to reduce the problem, and this is how it

Re: [Puppet Users] SSLv3 read server certificate B: certificate verify failed. -- Not time related

2012-02-21 Thread Jon Davis
On Tue, Feb 21, 2012 at 17:05, Russell Van Tassell russel...@gmail.comwrote: Just a couple of issues... On Tue, Feb 21, 2012 at 4:56 PM, Jon Davis j...@snowulf.com wrote: I recently built, added to puppet and then nuked a server. Before I re-added the machine (after I rebuilt it, with the

Re: [Puppet Users] Recent updates to ruby break puppet

2012-02-21 Thread kish
On Wed, Feb 22, 2012 at 4:07 AM, Forrie for...@gmail.com wrote: I went to update our ruby-1.8 installation and unfortunately, it appears to have broken something that Puppet depends on: Hi, We were scared of such scenarios, one thought people suggested was to use rvm. Could some enlightened

[Puppet Users] Error 400 on SERVER: Cannot append, variable node_data is defined in this scope at

2012-02-21 Thread M. Piscaer
Hi, I have an problem that I can't get resolved. I have an hash like www.krzywanski.net/archives/703. With this hash i whould like the add some extra hashes before passing to the module, i have tryed the code below. node testnode { class { 'testclass': nodes_data = {