Re: [Puppet Users] Hiera to hash

2012-08-22 Thread Stephen Gran
Hi, On Tue, 2012-08-21 at 21:00 -0700, Douglas Garstang wrote: I know I did this once before but can't find docs on how to do it again. I have this in a yaml file: pvdisks: ec2_pvdisks_m1.small: disks: /dev/xvdb1 enabled: yes Loading it with hiera. Manifest

Re: [Puppet Users] Hiera to hash

2012-08-22 Thread Douglas Garstang
On Tue, Aug 21, 2012 at 11:19 PM, Stephen Gran stephen.g...@guardian.co.uk wrote: Hi, On Tue, 2012-08-21 at 21:00 -0700, Douglas Garstang wrote: I know I did this once before but can't find docs on how to do it again. I have this in a yaml file: pvdisks: ec2_pvdisks_m1.small:

Re: [Puppet Users] Hiera to hash

2012-08-22 Thread Douglas Garstang
On Tue, Aug 21, 2012 at 11:44 PM, Douglas Garstang doug.garst...@gmail.com wrote: On Tue, Aug 21, 2012 at 11:19 PM, Stephen Gran stephen.g...@guardian.co.uk wrote: Hi, On Tue, 2012-08-21 at 21:00 -0700, Douglas Garstang wrote: I know I did this once before but can't find docs on how to do it

[Puppet Users] how to connect agent to the master through a different user to execute a command through puppet module

2012-08-22 Thread Prosenjit Ghosh
Created a puppet master in one Linux.X64/rh50 machine. Created a puppet agent in another Linux.X64/rh50 machine. Need to run any command from puppet master and that will execute in puppet agent when puppet agent will connect to puppet master. This is happening correctly for me when created

[Puppet Users] mcollective getaddrinfo: Name or service not known

2012-08-22 Thread James Trier
I'm getting these errors when running 'puppet agent --test' after doing a new installation of an agent: err: /Stage[main]/Pe_mcollective::Plugins/File[/opt/puppet/libexec/mcollective/mcollective/security/sshkey.rb]/content: change from {md5}512f42272699eaa085c83d2cc67c27ea to

Re: [Puppet Users] mcollective getaddrinfo: Name or service not known

2012-08-22 Thread R.I.Pienaar
- Original Message - From: James Trier jmstr...@gmail.com To: puppet-users@googlegroups.com Sent: Wednesday, August 22, 2012 12:46:52 AM Subject: [Puppet Users] mcollective getaddrinfo: Name or service not known I'm getting these errors when running 'puppet agent --test' after

[Puppet Users] Dependencies between defines

2012-08-22 Thread Axel Bock
Hi readers another question for my little puppet project: Can I (and if yes, how) define dependendies between puppet defines? (define like in define mymodule::mydefine() {...}) Example: I have a define prepare_cool_thing and another define cool_thing. Both can be on a machine several times

Re: [Puppet Users] Dependencies between defines

2012-08-22 Thread Martin Alfke
On 22.08.2012, at 14:27, Axel Bock wrote: Hi readers another question for my little puppet project: Can I (and if yes, how) define dependendies between puppet defines? (define like in define mymodule::mydefine() {...}) Example: I have a define prepare_cool_thing and another define

Re: [Puppet Users] Install rubygem package in order to use with library

2012-08-22 Thread Sergey V. Arlashin
Where is rubix declared? modules/zabbix/lib/puppet/type/zabbix_host.rb: $LOAD_PATH.unshift File.join(File.dirname(__FILE__), 'rubix/lib') require 'rubix' require 'facter' Puppet::Type.newtype(:zabbix_host) do @doc = Manages zabbix hosts self.debug // Blah ensurable newparam(:name)

[Puppet Users] Duplicate definition : Merging arrays

2012-08-22 Thread iamauser
Hello, I am trying to create a new array by combining two other arrays. I get the following error while running : Duplicate definition: Print[test0] is already defined in file /etc/puppet/manifests/test.pp at line 47; cannot redefine at /etc/puppet/manifests/test.pp:47 My code is similar to

[Puppet Users] Open Source Engineer with Puppet experience needed in Chicago, IL

2012-08-22 Thread J.D Jackson
Do you have a strong interest in Linux development and systems administration? Can you make the system run, but also have solid development skills you want to be able to use? Do you want to work on a team that is doing more than the average group of developers? Do you want to change the

