[Puppet Users] Error: Could not evaluate: invalid comparator for command get

2013-10-16 Thread Yan Xiaofei
Hello, I use saz/ssh module to config ssh server. Here is part of my manifese file: ssh::server::configline{ 'AllowGroups': ensure => 'present', value => $allowgroups } ssh::server::configline{ 'AllowUsers': ensure => 'absent', } But it report error after perform this change. Here is the error m

Re: [Puppet Users] exporting custom facts to puppet agents

2013-10-16 Thread Sans
Not sure if it's important: the line number in the error message points to the line in the .pp file where "$h = am_running_oss()" is defines. If I change that line with "am_running_oss_hash('/tmp/OSs.txt')" it works just fine. Cheers!! On Wednesday, October 16, 2013 10:37:19 PM UTC+1, Crist

Re: [Puppet Users] Puppet mkusers error (was Puppet without FQDN (could not retrieve fact fqdn))

2013-10-16 Thread tony e
James Turnbull puppetlabs.com> writes: > > msacks wrote: > > On Wed, Mar 2, 2011 at 5:24 PM, msacks gmail.com> wrote: > >> So I bit the bullet and added the system to DNS. > >> Now I am trying to generate the files automatically, but when I call > >> "puppet --mkusers" now it doesn't seem to tak

Re: [Puppet Users] exporting custom facts to the puppet agents

2013-10-16 Thread Cory Stoker
Well the easiest way would be to make a puppet module and place your facts in the correct path. Then enable pluginsync which causes the fact to get downloaded to the puppet clients. See: http://docs.puppetlabs.com/guides/plugins_in_modules.html On Sun, Oct 13, 2013 at 3:00 AM, Sans wrote: > >

[Puppet Users] Re: A standard way to manage monitoring/firewalling in modules

2013-10-16 Thread Alessandro Franceschi
Hi, Il giorno mercoledì 16 ottobre 2013 17:12:52 UTC+2, Dolf Schimmel - Freeaqingme ha scritto: > > Hi Al, > > I fully concur that we need some sort of standardized approach of > configuring firewall and monitoring rules. I'm not sure however as to the > approach you're proprosing. Two reasons

Re: [Puppet Users] exporting custom facts to puppet agents

2013-10-16 Thread Cristian Falcas
sorry, i didn't see that you already did that. I will try to respond again more meaningful in the morning On Thu, Oct 17, 2013 at 12:35 AM, Cristian Falcas wrote: > Check this: > > http://docs.puppetlabs.com/guides/custom_functions.html#calling-functions-from-functions > > > > On Thu, Oct 17, 201

Re: [Puppet Users] exporting custom facts to puppet agents

2013-10-16 Thread Cristian Falcas
Check this: http://docs.puppetlabs.com/guides/custom_functions.html#calling-functions-from-functions On Thu, Oct 17, 2013 at 12:08 AM, Sans wrote: > > I just modified your code a little bit and created two function out of that: > > > # am_running_oss_hash.rb >> >> module Puppet::Parser::Functi

Re: [Puppet Users] exporting custom facts to puppet agents

2013-10-16 Thread Sans
I just modified your code a little bit and created two function out of that: *# am_running_oss_hash.rb* > module Puppet::Parser::Functions > newfunction(:am_running_oss_hash, :type => :rvalue ) do |args| > inFile = args[0] > gos = {} > > if File.exist?(inFile) >

[Puppet Users] Re: Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find terminus puppetsvr for indirection catalog

2013-10-16 Thread thoule
I setup a whole new server and have everything working now. Problems I found were: wasn't using puppet-dashboard user for web process, puppet dash config had cn_name set to server name. I still don't know what 'dashboard' means in that line... Following the guides slowly helps it all work

Re: [Puppet Users] Re: template - need to fail if referencing undefined var

2013-10-16 Thread Nan Liu
This is essentially the behavior of stdlib pick function. $required_var = pick(hiera("var_a"), hiera("var_b")) Which could be improved to allow a custom error message: https://github.com/puppetlabs/puppetlabs-stdlib/blob/master/lib/puppet/parser/functions/pick.rb#L24 Nan On Wed, Oct 16, 2013 a

[Puppet Users] Re: Building another Puppet module for Splunk

2013-10-16 Thread Alex Scoble
By the way, I forgot to give thanks to the Puppet SE Team and to dhogland for their work on similar Splunk modules. I definitely integrated a lot of the work that they did into my module. Thanks, Alex On Tuesday, October 15, 2013 2:21:45 PM UTC-7, Alex Scoble wrote: > > Hi All, > > I've been w

