[Puppet Users] Problem with custom facts and hiera

2014-03-11 Thread Dirk Heinrichs
Hi, I'm trying to categorize our Puppet agent nodes via custom facts. To do this, I've placed a simple text file custom_facts.txt into C:\ProgramData\PuppetLabs\facter\facts.d with content [facts] role = PuppetDev When I call facter on the agent node, I can see the new fact. On the server,

Re: [Puppet Users] Problem with custom facts and hiera

2014-03-11 Thread Craig Dunn
Drop the :: from your hiera.yaml, it's being taken literally as '::role' rather than defining scope. Regards Craig On Tue, Mar 11, 2014 at 9:17 AM, Dirk Heinrichs d...@recommind.com wrote: Hi, I'm trying to categorize our Puppet agent nodes via custom facts. To do this, I've placed a

Re: [Puppet Users] when a puppet exec resource contains several single commands, puppet exec only fails if the last exec command fails

2014-03-11 Thread Nikola Petrov
Actually you can emulate what you want if you join the commands with . Something like the following: $command = /bin/ls /doesnotexit; /bin/echo hello exec { 'cool': command = join(split($command, '; '), ), } Note1: you will need https://github.com/puppetlabs/puppetlabs-stdlib for this.

Re: [Puppet Users] when a puppet exec resource contains several single commands, puppet exec only fails if the last exec command fails

2014-03-11 Thread Felix Frank
On 03/11/2014 01:23 AM, David Arroyo wrote: If it's really a problem for you, I you can always write a 'paranoid' provider for exec resources. +1 ...or add a parameter to exec that allows you to change the behavior of the shell provider. Changing the behavior of the shell to help people who

Re: [Puppet Users] when a puppet exec resource contains several single commands, puppet exec only fails if the last exec command fails

2014-03-11 Thread José Luis Ledesma
El 11/03/2014 11:01, Felix Frank felix.fr...@alumni.tu-berlin.de escribió: On 03/11/2014 01:23 AM, David Arroyo wrote: If it's really a problem for you, I you can always write a 'paranoid' provider for exec resources. +1 ...or add a parameter to exec that allows you to change the

Re: [Puppet Users] Problem with custom facts and hiera

2014-03-11 Thread Dirk Heinrichs
Am 11.03.2014 10:31, schrieb Craig Dunn: Drop the :: from your hiera.yaml, it's being taken literally as '::role' rather than defining scope. That doesn't help, unfortunately. OTOH, using a predefined fact works fine. For example, I also have a line - node/%{::fqdn} in hiera.yaml and I can

Re: [Puppet Users] Problem with custom facts and hiera (solved)

2014-03-11 Thread Dirk Heinrichs
Am 11.03.2014 10:17, schrieb Dirk Heinrichs: To do this, I've placed a simple text file custom_facts.txt into C:\ProgramData\PuppetLabs\facter\facts.d with content [facts] role = PuppetDev Got it to work by removing the blanks: role=PuppetDev Bye... Dirk -- *Dirk Heinrichs*, Senior

[Puppet Users] Re: scheduling defined resources

2014-03-11 Thread Mark deJong
On Monday, March 10, 2014 9:47:22 AM UTC-4, jcbollinger wrote: On Friday, March 7, 2014 8:57:58 AM UTC-6, Mark deJong wrote: Hello, We're currently using version 3.4.3, and the documentation on metaparameters states any defined metaparameter can be used with any instance in your

Re: [Puppet Users] Re: How to check if a service Or a Package exists

2014-03-11 Thread kaustubh chaudhari
Hi John, I totally agree with you and i am trying to do the same cleaning previous crap! Thanks a ton for your advice. I created a custom fact and did simple if .. else which did the job! Have a great day ahead! With Warm Regards Kaustubh.A.Chaudhari (M)-09373102619 On Wed, Mar 5, 2014 at

Re: [Puppet Users] Have to run puppet agent twice to install LDAP and ssh keys.