[Puppet Users] Best way to bail from facter script without using confine in Facter.add ?

2012-08-22 Thread ZJE
I have a script in $FACTERLIB that queries proprietary vendor tools for RAID configuration. These tools are quite slow, so the top of my .rb file calls the program once and stores the output in a variable. Multiple Facter.add statements then populate the facts. I would like to bail on this

Re: [Puppet Users] puppet kick not working against windows service

2012-08-22 Thread Matt F
I've installed mcollective, and I can get data from the client (IE: mco inventory mywindowsclient). I've configured the puppetd agent plugin, and that shows up in the mco inventory output as well. However, I still cannot trigger puppet to update on the client. Any idea of what the cause might

Re: [Puppet Users] Scheduled_task + ad user

2012-08-22 Thread Jeff Sussna
The patch is working on XP but failing on Server 2003. Same domain/user on both. Can manually set the task to the user in question so I know it's a valid user/pw known to the 2003 machine. On Tuesday, August 21, 2012 7:31:01 PM UTC-5, Josh Cooper wrote: Hi Jeff, It should be

Re: [Puppet Users] puppet kick not working against windows service

2012-08-22 Thread Matt F
BTW: I'm seeing the following on the client, in the mcollective log - not sure if this is an issue: D, [2012-08-22T12:15:14.761477 #3224] DEBUG -- : runnerstats.rb Incrementing total stat D, [2012-08-22T12:15:14.761477 #3224] DEBUG -- : pluginmanager.rb Returning cached plugin security_plugin

Re: [Puppet Users] Best way to bail from facter script without using confine in Facter.add ?

2012-08-22 Thread Nigel Kersten
On Wed, Aug 22, 2012 at 8:49 AM, ZJE countac...@gmail.com wrote: I have a script in $FACTERLIB that queries proprietary vendor tools for RAID configuration. These tools are quite slow, so the top of my .rb file calls the program once and stores the output in a variable. Multiple Facter.add

Re: [Puppet Users] Duplicate definition : Merging arrays

2012-08-22 Thread Nan Liu
On Wed, Aug 22, 2012 at 6:56 AM, iamauser tapas.sara...@gmail.com wrote: Hello, I am trying to create a new array by combining two other arrays. I get the following error while running : Duplicate definition: Print[test0] is already defined in file /etc/puppet/manifests/test.pp at line 47;

Re: [Puppet Users] package handling in puppet?

2012-08-22 Thread lamour
On Tuesday, August 21, 2012 3:57:43 PM UTC-4, Ramin K wrote: What happens when you have two or more statements about the same resource in conflict? package { 'mysql': ensure = installed, } package { 'mysql': ensure = 5.0.92, } package { 'mysql': ensure = latest, }

[Puppet Users] Re: how to connect agent to the master through a different user to execute a command through puppet module

2012-08-22 Thread Nick Fagerlund
I don't understand what you're doing. But it sounds like you might need the user attribute of the exec type? exec {'some command': user = 'admin', } See http://docs.puppetlabs.com/references/latest/type.html#exec and scroll down a bit. On Wednesday, August 22, 2012 2:50:28 AM UTC-7,

Re: [Puppet Users] Duplicate definition : Merging arrays

2012-08-22 Thread iamauser
Any example, for this case ? I didn't find any on the web... thanks Use the unique and join function from stdlib. Nan -- You received this message because you are subscribed to the Google Groups Puppet Users group. To view this discussion on the web visit

[Puppet Users] Re: newish puppet on RHEL4 and/or SLES9?

2012-08-22 Thread Nick Fagerlund
The advice above is generally pretty good -- for best results build your own Ruby packages, etc. etc. One thing I can add: Given that even RHEL 5 has a pretty ancient Ruby, you might want to run puppet agent via cron jobs (with --splay) instead of as a daemon. The daemon is generally okay on

Re: [Puppet Users] Duplicate definition : Merging arrays

2012-08-22 Thread Nan Liu
On Wed, Aug 22, 2012 at 10:29 AM, iamauser tapas.sara...@gmail.com wrote: Any example, for this case ? I didn't find any on the web... thanks Bleh, join is string only. unique will remove any duplicates: $sys_server = [ ginger , test0 ] $usr_server = [ test0, test1, test2 ] $all =

