[Puppet Users] Re: New to puppet

2014-10-09 Thread Krishna Krishna
John, thanks for your response. I am planning to take Puppet 202. I think that the entry level exam. Which has some background of the software and some labs. As of now I am kinda shooting in dark. However when I start my certification I will have more specific questions. To give you more

Re: [Puppet Users] puppetdb export - WTF?!

2014-10-09 Thread JonY
Update: 45 hours - ~75% complete On Tuesday, October 7, 2014 1:32:02 PM UTC-7, JonY wrote: Running for 7 hours now. Has exported ~15-20% of the data. I'm intrigued to see what I end up with. On Tuesday, October 7, 2014 1:19:04 PM UTC-7, Wyatt Alt wrote: Thanks Jony. I've loaded up an

[Puppet Users] Automatically remove deactivated host from icinga/nagios config

2014-10-09 Thread Kai Timmer
Hello, I'm using this snippet to build my icinga configuration out of my exported facts #Collect the nagios_host resources Nagios_host || { target = /etc/icinga/puppet.d/hosts.cfg, require = File[/etc/icinga/puppet.d/hosts.cfg], notify = Service[icinga], } If I now deactivate

Re: [Puppet Users] Automatically remove deactivated host from icinga/nagios config

2014-10-09 Thread Ken Barber
I'm using this snippet to build my icinga configuration out of my exported facts #Collect the nagios_host resources Nagios_host || { target = /etc/icinga/puppet.d/hosts.cfg, require = File[/etc/icinga/puppet.d/hosts.cfg], notify = Service[icinga], } If I now

Re: [Puppet Users] Automatically remove deactivated host from icinga/nagios config

2014-10-09 Thread Kai Timmer
Am Donnerstag, 9. Oktober 2014 14:10:49 UTC+2 schrieb Ken Barber: Nope it should work in theory, are you using PuppetDB for this? If so in the puppetdb.log you should see a corresponding log entry for the deactivate command for that node. Can you grep against your puppetdb.log to see if

Re: [Puppet Users] Automatically remove deactivated host from icinga/nagios config

2014-10-09 Thread Ken Barber
Nope it should work in theory, are you using PuppetDB for this? If so in the puppetdb.log you should see a corresponding log entry for the deactivate command for that node. Can you grep against your puppetdb.log to see if this arrives when you send the `puppet node deactivate {foo}` command.

Re: [Puppet Users] Automatically remove deactivated host from icinga/nagios config

2014-10-09 Thread Kai Timmer
2014-10-09 14:56 GMT+02:00 Ken Barber k...@puppetlabs.com: Wait, are you actually purging the resources somewhere? If it becomes unmanaged, that doesn't mean it cleans up after itself unless you are purging also. I did this: [image: Inline-Bild 1] Not sure if I can follow you though?! What

[Puppet Users] Re: stdlib keys()

