Re: [Puppet Users] Hiera lookups in templates

2013-05-10 Thread Dan White
http://docs.puppetlabs.com/guides/templating.html#using-functions-within-templates The arguments of the function must be provided as an array, even if there is only one argument. However, (and I am just discovering this myself), http://docs.puppetlabs.com/hiera/1/puppet.html#using-the-lookup-

Re: [Puppet Users] Hiera lookups in templates

2013-05-10 Thread Brian Lalor
On May 10, 2013, at 7:18 AM, Jonathan Gazeley wrote: > ipaddr = <%= scope.function_hiera(["jrs_config_server1"]) %> You're passing in an array; is that intentional? -- Brian Lalor bla...@bravo5.org -- You received this message because you are subscribed to the Google Groups "Puppet Users"

[Puppet Users] Re: RHEL patches broke my puppetd

2013-05-10 Thread joe
You should upgrade from 0.25.5. It is quite old and no longer supported. On Friday, May 10, 2013 2:17:00 PM UTC-6, dsdtas wrote: > > Earlier this week, I applied RHEL patches to a couple of dev server with > puppet 0.25.5 and now I can no longer run puppetd commands without > constantly getting

Re: [Puppet Users] Weird puppet error

2013-05-10 Thread David Schmitt
On 10.05.2013 22:17, pup_userz0 wrote: [root@puptmaster:~/manifests]# [root@puptmaster:~/manifests]#cat 1.file.pp file {'testfile': path => '/tmp/testfile', ensure => present, mode => 0640, content => "I'm a test file.", } [root@puptmaster:~/manifests]# [root@n

Re: [Puppet Users] Running all apt source and update operations first, best practice.

2013-05-10 Thread David Schmitt
On 10.05.2013 18:13, James Kyle wrote: I'm sure this has to do with getting updates to run after adding sources because if I hop on the host and do this: /usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install libvirt-bin It reproduces the error. But if I then run 'apt-get update' and

Re: [Puppet Users] What do YOU do to catch undefined variables

2013-05-10 Thread David Schmitt
On 10.05.2013 17:08, Nikola Petrov wrote: +1 The vim plugin is the best you can find if you are already proficient in vim somewhat. I use it in conjuction with https://github.com/SirVer/ultisnips and it can't be better. I found the eclipse too heavy for my needs(although I use it for java develo

[Puppet Users] Weird puppet error

2013-05-10 Thread pup_userz0
[root@puptmaster:~/manifests]# [root@puptmaster:~/manifests]#cat 1.file.pp file {'testfile': path => '/tmp/testfile', ensure => present, mode => 0640, content => "I'm a test file.", } [root@puptmaster:~/manifests]# [root@npuptmaster:~/manifests]#rm -f /tmp/testfile [

[Puppet Users] RHEL patches broke my puppetd

2013-05-10 Thread dsdtas
Earlier this week, I applied RHEL patches to a couple of dev server with puppet 0.25.5 and now I can no longer run puppetd commands without constantly getting the message: [root@dev2 ~]# puppetd --test --verbose --noop notice: Run of Puppet configuration client already in progress; skipping Ki

Re: [Puppet Users] puppet node clean using SQLite instead of PuppetDB

2013-05-10 Thread Ti Leggett
Hopped on IRC and got it sorted out. Deepak, you were right in removing the export, but you can't run the agent in --noop to update the catalog. You have to actually run it. Then re-add the export and re-run again (again, not in --noop) and things are happy. Thanks Deepak for the guidance. On

Re: [Puppet Users] Re: High Availability of Puppet server for separate geographical location

2013-05-10 Thread Martin Langhoff
On Fri, May 10, 2013 at 1:52 PM, Ramin K wrote: > reasonably resilient or at least able to localize failure. Certainly some > designs and technology are better than others, but implementation always > matters. Of course. I think we're saying the same thing, at the end of the day. > Mast

Re: [Puppet Users] Running all apt source and update operations first, best practice.

2013-05-10 Thread James Kyle
That's what I'm seeing as well, but no idea where it's coming from (tips on how to run something like that down welcome). I only have a very few modules I've written myself and like 3 nodes. I've removed all dependencies declared there except the one above. And I've grepped the modules directory f

Re: [Puppet Users] Re: High Availability of Puppet server for separate geographical location

2013-05-10 Thread Felipe Salum
I'm trying to make a manifest to auto setup Puppet High Availability, but it is the chicken-egg issue here. As for your secondary/tertiary/etc puppetmasters, you need to copy the private key and certificate used by your puppet1 server in order for it to accept the requests coming from puppet.yourco

[Puppet Users] Re: Variable re-use, override, inherit and include