[Puppet Users] Re: template - need to fail if referencing undefined var

2013-10-16 Thread Spencer Krum
I've developed the following pattern. Please don't hate. [nibz@pdxudev01 sandbox]$ cat testpuppetfailtemplate.sh $bar = 'lies' $derp=inline_template("<%= @bar || scope.function_fail(['die']) %>") notify { $derp: } Which produces: [nibz@pdxudev01 sandbox]$ puppet apply testpuppetfailtemplate.s

Re: [Puppet Users] Re: puppetdb, foreman, one particular node has a problem

2013-10-16 Thread Greg Sutcliffe
On 16 October 2013 14:39, Steve Wray wrote: > Your response is encouraging, thanks. > > I wasn't using sqlite, I was using postgresql. I have about 100 nodes (and > growing) sqlite quickly became unusable. > Ah ok. There are changes to the ENC script (which also registers new Hosts in the Forema

[Puppet Users] Re: A note on upcoming module metadata improvements

2013-10-16 Thread Alessandro Franceschi
Il giorno mercoledì 16 ottobre 2013 18:07:57 UTC+2, Ryan Coleman ha scritto: > > We've been working hard to reduce the complexity involved in publishing > modules to the Forge and make it simpler to find great modules. I'm writing > today to give you some background on the problems we're workin

[Puppet Users] Re: A note on upcoming module metadata improvements

