Re: [Puppet Users] Styling parameter and variable types

2014-12-11 Thread Henrik Lindberg
On 2014-11-12 24:33, Martin Alfke wrote: Hi Daniele, many thanks for bringing up the Type style question. On 10 Dec 2014, at 14:23, Daniele Sluijters wrote: With the future parser we can now add type annotations to a whole bunch of things. Usually it's pretty easy, just chuck the type in fr

Re: [Puppet Users] Querying PuppetDB for nodes that match certain facts

2014-12-11 Thread Wyatt Alt
Abhi, Try this: curl -X GET http://localhost:8080/v4/facts/ipaddress --data-urlencode 'query=["in","certname",["extract","certname",["select-nodes",["=",["fact","kernel"],"Linux" Wyatt On 12/11/14 12:14 PM, a...@littlewiki.in wrote: Hello. I want to get the ip-addresses of all Linux mac

Re: [Puppet Users] Client self-deregistration from PuppetDB

2014-12-11 Thread Wyatt Alt
To follow up on what others have said, the method described in the command example https://docs.puppetlabs.com/puppetdb/2.2/api/commands.html#examples-using-curl will deactivate your node, which is different than what we call "purging", whether or not you intended. Deactivating a node will n

[Puppet Users] multiple if statement in facter

2014-12-11 Thread Spriya
Hi, I am trying search multiple facts in the txt file in puppet facts. How can i use multiple if statements in puppet facts *Facter.add("isjavaversion#{a}") do* *setcode do* *if Facter.value('java_foundversion2_path2').strip.include?(val.strip)* * if Facter.value('java_foundversion1

[Puppet Users] Querying PuppetDB for nodes that match certain facts

2014-12-11 Thread abhi
Hello. I want to get the ip-addresses of all Linux machines. Here's my query using curl query=["=", "name", "ipaddress"],["in", "certname",["extract", "certname", ["select-nodes",["and",["=", "name", "kernel"],["=", "value", "Linux"] This returns me the ipaddresses of all the machines. If

Re: [Puppet Users] Case Statement for setting IP addresses

2014-12-11 Thread Peter Bukowinski
> On Dec 11, 2014, at 2:23 PM, James Taylor wrote: > > default:{ > > notice { "Vendor item in hostname is out of scope."}, > err { "Vendor item in hostname is out of scope."}, Using parentheses for the notice and err functions instead of braces should get yo

[Puppet Users] Case Statement for setting IP addresses

2014-12-11 Thread James Taylor
Hello all, I am working with an issue that has me tied up in knots. I have a group of machines that will have structured names (i.e. prj-sfo-ibm-102.foo.com). I want to use the host name to assign IP addresses to the machine, since each host name has a locator (sfo), vendor (ibm), and node numb

[Puppet Users] Re: Installing puppet on OSX

2014-12-11 Thread Tony Thayer
I have had no problem with the .dmg file. That answer is two years old now and some things may have changed with the install process (just a guess). On Sunday, December 7, 2014 6:51:08 PM UTC-8, Mauricio Tavares wrote: > > Do you use the .dmg from puppetlabs or, as suggested in > https://ask.pup

[Puppet Users] Puppet management with ldap authentication

2014-12-11 Thread pjotamail
Do you recommend using ldap authentication for users or groups puppet management ? Could provide feedback. Best regards, P.J. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, s

Re: [Puppet Users] Re: Module/Class ordering with contain()

2014-12-11 Thread jcbollinger
On Wednesday, December 10, 2014 9:29:22 AM UTC-6, Felix.Frank wrote: > > On 12/10/2014 04:17 PM, Mark Rosedale wrote: > > class foo { > > Class['first']->Class['two'] > > class {'first': } > > class {'two': } > > } > > Well, this should generally be avoided. It deprives you of the ab

Re: [Puppet Users] puppet parser order random

2014-12-11 Thread Martin Alfke
On 11 Dec 2014, at 14:56, jcbollinger wrote: > > > On Thursday, December 11, 2014 2:24:11 AM UTC-6, Martin Alfke wrote: > You need to set an dependency for ntp::params and ntp::install to be > processed in strict order. > e.g. > Class[‘::ntp::params’] -> Class[‘::ntp::install’] > > > >

[Puppet Users] Re: puppet parser order random

2014-12-11 Thread jcbollinger
On Wednesday, December 10, 2014 9:24:44 PM UTC-6, 巨海录 wrote: > > # ntp/manifests/init.pp > class ntp ( > $var_01 = '/etc/ntp.conf', > $var_02 = 'ntp/ntp.conf.erb', > ) { > include ::ntp::params > include ::ntp:install > } > > Is "::ntp:install" just a typo? It looks like it should be "

Re: [Puppet Users] puppet parser order random

2014-12-11 Thread Felix Frank
On 12/11/2014 04:24 AM, 巨海录 wrote: > > because sometime i can't get the correct value of var_03 and var_04. > and they would all be nil. Weird. Should not typically happen, but on the other hand, relying on that is bound to give you head aches. You should include ntp::params in any scope that

Re: [Puppet Users] puppet parser order random

2014-12-11 Thread jcbollinger
On Thursday, December 11, 2014 2:24:11 AM UTC-6, Martin Alfke wrote: > > You need to set an dependency for ntp::params and ntp::install to be > processed in strict order. > e.g. > Class[‘::ntp::params’] -> Class[‘::ntp::install’] > > NO. This is an unfortunately common and persistent miscon

Re: [Puppet Users] Client self-deregistration from PuppetDB

2014-12-11 Thread Martin Alfke
Hi Matt, On 09 Dec 2014, at 19:58, Matt Wise wrote: > We boot up/shut-down 50-100 hosts a day on average... we're exploring > PuppetDB, but I'm concerned about the model of just 'waiting' for hosts to be > purged based on some checkin time. Is there any way to have our hosts send a > signal th

Re: [Puppet Users] Styling parameter and variable types

2014-12-11 Thread Martin Alfke
Hi Daniele, many thanks for bringing up the Type style question. On 10 Dec 2014, at 14:23, Daniele Sluijters wrote: > With the future parser we can now add type annotations to a whole bunch of > things. Usually it's pretty easy, just chuck the type in front of the > variable and you're done.

Re: [Puppet Users] Notification for new Certificate request

2014-12-11 Thread Martin Alfke
On 10 Dec 2014, at 17:34, David Hollinger wrote: > Is there a way to setup email notifications for Certificate Requests and only > certificate requests? > > I'm sure tagmail would work to some extent, but I don't want notifications > for everything, just for Certificate/Node Requests At one

Re: [Puppet Users] puppet parser order random

2014-12-11 Thread Martin Alfke
You need to set an dependency for ntp::params and ntp::install to be processed in strict order. e.g. Class[‘::ntp::params’] -> Class[‘::ntp::install’] hth, Martin On 11 Dec 2014, at 04:24, 巨海录 wrote: > # ntp/manifests/init.pp > class ntp ( > $var_01 = '/etc/ntp.conf', > $var_02 = 'ntp/ntp