2013-05-10 Thread jcbollinger
On Friday, May 10, 2013 12:57:40 PM UTC-5, jcbollinger wrote: > > Classes other than module_x::child and any others that inherit from it see > no difference between the two cases. > > Sorry, that's too broad. Other classes don't see any effect on the meaning of $var or of $module_x::common::va

[Puppet Users] Re: Variable re-use, override, inherit and include

2013-05-10 Thread jcbollinger
On Friday, May 10, 2013 9:53:39 AM UTC-5, christian...@gmail.com wrote: > > Thx, maybe this was a little too straight from the hip... BTW: I've tried > it - it even worked... but I see that's probably caused by a lot of strange > luck... > > >> Subclasses can never 'override' ancestor class v

Re: [Puppet Users] Re: High Availability of Puppet server for separate geographical location

2013-05-10 Thread Ramin K
On 5/9/2013 1:51 PM, Martin Langhoff wrote: On Thu, May 9, 2013 at 2:31 PM, Ramin K wrote: Hubris, today thy name is Martin. :-) Fair enough. I am happy about the tool I am writing (almost finished!) but, as the followup post makes clear, it isn't about the designe of ppg. It is about the des

[Puppet Users] Re: hiera-gpg causing big increase in catalog compile time

2013-05-10 Thread jcbollinger
On Thursday, May 9, 2013 10:18:21 AM UTC-5, Aaron Mills wrote: > > Hmm..it seems like a pretty basic use case is an accompanying gpg file for > each level of a hierarchy, just to store things like passwords, or > sensitive data. Minimizing the use of things like hiera's 3.x data bindings > to

Re: [Puppet Users] Running all apt source and update operations first, best practice.

2013-05-10 Thread jcbollinger
On Friday, May 10, 2013 11:13:03 AM UTC-5, James Kyle wrote: > > This is what I get with the above, slightly adapted to take care of an > edge case: > > Apt::Source<| |> -> Exec['apt_update'] -> Package<| title != > 'ubuntu-cloud-keyring' |> > > The ubuntu-cloud-keyring is a prerequisite for ad

[Puppet Users] Re: POssible incompatibility between puppet agent 3.0.1 and puppet master 3.0.2

2013-05-10 Thread Alan Hodgkinson
SOLVED: The problem was caused by small MTU size on the puppet master's ethernet port. The solution was to reduce the MTU size to 1400, with the command: ip link set eth0 mtu 1400. The server was behind a firewall and communicated with outside world through a Cisco ADSL Router, which had an MTU

Re: [Puppet Users] Technical Reviewers Needed

2013-05-10 Thread Jo Rhett
If any of you are interested, you can submit to receive a free copy of the (published) book in exchange for posting a review. Details are available at http://www.netconsonance.com/2013/05/another-chance-for-people-who-could-not-win-the-free-e-copies/ On Nov 26, 2012, at 6:32 AM, joan...@

Re: [Puppet Users] puppet node clean using SQLite instead of PuppetDB

2013-05-10 Thread Ti Leggett
I'm at a loss. I can't figure out how to get these wrong SSH keys out of PuppetDB. I might be able to replace the node's catalog using the PuppetDB Query API, but the syntax on how to create the command object to pass I can't figure out. I tried to connect directly to the HSQL DB, but I don't se

Re: [Puppet Users] Running all apt source and update operations first, best practice.

2013-05-10 Thread James Kyle
This is what I get with the above, slightly adapted to take care of an edge case: Apt::Source<| |> -> Exec['apt_update'] -> Package<| title != 'ubuntu-cloud-keyring' |> The ubuntu-cloud-keyring is a prerequisite for adding the ubuntu cloud archive (for openstack debs). Without this exception, it

Re: [Puppet Users] Running all apt source and update operations first, best practice.

2013-05-10 Thread joe
This can be achieved without stages if you put the relationship inside site.pp outside any class scope. On Friday, May 10, 2013 8:25:58 AM UTC-6, jcbollinger wrote: > > > > On Thursday, May 9, 2013 10:23:25 PM UTC-5, Nan Liu wrote: >> >> On Thu, May 9, 2013 at 11:52 AM, James Kyle wrote: >> >>>

Re: [Puppet Users] Re: Hiera lookups in templates

2013-05-10 Thread Jon Ward
Try putting the variable in common.yaml at the bottom of the hierarchy and see if it gets picked up. If it does then perhaps the value of the fqdn fact isn't what you think it is. You can also try running puppetmaster in the foreground in debug mode: $ puppet master —no-daemonize —debug Now w

[Puppet Users] Re: hiera-gpg causing big increase in catalog compile time

2013-05-10 Thread Jon Ward
> > If you use many parameterized classes, then Puppet 3's automatic class > parameter binding will tend to aggravate that problem, especially if you > typically allow class parameters to take default values or DSL-specified > values (so that hiera has lots of complete misses on the parameter n