2013-10-16 Thread Dolf Schimmel - Freeaqingme
Reposting my last post as I got an error that it could not be delivered because of my SPF records. Now with a different email address -- Hi Ryan, Thanks for the update. The improvements that are coming sound awesome! (I was in fact about to begin a thread to discuss this issue - glad to

[Puppet Users] Re: A note on upcoming module metadata improvements

2013-10-16 Thread Dolf Schimmel - Freeaqingme
Hi Ryan, Thanks for the update. The improvements that are coming sound awesome! (I was in fact about to begin a thread to discuss this issue - glad to see you're way ahead of me). Some insight into how I currently experience the Puppet forge (you may be aware of it all, yet anyway): - From an

Re: [Puppet Users] A note on upcoming module metadata improvements

2013-10-16 Thread Jason Slagle
On 10/16/2013 12:07 PM, Ryan Coleman wrote: - operating_system : OSes your module supports stated like the $operatingsystem Facter values Ubuntu or RedHat - This new metadata will be used on forge.puppetlabs.com on module pages, search results and will be availa

[Puppet Users] A note on upcoming module metadata improvements

2013-10-16 Thread Ryan Coleman
We've been working hard to reduce the complexity involved in publishing modules to the Forge and make it simpler to find great modules. I'm writing today to give you some background on the problems we're working to solve and the approach we'd like to take to help solve them. To publish a Forge mod

Re: [Puppet Users] Re: Status of Data in modules

2013-10-16 Thread R.I.Pienaar
- Original Message - > From: "jcbollinger" > To: puppet-users@googlegroups.com > Sent: Wednesday, October 16, 2013 4:23:17 PM > Subject: Re: [Puppet Users] Re: Status of Data in modules > > > > On Tuesday, October 15, 2013 8:35:00 AM UTC-5, R.I. Pienaar wrote: > > > > > > > > - Or

Re: [Puppet Users] Re: Status of Data in modules

2013-10-16 Thread jcbollinger
On Tuesday, October 15, 2013 8:35:00 AM UTC-5, R.I. Pienaar wrote: > > > > - Original Message - > > From: "jcbollinger" > > To: puppet...@googlegroups.com > > Sent: Tuesday, October 15, 2013 2:08:10 PM > > Subject: Re: [Puppet Users] Re: Status of Data in modules > > > > > > > > O

[Puppet Users] Re: A standard way to manage monitoring/firewalling in modules

2013-10-16 Thread Dolf Schimmel - Freeaqingme
Hi Al, I fully concur that we need some sort of standardized approach of configuring firewall and monitoring rules. I'm not sure however as to the approach you're proprosing. Two reasons: A. The interface of all firewall and monitoring modules out there would need to have a fugly interface (hav

[Puppet Users] Exported resources not in the catalog

2013-10-16 Thread Jean-Marc Andre
Hi, I'm trying to use Puppet ability to export and collect resources using PuppetDB. My PuppetDB and Puppet Master are running on the same host and I used the PuppetDB puppet module to install PuppetDB and configure the Puppet master. Each time the puppet agent runs on a client, the facts and t

Re: [Puppet Users] Using file and mount more efficiently

2013-10-16 Thread jcbollinger
On Tuesday, October 15, 2013 3:21:42 PM UTC-5, Forrie wrote: > > Thanks for the reference, John. > > We need to ensure that these remote mounts are owned/grouped by specific > UID/GID -- hence why I had ownership involved there. We could do this via > UID/GID only (not name) if that works bet

Re: [Puppet Users] Re: puppetdb, foreman, one particular node has a problem

2013-10-16 Thread Steve Wray
Your response is encouraging, thanks. I wasn't using sqlite, I was using postgresql. I have about 100 nodes (and growing) sqlite quickly became unusable. One of the things I tried was aptitude install with =version but this didn't work, apparently it couldn't find the old versions in the repo. I

[Puppet Users] tidy: Could not back up files of type socket

2013-10-16 Thread Derek Dresser
Hello, I am using puppet tidy to clean up my /tmp directory as described here: https://groups.google.com/d/msg/puppet-users/bg6GzDVDR-k/ELj8eeGI2F8J tidyup: /tmp: age: '4w' backup: 'false' recurse: 'true' Puppet throws errors when it encounters a socket instead of a regular file

[Puppet Users] most straight-forward way to verify catalog compilation of several node types?

2013-10-16 Thread Wolf Noble
Hi All, I am going to be doing a large bit of module refactoring, without an existing suite of tests; and I wanted to convince a master inside of vagrant on my dev laptop to compile a catalog against a collection of node names to try to catch breaking changes more expediently and less impact full

Re: [Puppet Users] Re: puppetdb, foreman, one particular node has a problem

2013-10-16 Thread Greg Sutcliffe
On 16 October 2013 11:48, Steve Wray wrote: > Sure, I'm using this repository > > deb http://deb.theforeman.org/ precise stable > > it looks as if the upgrade didn't make the required changes to the > database, or something like that. I dropped the db and recreated it and the > error about the mi

Re: [Puppet Users] Re: different environments per puppet master

2013-10-16 Thread Cristian Falcas
Thank you very much. On Wed, Oct 16, 2013 at 2:06 PM, Armindo Silva wrote: > You can define different classes for each organization/location and then > include the right ones of the node definitions - you can also define generic > nodes (with a regexp) that cover all nodes per location. > > exa

[Puppet Users] Re: different environments per puppet master

2013-10-16 Thread Armindo Silva
You can define different classes for each organization/location and then include the right ones of the node definitions - you can also define generic nodes (with a regexp) that cover all nodes per location. example: node /(your regexp)\.location1/ { include classA_location1 include classB_loca

Re: [Puppet Users] Re: Status of Data in modules

2013-10-16 Thread Alessandro Franceschi
Il giorno mercoledì 16 ottobre 2013 12:14:12 UTC+2, R.I. Pienaar ha scritto: > > > > - Original Message - > > From: "Alessandro Franceschi" > > > To: puppet...@googlegroups.com > > Sent: Wednesday, October 16, 2013 10:54:14 AM > > Subject: Re: [Puppet Users] Re: Status of Data in mod

Re: [Puppet Users] Re: puppetdb, foreman, one particular node has a problem

2013-10-16 Thread Steve Wray
Sure, I'm using this repository deb http://deb.theforeman.org/ precise stable I upgraded from foreman-postgresql 1.2.3+debian1 foreman 1.2.3+debian1 foreman-proxy 1.2.1+ubuntu1 foreman-installer 1.2.1-debian1 to foreman-postgresql 1.3.0-1 foreman 1.3.0-1 foreman-proxy 1.3.0-1 foreman-installer

Re: [Puppet Users] exporting custom facts to puppet agents

2013-10-16 Thread Cristian Falcas
You could return a hash, or an array if you need multiple from the function. On Wed, Oct 16, 2013 at 12:11 PM, Sans wrote: > Hi Cristian, > > Thanks for the code. gos[:mac] is the right thing to do (as we defined: gos > = {}); I think I g_C was a typo in my example script somewhere down the > lin

Re: [Puppet Users] Re: puppetdb, foreman, one particular node has a problem

2013-10-16 Thread Steve Wray
Yes, I know. At first I didn't anticipate that it was a foreman issue. To be honest I've found foremans usefulness marginal at best and its performance hit on the Puppet master server quite significant, so I'm not inclined to pursue it further. On Wednesday, 16 October 2013 17:26:33 UTC+8, And

Re: [Puppet Users] Re: Status of Data in modules

2013-10-16 Thread R.I.Pienaar
- Original Message - > From: "R.I.Pienaar" > To: puppet-users@googlegroups.com > Sent: Wednesday, October 16, 2013 11:14:12 AM > Subject: Re: [Puppet Users] Re: Status of Data in modules > > > > - Original Message - > > From: "Alessandro Franceschi" > > To: puppet-users@googl

Re: [Puppet Users] Re: Status of Data in modules

2013-10-16 Thread R.I.Pienaar
- Original Message - > From: "Alessandro Franceschi" > To: puppet-users@googlegroups.com > Sent: Wednesday, October 16, 2013 10:54:14 AM > Subject: Re: [Puppet Users] Re: Status of Data in modules > > > > On Tuesday, October 15, 2013 3:35:00 PM UTC+2, R.I. Pienaar wrote: > > > > > > >

Re: [Puppet Users] Re: Status of Data in modules

2013-10-16 Thread Alessandro Franceschi
On Tuesday, October 15, 2013 3:35:00 PM UTC+2, R.I. Pienaar wrote: > > > > - Original Message - > > From: "jcbollinger" > > To: puppet...@googlegroups.com > > Sent: Tuesday, October 15, 2013 2:08:10 PM > > Subject: Re: [Puppet Users] Re: Status of Data in modules > > > > > > > >

Re: [Puppet Users] Re: puppetdb, foreman, one particular node has a problem

2013-10-16 Thread Andreas Ntaflos
On 2013-10-16 10:07, Steve Wray wrote: > It turned out that there was an update to the foreman package which > completely broke Puppets ability to enroll new nodes. > > Call me old fashioned, I've been a Debian sysadmin for over 10 years, > but on a 'stable' system an apt-get upgrade is not suppos

Re: [Puppet Users] Re: puppetdb, foreman, one particular node has a problem

2013-10-16 Thread Ohad Levy
On Wed, Oct 16, 2013 at 11:07 AM, Steve Wray wrote: > It turned out that there was an update to the foreman package which > completely broke Puppets ability to enroll new nodes. > > Call me old fashioned, I've been a Debian sysadmin for over 10 years, but > on a 'stable' system an apt-get upgrade

Re: [Puppet Users] exporting custom facts to puppet agents

2013-10-16 Thread Sans
Hi Cristian, Thanks for the code. gos[:mac] is the right thing to do (as we defined: gos = {}); I think I g_C was a typo in my example script somewhere down the line). One related question: as I read that the name of the file must be the same as the name of the function, then I suppose I cann

[Puppet Users] different environments per puppet master

2013-10-16 Thread Cristian Falcas
Hi, Is there any possibility to do different environments(puppet classes) per organization/location based on a smart proxy(puppet master)? Or any plans to implement this? Thank you, Cristian Falcas -- You received this message because you are subscribed to the Google Groups "Puppet Users" gro

[Puppet Users] Re: 'puppet storeconfigs export' killed

2013-10-16 Thread Roger Torrentsgenerós
Well I finally did it. First thing to do is to specify a timezone to avoid the massive amount of: 17169 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2593, ...}) = 0 Issuing '# export TZ=:/etc/localtime' prior to launching the Puppet face is enough. Then, in my particular case I had t

[Puppet Users] Re: puppetdb, foreman, one particular node has a problem

2013-10-16 Thread Steve Wray
It turned out that there was an update to the foreman package which completely broke Puppets ability to enroll new nodes. Call me old fashioned, I've been a Debian sysadmin for over 10 years, but on a 'stable' system an apt-get upgrade is not supposed to break things. Thats one of the things De

[Puppet Users] Re: puppetdb, foreman, one particular node has a problem

2013-10-16 Thread Steve Wray
I just realised that between now and then there was a foreman upgrade which has basically broken my ability to enroll new nodes. Great. Thanks package maintainer. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group a

Re: [Puppet Users] Sync data between various PuppetDB instances

2013-10-16 Thread Pablo Fernandez
Thanks again for your answers, they are quite useful! On 10/15/2013 09:39 PM, Deepak Giridharagopal wrote: > * You can certainly add the whole catalog for a node to a secondary > PuppetDB I actually think this is the way to go, at least in my case. > > * There is an endpoint to get the catalog

Re: [Puppet Users] Sync data between various PuppetDB instances

2013-10-16 Thread Pablo Fernandez
Dear Deepak, On 10/15/2013 06:51 PM, Deepak Giridharagopal wrote: > > 1) You don't need to formulate the "payload" as a pre-serialized JSON > string (with all the requisite escaping and whatnot) anymore. As of > "replace catalog" version 2, you can just inline the raw JSON object > itself: > > "p