2014-03-11 Thread jcbollinger
On Monday, March 10, 2014 4:59:38 PM UTC-5, Christopher Wood wrote: [...] I think you've found something interesting, namely that puppet/ruby itself appears to be not using your new ldap configuration inside of a single agent run process. It does work to break out ldap configuration and

[Puppet Users] Package requiring a class

2014-03-11 Thread kai
I have the following two resources defined in a class: class openvz::install { $openvz_repo_key = hiera('openvz_repo_key') $openvz_repo = hiera('openvz_repo') $openvz_kernel_image = hiera('openvz_kernel_image') $openvz_kernel_headers = hiera('openvz_kernel_headers') apt::source { openvz:

[Puppet Users] Re: Recursive file delete fails with empty files

2014-03-11 Thread jcbollinger
On Monday, March 10, 2014 4:13:37 PM UTC-5, Sam Tresler wrote: So, is this a known bug, by design, or something that I should figure out how to file a bug report for? I don't find a bug report matching this in a quick search of the Puppet ticket DB. I recommend you file one. (Start

Re: [Puppet Users] what the mx mean in case

2014-03-11 Thread jcbollinger
On Monday, March 10, 2014 12:09:22 PM UTC-5, Joachim Schrod wrote: On 03/10/14 15:37, Matt Zagrabelny wrote: On Sun, Mar 9, 2014 at 5:58 PM, Teoh khah swee ks.t...@gmail.comjavascript: wrote: HI all, I just come across an case statement for puppet. I would like to know what

Re: [Puppet Users] Package requiring a class

2014-03-11 Thread Craig Dunn
Just to clarify, apt::source is a defined resource type, not a class. Defined resource types can be required like any other resource, for example package { [ 'libvirt-bin', 'vzctl' ]: ensure = present, require = Apt::Source['openvz'], } On Tue, Mar 11, 2014 at 1:13 PM, kai

[Puppet Users] Re: Export variables from a manifest calling another module

2014-03-11 Thread jcbollinger
On Monday, March 10, 2014 9:27:31 AM UTC-5, Brendon Standing wrote: Hi I am busy writing puppet modules for logstash, and want to export tokens I get from the hiera application or %{calling_module} role. There is no need for exporting variables *per se*, since all Puppet variables

Re: [Puppet Users] Package requiring a class

2014-03-11 Thread kai
Nice, thanks! On Tuesday, March 11, 2014 8:39:39 AM UTC-5, Craig Dunn wrote: Just to clarify, apt::source is a defined resource type, not a class. Defined resource types can be required like any other resource, for example package { [ 'libvirt-bin', 'vzctl' ]: ensure = present,

Re: [Puppet Users] when a puppet exec resource contains several single commands, puppet exec only fails if the last exec command fails

2014-03-11 Thread jcbollinger
On Tuesday, March 11, 2014 5:01:21 AM UTC-5, Felix.Frank wrote: Changing the behavior of the shell to help people who write faulty shell one-liners seems like a Bad Idea to me. Tools shouldn't enable and encourage bad practices. +1 Furthermore, it would be quite surprising and

[Puppet Users] PuppetConf talk proposals due in 1 week + new Puppet Camps accepting proposals

2014-03-11 Thread Dawn Foster
I wanted to remind everyone that we will only be accepting proposals for PuppetConf 2014 until March 18th at midnight Pacific time, so you have one week to get your talk idea submitted! We also have several new Puppet Camps that were recently scheduled, so we are accepting talk proposals for

[Puppet Users] Re: how do I check to see whether a hash value is defined if a parent of the hash value might not even exist?

2014-03-11 Thread Steve Neuharth
this works: # set up our servername if $web_conf[$::client] { if $web_conf[$::client][$::env] { if $web_conf[$::client][$::env][$name] { if $web_conf[$::client][$::env][$name]['server_name'] { $server_name = $web_conf[$::client][$::env][$name]['server_name']

Re: [Puppet Users] Re: how do I check to see whether a hash value is defined if a parent of the hash value might not even exist?

2014-03-11 Thread David Schmitt
What about using hiera: data.yaml: --- client::dev::sw::server_name: ws.foo.bar pp: $server_name = hiera(client::${::client}::${::env}::${name}::server_name, default value) Regards, David On 2014-03-11 16:34, Steve Neuharth wrote: this works: # set up our servername if

Re: [Puppet Users] Re: Remove certificate requests

2014-03-11 Thread robert . buchholz
On Friday, December 21, 2012 9:59:49 PM UTC+1, Calvin Walton wrote: On Fri, 2012-12-14 at 21:14 +, Tim Bishop wrote: Nope: puppetmaster# puppet cert list fb311ff01c6f0130b650005056bc6664 (SHA256)

[Puppet Users] stdlib: result from join_keys_to_values() is unstable

2014-03-11 Thread Gabriel Filion
Hi there, Say I have a hash like {a='1',b='2'} and I'd like to get a string that looks like a=1,b=2. I tried using a combination of join_keys_to_values() and join() and the result looked correct, but was unstable. That unstability is because hashes are not always sorted the same way. An unstable

[Puppet Users] Meeting Puppet contractors

2014-03-11 Thread Brandon Clark
I'm not clear on what the etiquette is here but I was hoping to reach out to the puppet community to see if there are any sysops people here who are looking for work. My current admin recently got a new job and moved on so I have need of a replacement person with puppet experience. If these

[Puppet Users] my puppets clients are unreachable

2014-03-11 Thread puppetstan
Hello After to change a network device beetween my puppetmaster and my puppets clients my puppetmaster, my puppets clients are unreachable. I changed a network device in front of a zone server. I need to edit the file / etc / resolv.conf for all servers behind this network with my

Re: [Puppet Users] puppetdb question !!!

2014-03-11 Thread Ken Barber
Just a suggestion .. it will really good if you can add field date added to the certname table just reporting purposes. Feel free to raise that as a feature request here Rakesh: https://tickets.puppetlabs.com/browse/PDB ken. -- You received this message because you are subscribed to the

Re: [Puppet Users] stdlib: result from join_keys_to_values() is unstable

2014-03-11 Thread Matthaus Owens
Gabriel, I don't know about the specific implementation of join_keys_to_values, but ruby's hash behavior changed between the 1.8 series and 1.9 and later[1]. In ruby 1.8 hashes are enumerated in a seemingly unsorted manner, while in ruby 1.9 and later hashes are enumerated in insertion order. If

[Puppet Users] Re: Problems in Ch. 4 of Pro Puppet 2nd Edition

2014-03-11 Thread Spencer Krum
Hi Jon, I'll ask my editor to link the errata from the github repository to the eratta page on the Apress website. I want to assure you we went through several rounds of editing, but errors are always going to fall through. Thanks so much for reading attentively and posting your feedback.

Re: [Puppet Users] Re: Problems in Ch. 4 of Pro Puppet 2nd Edition

2014-03-11 Thread Jon Forrest
On 3/11/2014 10:32 AM, Spencer Krum wrote: Thanks so much for reading attentively and posting your feedback. I'm sorry you don't want to help us more formally. I want to make it clear that the reason for this is because since this is a closed-source book, I'd need some form of payment for a

Re: [Puppet Users] stdlib: result from join_keys_to_values() is unstable

2014-03-11 Thread Gabriel Filion
On 11/03/14 12:58 PM, Matthaus Owens wrote: I don't know about the specific implementation of join_keys_to_values, but ruby's hash behavior changed between the 1.8 series and 1.9 and later[1]. In ruby 1.8 hashes are enumerated in a seemingly unsorted manner, while in ruby 1.9 and later hashes

Re: [Puppet Users] my puppets clients are unreachable

2014-03-11 Thread David Schmitt
On 2014-03-11 17:35, puppetstan wrote: Hello After to change a network device beetween my puppetmaster and my puppets clients my puppetmaster, my puppets clients are unreachable. I changed a network device in front of a zone server. I need to edit the file / etc / resolv.conf for all servers

Re: [Puppet Users] Re: how do I check to see whether a hash value is defined if a parent of the hash value might not even exist?

2014-03-11 Thread Steve Neuharth
very interesting. Maybe I need to just bite the bullet and use hiera. On Tuesday, March 11, 2014 11:00:46 AM UTC-5, David Schmitt wrote: What about using hiera: data.yaml: --- client::dev::sw::server_name: ws.foo.bar pp: $server_name =

Re: [Puppet Users] Problem with custom facts and hiera

2014-03-11 Thread Matthew Burgess
On 11 Mar 2014 10:21, Dirk Heinrichs d...@recommind.com wrote: To me it looks like facter is reading the file containing the custom fact, while the agent does not. Puppet uses /etc/puppet/hiera.yaml (or /etc/puppetlabs/puppet/hiera.yaml for PE) not /etc/hiera.yaml. You could symlink them so

[Puppet Users] ENC broken in the strangest way.

2014-03-11 Thread Steve Neuharth
I have an ENC that's set up like this: [master] masterport = 8140 bindaddress = 0.0.0.0 ssl_client_header = SSL_CLIENT_S_DN ssl_client_verify_header = SSL_CLIENT_VERIFY autosign = true storeconfigs = true * environment = production manifest=

Re: [Puppet Users] ENC broken in the strangest way.

2014-03-11 Thread José Luis Ledesma
El 11/03/2014 20:47, Steve Neuharth steve.neuha...@gmail.com escribió: I have an ENC that's set up like this: [master] masterport = 8140 bindaddress = 0.0.0.0 ssl_client_header = SSL_CLIENT_S_DN ssl_client_verify_header = SSL_CLIENT_VERIFY autosign = true storeconfigs = true

[Puppet Users] Re: Pushing git repo to Windows agent

2014-03-11 Thread Nick Miller
Steps to reproduce: 1) Create a new git repository (I'm using Bitbucket) 2) Create a file called 'test1.txt', and push it to the repo. 3) Create a class to pull the repo. I'm using ssh cert authentication, but I'm not sure that matters class gitrepo { vcsrepo {

[Puppet Users] Re: Dashboard not working (406 Not Acceptable)

2014-03-11 Thread Chad Matsalla
I have this directory and it's writable. I'm still getting a 406. Was there anything else I could try? I'm not even sure the relevant parts of configuration to show. Let's see: - I got the same error whether I was using the rails built-in server and now when I'm using apache/passenger - reports

[Puppet Users] Cleaning up temp files with puppet

2014-03-11 Thread nfwlpw
So I have a puppet module, that gets a script from files/, runs that script, and after it's done, I'd like to remove it. Unfortunately puppet doesn't seem to like to have 2 different File resource aliased to the same, so I can't do file { myfile: ensure = present, source =

Re: [Puppet Users] Cleaning up temp files with puppet

2014-03-11 Thread Johan De Wit
On 11/03/14 23:09, nfwlpw wrote: So I have a puppet module, that gets a script from files/, runs that script, and after it's done, I'd like to remove it. Unfortunately puppet doesn't seem to like to have 2 different File resource aliased to the same, so I can't do file { myfile: ensure

[Puppet Users] Problems in Ch. 7 of Pro Puppet 2nd Edition

2014-03-11 Thread Jon Forrest
Here are the issues I found in Chapter 7. Short chapter - many typos. Only 5 more chapters to go. Jon Forrest M = mistake U = unclear T = typo E = text change C = comment (M) Pg. 169 an external node carrier (ENC) - an external node classifier (ENC) (C) Pg. 169 integrated data center

Re: [Puppet Users] Meeting Puppet contractors

2014-03-11 Thread Jon Forrest
On 3/11/2014 9:24 AM, Brandon Clark wrote: I'm not clear on what the etiquette is here but I was hoping to reach out to the puppet community to see if there are any sysops people here who are looking for work. My current admin recently got a new job and moved on so I have need of a replacement