Re: [Puppet Users] Duplicate definition : Merging arrays

2012-08-22 Thread Nick Fagerlund
You can see inline docs for every stdlib function by reading the code: https://github.com/puppetlabs/puppetlabs-stdlib/tree/master/lib/puppet/parser/functions Install the module with: $ sudo puppet module install puppetlabs-stdlib And probably use unique and flatten to do what you're trying

Re: [Puppet Users] Duplicate definition : Merging arrays

2012-08-22 Thread Nick Fagerlund
Whoops, collision! Reassuring that we both did the same thing though. :) -- You received this message because you are subscribed to the Google Groups Puppet Users group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/IsnRDusKXDoJ. To post to this group,

Re: [Puppet Users] Hiera to hash

2012-08-22 Thread Douglas Garstang
On Tue, Aug 21, 2012 at 11:51 PM, Douglas Garstang doug.garst...@gmail.com wrote: On Tue, Aug 21, 2012 at 11:44 PM, Douglas Garstang doug.garst...@gmail.com wrote: On Tue, Aug 21, 2012 at 11:19 PM, Stephen Gran stephen.g...@guardian.co.uk wrote: Hi, On Tue, 2012-08-21 at 21:00 -0700,

Re: [Puppet Users] Best way to bail from facter script without using confine in Facter.add ?

2012-08-22 Thread ZJE
The slowdown comes from the command that I run before any Facter.add statements. It takes roughly 1.5 seconds to run and I would need to run it roughly 64 times if I had it in each Facter.add. Many facts are generated by a loop that contains a Facter.add, so I feel like some sort of exception

Re: [Puppet Users] Best way to bail from facter script without using confine in Facter.add ?

2012-08-22 Thread Nigel Kersten
On Wed, Aug 22, 2012 at 11:13 AM, ZJE countac...@gmail.com wrote: The slowdown comes from the command that I run before any Facter.add statements. It takes roughly 1.5 seconds to run and I would need to run it roughly 64 times if I had it in each Facter.add. Many facts are generated by a loop

Re: [Puppet Users] package handling in puppet?