2014-10-09 Thread jcbollinger
On Wednesday, October 8, 2014 2:15:09 PM UTC-5, Juan Andres Ramirez wrote: Thank you very much Felix for you replay. I got it now , but I have an other question: I created file findarray.pp with this code inside: define findarray( $sitearray = $title, $siteName ){ notify{ARRAY

Re: [Puppet Users] Automatically remove deactivated host from icinga/nagios config

2014-10-09 Thread Ken Barber
Wait, are you actually purging the resources somewhere? If it becomes unmanaged, that doesn't mean it cleans up after itself unless you are purging also. I did this: Not sure if I can follow you though?! What happens if I manually add a (fake) host to my hosts.cfg file. The host

[Puppet Users] Re: how to execute paths in a text file in puppet ruby

2014-10-09 Thread Spriya
Hi, When i executed your facts. It is throwing me error *irb* *irb(main):001:0 require 'facter'* *= true* *irb(main):002:0 Facter.add(:java_versions1) do* *irb(main):003:1* setcode do* *irb(main):004:2* file = '/home/suppalapati/java.txt'* *irb(main):005:2 if

[Puppet Users] Re: How to ensure a variable gets set, before a File or Service gets set.

2014-10-09 Thread Grant Schoep
On Wednesday, October 8, 2014 7:20:52 AM UTC-6, jcbollinger wrote: On Tuesday, October 7, 2014 9:20:41 AM UTC-5, Grant Schoep wrote: So I have the following puppet rule. Pasted below. The problem is, sometimes, I see it looks like it is running the File before it sets the variable

[Puppet Users] Re: Need help with simple hiera example

2014-10-09 Thread jcbollinger
On Wednesday, October 8, 2014 8:44:56 AM UTC-5, Stack Kororā wrote: Greetings, I don't know why, but I am having a rough time trying to get hiera to work. It seems to me that all the examples I see online are either absurdly complex or so stupidly simple that they are absolutely

Re: [Puppet Users] Automatically remove deactivated host from icinga/nagios config

2014-10-09 Thread Kai Timmer
2014-10-09 15:20 GMT+02:00 Ken Barber k...@puppetlabs.com: No not necessarily, you need to enable resource purging with resources like nagios_host: resources { nagios_host: purge = true, } Oh, I just did not now that. My manifest now looks like this: resources { [nagios_host,

[Puppet Users] Re: Need help with simple hiera example

2014-10-09 Thread jcbollinger
On Wednesday, October 8, 2014 8:09:28 PM UTC-5, Stack Kororā wrote: However, I did get it working and you reaffirmed something I had discovered. So thank you very much for responding. I do appreciate it. I'm glad you got it working. Since the documentation is near rubbish on hiera, I

[Puppet Users] Re: Could not set 'file on ensure: undefined method `' for 760

2014-10-09 Thread jcbollinger
On Wednesday, October 8, 2014 7:33:32 AM UTC-5, Torsten Amshove wrote: Ok, the other modules works because they don't create a new file. If the file on the puppet client exists, (even an empty one) everything works fine - if you delete it, this error occures. ensure = present, and

[Puppet Users] Re: centos 7 boxes on vagrant cloud?

2014-10-09 Thread Chris Handy
awesome, thank you! On Wednesday, October 8, 2014 5:15:25 PM UTC-4, Scott Schneider wrote: I was wondering when there will be official centos 7 boxes from puppet labs on https://vagrantcloud.com/puppetlabs? Also it would be nice to have a link on the puppet vagrant cloud homepage to what

Re: [Puppet Users] Automatically remove deactivated host from icinga/nagios config

2014-10-09 Thread Jonathan Gazeley
On 09/10/14 15:11, Kai Timmer wrote: 2014-10-09 15:20 GMT+02:00 Ken Barber k...@puppetlabs.com mailto:k...@puppetlabs.com: No not necessarily, you need to enable resource purging with resources like nagios_host: resources { nagios_host: purge = true, } Oh, I just did

Re: [Puppet Users] Automatically remove deactivated host from icinga/nagios config

2014-10-09 Thread Ken Barber
No not necessarily, you need to enable resource purging with resources like nagios_host: resources { nagios_host: purge = true, } Oh, I just did not now that. My manifest now looks like this: resources { [nagios_host, nagios_service]: purge = true, } #Collect the

Re: [Puppet Users] Automatically remove deactivated host from icinga/nagios config

2014-10-09 Thread Kai Timmer
2014-10-09 17:06 GMT+02:00 Ken Barber k...@puppetlabs.com: So Kai, you can provide fake this with soft-links to the icigna dir from the expected nagios configuration directory. Or soft-link the files themselves, up to you. Thank you both a lot. Now the (fake-)host gets removed but for some

[Puppet Users] Re: puppetboard unable to reach puppetb

2014-10-09 Thread Daniele Sluijters
Hi, This doesn't look like a configuration error with regard to Puppetboard but one with regard to Apache. These lines: configuration error: couldn't perform authentication. AuthType not set!: /static/js/lists.js, referer: http://puppetboard.jokefire.com/ aren't generated by Puppetboard, it

[Puppet Users] Re: puppetboard unable to reach puppetb

2014-10-09 Thread Daniele Sluijters
Hi, I missed the part where this actually still works but then throws the PuppetDB connection issues. * How did you install Puppetboard, with this module: https://forge.puppetlabs.com/nibalizer/puppetboard? * Are Puppetboard and PuppetDB running on the same machine? * Can you show me your

Re: [Puppet Users] Re: puppetboard unable to reach puppetb

2014-10-09 Thread Tim Dunphy
Hi Daniel, Thanks for getting back to me. This doesn't look like a configuration error with regard to Puppetboard but one with regard to Apache. These lines: configuration error: couldn't perform authentication. AuthType not set!: /static/js/lists.js, referer:

[Puppet Users] Re: Need help with simple hiera example

2014-10-09 Thread Tony Thayer
On Wednesday, October 8, 2014 6:44:56 AM UTC-7, Stack Kororā wrote: Greetings, I don't know why, but I am having a rough time trying to get hiera to work. It seems to me that all the examples I see online are either absurdly complex or so stupidly simple that they are absolutely

Re: [Puppet Users] Re: puppetboard unable to reach puppetb

2014-10-09 Thread Daniele Sluijters
Hey, I think I know what's going on here. You've, dutifully, told Puppetboard that it needs to validate the server certificate that PuppetDB is presenting you with (PUPPETDB_SSL_VERIFY) when you setup a connection. However, I'm betting your OS trust-store does not include a copy of the Puppet

[Puppet Users] Puppet development IDE (Geppetto) integrated within Eclipse using puppet hiera - puppet module

2014-10-09 Thread soumen trivedi
I have created a puppet module that will setup an eclipse platform and integrate eclipes features using Eclipes p2 director. I have a working eclipse platform with geppetto, dltk, egit grep console features integrated within my development environment. As eclipse is one of many

[Puppet Users] Re: Puppet development IDE (Geppetto) integrated within Eclipse using puppet hiera - puppet module

2014-10-09 Thread Juan Andres Ramirez
THis module is for Eclipse??, install Eclipse and add this module?. On Thursday, October 9, 2014 3:51:44 PM UTC-3, soumen trivedi wrote: I have created a puppet module that will setup an eclipse platform and integrate eclipes features using Eclipes p2 director. I have a working eclipse

[Puppet Users] Passing Parameters to Powershell

2014-10-09 Thread Paul Ponzeka
I am using Puppet installed with the powershell module. I am struggling with how to pass a puppet variable through to powershell. For instance I have the following in my module *init.pp* file: class windows_dns( $forwarders = '1.1.1.1' ) { anchor { 'windows_dns::begin': } -

Re: [Puppet Users] Re: puppetboard unable to reach puppetb

2014-10-09 Thread Tim Dunphy
Hey Daniele, Thanks for your feedback! And especially your suggestion to forego SSL since I'm running puppetb and puppetboard on the same host. Anyway, here's my jetty.ini file from puppetdb: [root@puppet:/etc/puppetdb/conf.d] #cat jetty.ini | grep -v '#' [jetty] port = 8082 ssl-host =

[Puppet Users] Re: Passing Parameters to Powershell

2014-10-09 Thread Juan Andres Ramirez
if you want execute a powershell file: command = powershell.exe -ExecutionPolicy ByPass -File file.ps1 ${param1} On Thursday, October 9, 2014 4:22:14 PM UTC-3, Paul Ponzeka wrote: I am using Puppet installed with the powershell module. I am struggling with how to pass a puppet variable

Re: [Puppet Users] Re: puppetboard unable to reach puppetb

2014-10-09 Thread Spencer Krum
Are you pushing reports into puppetdb or only into foreman? On Thu, Oct 9, 2014 at 12:29 PM, Tim Dunphy bluethu...@gmail.com wrote: Hey Daniele, Thanks for your feedback! And especially your suggestion to forego SSL since I'm running puppetb and puppetboard on the same host. Anyway,

[Puppet Users] Re: Passing Parameters to Powershell

2014-10-09 Thread Paul Ponzeka
Thanks Juan. Couple of questions on your reply. 1. In my case would it be the following: command = powershell.exe -ExecutionPolicy ByPass -File file.ps1 ${dnsforwarders} # or does this need to be adjusted? 2. How do i do the same with the fact that I am using templates, and

Re: [Puppet Users] Re: puppetboard unable to reach puppetb

2014-10-09 Thread Tim Dunphy
Hey Spencer, Are you pushing reports into puppetdb or only into foreman? Ok so I missed that. Sorry dude. And yeah as you point out I originally had reports only going to foreman. But I changed the puppet.conf to this: [root@puppet:/etc/puppet] #egrep -i reports|storeconfigs puppet.conf

[Puppet Users] Re: Passing Parameters to Powershell

2014-10-09 Thread Juan Andres Ramirez
Example: I have my script on powershell in the next path in Puppet: define some::module() { $script = server1\\shared\\script.ps1 exec { Executing a script: command = powershell.exe -ExecutionPolicy ByPass -File ${script} ${param1}, unless =

Re: [Puppet Users] custom function error undefined local variable

2014-10-09 Thread Mark Rosedale
Puppet 3.5.1 ruby 1.8.7 Output is: Error: Could not retrieve catalog from remote server: Error 400 on SERVER: undefined local variable or method `dns' for #Puppet::Parser::Scope:0x7f5055562988 at /etc/puppet/modules/vivox/manifests/init.pp:69 on node plab5qamaster.vivox.com Warning: Not

Re: [Puppet Users] custom function error undefined local variable

2014-10-09 Thread Mark Rosedale
Puppet 3.5.1 ruby 1.8.7 Output is: Error: Could not retrieve catalog from remote server: Error 400 on SERVER: undefined local variable or method `dns' for #Puppet::Parser::Scope:0x7f5055562988 at /etc/puppet/modules/vivox/manifests/init.pp:69 on node xxx Warning: Not using cache on failed

Re: [Puppet Users] Re: Passing Parameters to Powershell

2014-10-09 Thread Josh Cooper
On Thu, Oct 9, 2014 at 12:59 PM, Juan Andres Ramirez jandresa...@gmail.com wrote: Example: I have my script on powershell in the next path in Puppet: define some::module() { $script = server1\\shared\\script.ps1 exec { Executing a script: command = powershell.exe

Re: [Puppet Users] Re: Passing Parameters to Powershell

2014-10-09 Thread Paul Ponzeka
Thanks josh, so in my template file setdnsforwarders.ps1 is this the correct syntax? $outside = %= scope['dnsforwarders'] % $outside | out-file C:\output.log -append On Thursday, October 9, 2014 4:52:04 PM UTC-4, Josh Cooper wrote: On Thu, Oct 9, 2014 at 12:59 PM, Juan Andres Ramirez

[Puppet Users] Re: Need help with simple hiera example

2014-10-09 Thread Stack Kororā
Wow! Thanks for the responses John! On Thursday, October 9, 2014 8:52:00 AM UTC-5, jcbollinger wrote: If the master had successfully looked up your datum then the result would have been as you expected. The behavior you present is characteristic of (and well documented for) the case where

[Puppet Users] Re: Need help with simple hiera example

2014-10-09 Thread Stack Kororā
On Thursday, October 9, 2014 12:49:40 PM UTC-5, Tony Thayer wrote: Couple of things I noticed: Your testhiera/manifests/init.pp file looks a little odd. I re-wrote it a bit and it ran without a hitch. class testhiera { $test = hiera('testhiera::test') notice(Test is ${test}) file {

[Puppet Users] puppet-jobs list?

2014-10-09 Thread sorthum
Howdy. A cursory google search hasn't turned up much on this topic. Is there a puppet-jobs list for jobs oriented around Puppet (not to be confused with Work at Puppet Labs! style stuff? Other projects seem to have similar lists, but I can't find one for Puppet; I suspect it'd be

Re: [Puppet Users] Re: puppetboard unable to reach puppetb

2014-10-09 Thread Ken Barber
Are you pushing reports into puppetdb or only into foreman? Ok so I missed that. Sorry dude. And yeah as you point out I originally had reports only going to foreman. But I changed the puppet.conf to this: [root@puppet:/etc/puppet] #egrep -i reports|storeconfigs puppet.conf reports

Re: [Puppet Users] puppet-jobs list?

2014-10-09 Thread Ken Barber
A cursory google search hasn't turned up much on this topic. Is there a puppet-jobs list for jobs oriented around Puppet (not to be confused with Work at Puppet Labs! style stuff? Other projects seem to have similar lists, but I can't find one for Puppet; I suspect it'd be constructive to

Re: [Puppet Users] puppet-jobs list?

2014-10-09 Thread sorthum
Thanks, Ken. Will post something shortly; I appreciate the response! On Thursday, October 9, 2014 4:02:26 PM UTC-7, Ken Barber wrote: A cursory google search hasn't turned up much on this topic. Is there a puppet-jobs list for jobs oriented around Puppet (not to be confused with Work

Re: [Puppet Users] Re: Passing Parameters to Powershell

2014-10-09 Thread Paul Ponzeka
I tried that and it just came up blank. Am I suppose to pass it as a powershell parameter? On Thursday, October 9, 2014 5:18:05 PM UTC-4, Paul Ponzeka wrote: Thanks josh, so in my template file setdnsforwarders.ps1 is this the correct syntax? $outside = %= scope['dnsforwarders'] %

[Puppet Users] augeas, sshd and multiple onlyif requirements

2014-10-09 Thread Chris
Hi all, I'm trying to insert a ClientAliveInterval setting into sshd_config with augeas. Some servers have a Match User line (so the new setting needs to come before the Match User line), and some don't. Some already have a ClientAliveInterval setting, and some don't. My first attempt was

Re: [Puppet Users] Re: puppetboard unable to reach puppetb

2014-10-09 Thread Tim Dunphy
Hi Ken, Its a comma, if you are unclear. Yep! I was able to get that by trying it out. But thanks for the feedback! Always extremely welcomed! [root@puppet:~] #cd /etc/puppet [root@puppet:/etc/puppet] #grep reports puppet.conf reports= foreman, puppetdb Try it again and restart

[Puppet Users] Identifying file content change in subsequent client run

2014-10-09 Thread ganesh634
How can i identify if the file content is changed in subsequent client run. Need this information for new resource implementation, which will take action only if file contents are modified. The file will be created on client using template resource. Is there a way to cache information of

Re: [Puppet Users] augeas, sshd and multiple onlyif requirements

2014-10-09 Thread John Warburton
On 10 October 2014 13:34, Chris dmag...@gmail.com wrote: Any help, suggestions, alternatives would be greatly appreciated. Stop using Augeas and start using templates https://docs.puppetlabs.com/guides/templating.html Here's an extreme example from the the most popular SSH module

Re: [Puppet Users] Identifying file content change in subsequent client run

2014-10-09 Thread Ashish Jaiswal
Hi, You can check for the mtime in file resource. On Friday 10 October 2014 10:50 AM, ganesh634 wrote: How can i identify if the file content is changed in subsequent client run. Need this information for new resource implementation, which will take action only if file contents are