Re: [Puppet Users] What do YOU do to catch undefined variables

2013-05-10 Thread Nikola Petrov
+1 The vim plugin is the best you can find if you are already proficient in vim somewhat. I use it in conjuction with https://github.com/SirVer/ultisnips and it can't be better. I found the eclipse too heavy for my needs(although I use it for java development where it shines) -- Nikola On Tue,

Re: [Puppet Users] Using Puppet to trigger a script when error occurs on log file

2013-05-10 Thread Nikola Petrov
You shouldn't search support for this in puppet but in something like monit, upstart or nagios handlers. Puppet isn't suitable for this task although it might be possible it will be hacky. -- Nikola On Tue, May 07, 2013 at 08:19:04AM -0700, Nicola Zanetti wrote: > Hello everyone, > I'm using Pu

[Puppet Users] Re: equivalent way to iterate through a hash

2013-05-10 Thread jcbollinger
On Thursday, May 9, 2013 6:00:11 PM UTC-5, Kevin G. wrote: > > If I have something like this in my node file: > > daemontools_service::setup { > 'carbon-cache': > service_name => 'carbon-cache', > > extra_envs => { > "GRAPHITE_STO

[Puppet Users] Re: Variable re-use, override, inherit and include

2013-05-10 Thread christian . le . flamm
Sorry, wasn't able to format it properly... formatting it had no effect. -- 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, send an email to puppet-users+unsubscr...@googlegroups.co

[Puppet Users] Re: Variable re-use, override, inherit and include

2013-05-10 Thread christian . le . flamm
Thx, maybe this was a little too straight from the hip... BTW: I've tried it - it even worked... but I see that's probably caused by a lot of strange luck... > Subclasses can never 'override' ancestor class variables. They can > partially *hide* them within their own scope by declaring a sam

Re: [Puppet Users] Re: Hiera lookups in templates

2013-05-10 Thread Jonathan Gazeley
Hi Jon, Thanks for your tip. I had made a typo in my yaml which debug mode picked up. I fixed it, and now your command works when run on the puppetmaster but the same error persists when the variable is accessed either from a manifest or from a template during a puppet agent run. I'm wonderi

Re: [Puppet Users] Running all apt source and update operations first, best practice.

2013-05-10 Thread jcbollinger
On Thursday, May 9, 2013 10:23:25 PM UTC-5, Nan Liu wrote: > > On Thu, May 9, 2013 at 11:52 AM, James Kyle > > wrote: > >> I've run into several incidences where a module attempts to install a >> package before the apt::source is added or an update is run. Result is a >> bunch apt errors and e

[Puppet Users] Re: proxy required

2013-05-10 Thread jcbollinger
On Friday, May 10, 2013 7:35:48 AM UTC-5, Fco CM wrote: > > Hi, > > did you try: > > node default { > > include epel > > } > > That is not the issue. The error message he reported shows that his class is assigned to the target node, for the error occurs when the Package resource declared in i

Re: [Puppet Users] Hiera lookups in templates

2013-05-10 Thread Ti Leggett
Use scope.lookupvar on the variable from the manifest: ## Manifest class foo ( $ip = hiera(''jrs_config_server1', ''), ) { } ## Template <% ip = scope.lookupvar('foo::ip') -%> ... On May 10, 2013, at 6:18 AM, Jonathan Gazeley wrote: > Hi, > > I'm having a problem accessing Hiera data

Re: [Puppet Users] Re: PuppetDB: SSL problems

2013-05-10 Thread kl . puppetuser
Thanks for your reply Ken, On Fri, May 10, 2013 at 2:11 PM, Ken Barber wrote: > How did you setup your SSL certificates? You didn't mention a manual > certificate setup. I did it manually after the automatic way did not work. I followed this guide ( http://goo.gl/m4PIH ) and reviewed your commen

[Puppet Users] Re: Hiera lookups in templates

2013-05-10 Thread Jon Ward
Hi, Have you tried doing the Hiera lookup on the command line to double check it can be read? $ hiera -d -c /path/to/hiera.yaml jrs_config_server1 fqdn=hostname > Cheers, Jon On Friday, May 10, 2013 12:18:22 PM UTC+1, Jonathan Gazeley wrote: > > Hi, > > I'm having a problem accessing Hiera d

[Puppet Users] Re: Are multiple environments broken in puppet?

2013-05-10 Thread jcbollinger
On Thursday, May 9, 2013 10:36:23 AM UTC-5, James Kyle wrote: > > > Hm, I started seeing this when I moved to a dynamic environment > configuration and began incorporating the openstack modules. > > Are there workarounds or rules of thumb to avoid it while still being able > to use environment

Re: [Puppet Users] is there a way to find an agent in which node by puppetdb api

2013-05-10 Thread Ken Barber
Come to think of it, a dummy resource is better: define foo () { } node /app\d+\.example\.com$/ { foo { 'app\d.+\.example\.com$': } } In that case you will be searching for the title of resource 'foo'. The problem with my previous class solution was that it would only work for

Re: [Puppet Users] is there a way to find an agent in which node by puppetdb api

2013-05-10 Thread Ken Barber
Let me get this straight ... so you want to be able to query PuppetDB for what 'node' match propagated that nodes configuration right? So in the case of 'app3.example.com' you want to be able to find it by looking for app\d+\.example\.com for example? Or you want to see all nodes that matches that

Re: [Puppet Users] Can i use puppet DB for puppet dashboard ?

2013-05-10 Thread Ken Barber
Today, you can't replace the database that puppet dashboard uses for PuppetDB, sorry. You will need to configure Puppet Dashboard as per normal, using mysql or whatever. The only feature today that PuppetDB replaces in Dashboard is Inventory Services, that is - storage of facts for node. This come

[Puppet Users] Re: proxy required

2013-05-10 Thread Fco CM
Hi, did you try: node default { include epel } El miércoles, 8 de mayo de 2013 00:39:53 UTC+2, Francesco escribió: > > Hy I m new to puppet. > I 'd like to install epel.repo on a my node and this is the module that I > ve created > > class epel { > > package { 'epel': > provider => '

[Puppet Users] Re: proxy required

2013-05-10 Thread Fco CM
El miércoles, 8 de mayo de 2013 00:39:53 UTC+2, Francesco escribió: > > Hy I m new to puppet. > I 'd like to install epel.repo on a my node and this is the module that I > ve created > > class epel { > > package { 'epel': > provider => 'rpm', > ensure => installed, > source =>

Re: [Puppet Users] Re: PuppetDB: SSL problems

2013-05-10 Thread Ken Barber
How did you setup your SSL certificates? You didn't mention a manual certificate setup. Perhaps you can get away with just re-initializing your certificates using 'puppetdb-ssl-setup'? Just backup your /etc/puppetdb/ssl directory first, and then remove it and re-run the tool and see if that helps:

[Puppet Users] Can i use puppet DB for puppet dashboard ?

2013-05-10 Thread Shreejit Nair
Hello Everyone, I am new to puppet and want to set puppet dashboard. I don't have a database for puppet dashboard, My question is that can i use PuppetDB as database for puppet dashboard ?? If yes then please tell me how to configure it. -- You received this message because you are subscri

[Puppet Users] is there a way to find an agent in which node by puppetdb api

2013-05-10 Thread yorks
puppet agent hostname: app1.example.com site.pp: node 'app2.example.com' { ...} node /app\d+\.example\.com$/ { ... } ... I can query the facter and resources from the puppetdb, but how can I get which nodes(app2.example.com, app\d+.example.com...) it matching? -- You received this message becaus

[Puppet Users] connect from ruby 1.9 agent to 1.8 server

2013-05-10 Thread Stephan
Hi all, Does anybody have an idea how to configure the puppet agent to use SSLv3 only? When I try to connect from an agent using Ruby 1.9 to a Master using Ruby 1.8 I get this error: Error: Failed to apply catalog: SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: (null) Thi

[Puppet Users] Hiera lookups in templates

2013-05-10 Thread Jonathan Gazeley
Hi, I'm having a problem accessing Hiera data from within templates. Yes, I know this is not the recommended way to access Hiera data, but in my use case I think it will be easier overall. In manifests, this code works: { ip => hiera('jrs_config_server1'), } In a template, part of the sam

[Puppet Users] Re: proxy required

2013-05-10 Thread Francesco
Excuse me, can anyone help me please . I m going mad... thank you , thank you, thank you Il giorno giovedì 9 maggio 2013 11:46:58 UTC+2, Francesco ha scritto: > > Excuse again > This is the output of my node > puppet agent --server=puppet.x.x.x. --no-daemonize --verbose --onetime > info: Cachin

[Puppet Users] Re: PuppetDB: SSL problems

2013-05-10 Thread kl . puppetuser
I ran puppetdb-foreground --debug. Please find the output here: http://pastebin.com/raw.php?i=Ra3BM3yf Thanks again for your time! -- 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

[Puppet Users] Re: PuppetDB: SSL problems

2013-05-10 Thread K L
Hi Stefan, On May 8, 10:36 pm, Stefan Schulte wrote: > seems to be an issue with OpenJDK7. Reverting to Java6 solved the > problem for a lot of users. > > issue is described here:http://projects.puppetlabs.com/issues/19884 Thanks for your reply. I tried it. Current output of `java -version` on p