2012-08-22 Thread lamour
On Tuesday, August 21, 2012 6:25:53 PM UTC-4, Tim Mooney wrote: In regard to: [Puppet Users] package handling in puppet?, lamour said (at...: so, I've got most of the pieces worked out, but I've hit a major roadblock with the way packages are handled in puppet. (according to my

Re: [Puppet Users] Re: Hiera unable to retrieve the value

2012-08-22 Thread Evan Stachowiak
I'm running into the same issue on Ubuntu 10.04, hiera 0.3.0, puppet 2.7.18, ruby187. Hiera can lookup values, but only if there is no variable interpolation in /etc/puppet/hiera.yaml. :hierarchy: - '%{operatingsystem}' - common will give this error: err: Could not retrieve catalog from

[Puppet Users] facter issues

2012-08-22 Thread llowder
I've got facter 1.6.4 + puppet 2.7.14 on an Ubuntu 10.04 (LTS, 64bit) machine. This is my puppet master. When I run puppet agent on this machine, I am getting some weird behavior. Namely, fact based variables are all showing up as empty strings. When I run facter -p I see all the facts I

[Puppet Users] Hiera, OSSEC and per-node stuff?

2012-08-22 Thread Jakov Sosic
Hi. I have an interesting use case. OSSEC is security tool based on server-client architecture. Server generates keys for agents, and every agent has different key. Now I want to distribute these keys via puppet. I've come accross hiera and installed it, and it works superbly, but how to

Re: [Puppet Users] package handling in puppet?

2012-08-22 Thread Tim Mooney
In regard to: Re: [Puppet Users] package handling in puppet?, lamour said...: Another, less gross, way to do it is to do something like this: if !defined(Package['perl']) { package { 'perl': ensure = installed, } } I would instead do something

Re: [Puppet Users] puppet kick not working against windows service

2012-08-22 Thread Josh Cooper
Hi Matt, I'm not sure what the issue is. I recommend posting to the mcollective-users list. On Wed, Aug 22, 2012 at 10:56 AM, Matt F mfan2...@gmail.com wrote: Here's the mcollective.log from the client: D, [2012-08-22T13:54:28.907044 #3224] DEBUG -- : runnerstats.rb Incrementing total stat

Re: [Puppet Users] Hiera to hash

2012-08-22 Thread Douglas Garstang
On Wed, Aug 22, 2012 at 11:08 AM, Douglas Garstang doug.garst...@gmail.com wrote: On Tue, Aug 21, 2012 at 11:51 PM, Douglas Garstang doug.garst...@gmail.com wrote: On Tue, Aug 21, 2012 at 11:44 PM, Douglas Garstang doug.garst...@gmail.com wrote: On Tue, Aug 21, 2012 at 11:19 PM, Stephen Gran

Re: [Puppet Users] Hiera to hash

2012-08-22 Thread Justin Stoller
On Wed, Aug 22, 2012 at 1:34 PM, Douglas Garstang doug.garst...@gmail.com wrote: On Wed, Aug 22, 2012 at 11:08 AM, Douglas Garstang doug.garst...@gmail.com wrote: On Tue, Aug 21, 2012 at 11:51 PM, Douglas Garstang doug.garst...@gmail.com wrote: On Tue, Aug 21, 2012 at 11:44 PM, Douglas

Re: [Puppet Users] Hiera to hash

2012-08-22 Thread Douglas Garstang
On Wed, Aug 22, 2012 at 1:43 PM, Justin Stoller jus...@puppetlabs.com wrote: On Wed, Aug 22, 2012 at 1:34 PM, Douglas Garstang doug.garst...@gmail.com wrote: On Wed, Aug 22, 2012 at 11:08 AM, Douglas Garstang doug.garst...@gmail.com wrote: On Tue, Aug 21, 2012 at 11:51 PM, Douglas Garstang

Re: [Puppet Users] Hiera to hash

2012-08-22 Thread Wolf Noble
I accomplished something similar awhile back. While I've not spent much time looking at your particular problem, I think this'll help point you in the direction of what you need… class mymodule::params{ $collector= hiera('mymodule_collector','') } class mymodule::config{ $collector

Re: [Puppet Users] Hiera to hash

2012-08-22 Thread Douglas Garstang
On Wed, Aug 22, 2012 at 1:52 PM, Douglas Garstang doug.garst...@gmail.com wrote: On Wed, Aug 22, 2012 at 1:43 PM, Justin Stoller jus...@puppetlabs.com wrote: On Wed, Aug 22, 2012 at 1:34 PM, Douglas Garstang doug.garst...@gmail.com wrote: On Wed, Aug 22, 2012 at 11:08 AM, Douglas Garstang

[Puppet Users] Re: pass values to puppet-lvm

2012-08-22 Thread Jesus
The problem is not in the OS. I had the same issue and I have CentOS 6.2. It turned out that puppet-lvm is not a regular module but a puppet plugin. So, after installing the module, it needs to be sync'ed to the client machines. pluginsync and factsync are not enabled by default. The

[Puppet Users] Sign up for a usability test by Puppet Labs: Publishing Puppet modules to the Forge with the command-line module tool.

2012-08-22 Thread Ryan Coleman
Hello All, We're conducting a usability test around publishing modules to the Forge via the Puppet Module Tool. You'll be testing a prototype of the functionality we'd like to ship as part of our tool. We're interested in gathering your feedback and learning from how you work with the tool and

Re: [Puppet Users] Hiera to hash

2012-08-22 Thread Douglas Garstang
This in insanity. Now I have: $ec2_config = hiera('ec2_config') if $::ec2_instance_id { $pvdisks = $ec2_config['instance'][$::ec2_instance_type]['pvdisks'] $pvdisk_count = inline_template('%= @pvdisks.length %') $swapvol_enabled =

Re: [Puppet Users] Re: Getting all variable occurrences from Hiera

2012-08-22 Thread Tim Mooney
In regard to: Re: [Puppet Users] Re: Getting all variable occurrences from...: I'll comment in the ticket as well, I see you have, and you've closed it out. In Tim Mooney's example, which I think is the usual case for hiera data, hiera doesn't have an enumeration of all the 'type: client'

Re: [Puppet Users] Reporting to Dashboard on XP node

2012-08-22 Thread Josh Cooper
Hi Josh, On Thu, Aug 9, 2012 at 2:05 PM, Josh Shabtai jrbl...@gmail.com wrote: Hi, We set up Dashboard a month or two ago, running on our Puppet master (a Debian server). All of our machines are running puppet just fine, but one of them, an XP machine (the software we're running doesn't

Re: [Puppet Users] Getting all variable occurrences from Hiera

2012-08-22 Thread Eric Sorenson
On Aug 22, 2012, at 3:38 PM, Tim Mooney wrote: What I'm asking for (or at least, about) is indeed somewhat different than what Alexander was asking for. I'm a little surprised at the quick dismissal. I do not disagree with what you've described below, but I do not think it's covered by the

Re: [Puppet Users] Getting all variable occurrences from Hiera

2012-08-22 Thread Tim Mooney
In regard to: Re: [Puppet Users] Getting all variable occurrences from...: Now I really think we're talking about different things, because this data design seems quite reasonable and I agree that merging a various intermediate keys from a nested data structure ought to work. Indeed this seems

Re: [Puppet Users] The rewritten Puppet 2.7 language reference is live

2012-08-22 Thread wen1023 wu
it's very useful,i think it's better than puppet guide, 2012/8/22 Nick Fagerlund nick.fagerl...@puppetlabs.com Hi all, I've finished the all new Puppet 2.7 language reference. EXCITING! Well, exciting to me, at least. Table of contents: http://docs.puppetlabs.com/puppet/2.7/reference/

[Puppet Users] Hiera Hash

2012-08-22 Thread Jarod Watkins
Hello, I have the following in common.yaml: apache: mpm: worker If I do a manual lookup with the hiera command I get the proper result: hiera --config /etc/puppet/hiera.yaml apache {mpm=worker} However, when trying to get the apache hash in a manifest, it appears to be returned as a

[Puppet Users] Re: Hiera Hash

2012-08-22 Thread Jarod Watkins
Sorry, I should explained my issue: class apache ( $apache = hiera_hash('apache'), $mpm= $apache['mpm'], ) This code will produce the following error: Could not retrieve catalog from remote server: Error 400 on SERVER: apache is not an hash or array when accessing it with mpm If I do

[Puppet Users] nagios service check_https

2012-08-22 Thread Marc Lucke
I note that the check_https command that the puppet module generates is check_http -H $HOSTNAME -S $ARG1 I'd like to specify $ARG1 so that so that I can check return strings, check SSL certificates et al. but I couldn't find any way to do it other than nagios_command which seems pretty

Re: [Puppet Users] nagios service check_https

2012-08-22 Thread Peter Brown
Hi, $ARG1 in a nagios check is what comes after the first ! in the check. Which module are you using to generate your nagios setup? On 23 August 2012 13:44, Marc Lucke m...@marcsnet.com wrote: I note that the check_https command that the puppet module generates is check_http -H $HOSTNAME -S

Re: [Puppet Users] nagios service check_https

2012-08-22 Thread Marc Lucke
I inherited the module so I'm not sure. I did see some check_commands with ! and was wondering; I didn't connect the dots. Thank you!! :) On 23/08/2012, at 2:18 PM, Peter Brown rendhal...@gmail.com wrote: Hi, $ARG1 in a nagios check is what comes after the first ! in the check. Which

[Puppet Users] Refreshing Definitions

2012-08-22 Thread Douglas Garstang
I'm very confused about something. The definition below is used to set up swap. The three definitions, lvm::swapvol_make, lvm::swapvol_on and lvm::swapvol_fstab, where previously inside this definition, but I broke them into separate defines as I realised that the more I use the $ensure parameter

[Puppet Users] Re: Dependencies between defines

2012-08-22 Thread Axel Bock
Hm, my last answer didn't get posted. So let's go again. First, thanks for your help, it seems to work now - maybe I fixed another bug or did something wrong. But now I have another at which I'm stuck. Basically I configure our web servers with puppet. For that I have a webserver class which

Re: [Puppet Users] Dependencies between defines

2012-08-22 Thread Douglas Garstang
On Wed, Aug 22, 2012 at 6:06 AM, Martin Alfke tux...@gmail.com wrote: On 22.08.2012, at 14:27, Axel Bock wrote: Hi readers another question for my little puppet project: Can I (and if yes, how) define dependendies between puppet defines? (define like in define mymodule::mydefine() {...})