Re: [Puppet Users] courier imap/pop not refreshing

2012-01-17 Thread Felix Frank
On 01/13/2012 07:08 PM, Christopher Wood wrote: > The courier-imap (and courier-pop) services on my lab VMs don't actually get > refreshed after puppet drops in the config files. I suspect it's something > about the lack of /etc/init.d/courier-pop status, coupled with that I have > the wrong pat

[Puppet Users] Exported variable foo...(fu?)

2012-01-17 Thread Peter Berghold
Hi folks, For the first time since I started playing with puppet I started down the road of using exported resources This was inspired by my reading all of the nagios related recipes that went something along the lines of class nagios { package {nagios: ensure=> latest } service

Re: [Puppet Users] Display correctly any array

2012-01-17 Thread Felix Frank
On 01/16/2012 04:23 PM, Antidot SAS wrote: > Hi everyone, > > > Is there a way to display correctly an array, each time I am trying to > 'notice' an array I have something like that: > Here is the code: > $array = [ 'test' , 'test2'] > > notice("Here is the $array") > > The ouput is as follow:

Re: [Puppet Users] Exported variable foo...(fu?)

2012-01-17 Thread Nan Liu
On Tue, Jan 17, 2012 at 8:38 AM, Peter Berghold wrote: > Hi folks, > > For the first time since I started playing with puppet I started down the > road of using exported resources This was inspired by my reading all of the > nagios related recipes that went something along the lines of > > class n

Re: [Puppet Users] Exported variable foo...(fu?)

2012-01-17 Thread Peter Berghold
Actually I am using "|" (pipes) and not exclamation marks in my actual recipe. Not sure why the exclamation mark showed up. :-/ On Tue, Jan 17, 2012 at 11:42 AM, Nan Liu wrote: > On Tue, Jan 17, 2012 at 8:38 AM, Peter Berghold > wrote: > > Hi folks, > > > > For the first time since I started

Re: [Puppet Users] Exported variable foo...(fu?)

2012-01-17 Thread Peter Berghold
Here are the actual class definitions: class nagios::server inherits nagios { include gd case $operatingsystem { Debian: { include nagios::server::debian} Gentoo: { include nagios::server::gentoo} default: { } } Nagios_host <<| |>>

Re: [Puppet Users] Exported variable foo...(fu?)

2012-01-17 Thread Nan Liu
On Tue, Jan 17, 2012 at 8:48 AM, Peter Berghold wrote: > Here are the actual class definitions: > > class nagios::server inherits nagios { >     include gd > >     case $operatingsystem { >     Debian: { include nagios::server::debian} >     Gentoo: { include nagios::server::gentoo

[Puppet Users] Re: Display correctly any array

2012-01-17 Thread Krzysztof Wilczynski
Hi Felix, > Seeing as this has not been mentioned in the thread yet, I'm compelled > to add: > > $array_to_str = inline_template("<%= array * ', ' %>") > > or even > > notify { "my-notify": >   message => inline_template("Here is the <%= array * ', ' %>."); > > } Ah, the oldie but goodie inline_t

Re: [Puppet Users] Re: Display correctly any array

2012-01-17 Thread Aaron Grewell
As long as we're lacking a builtin method for pretty-printing data structures during a debug session inline templates are going to continue to be popular in scenarios like this. On Tue, Jan 17, 2012 at 10:06 AM, Krzysztof Wilczynski wrote: > Hi Felix, > >> Seeing as this has not been mentioned in

[Puppet Users] Re: Display correctly any array

2012-01-17 Thread Krzysztof Wilczynski
Hi Aaron, > As long as we're lacking a builtin method for pretty-printing data > structures during a debug session inline templates are going to > continue to be popular in scenarios like this. Sadly, you are right. I personally dislike inline_template() hackety hacks and would rather solve a pr

Re: [Puppet Users] Re: Display correctly any array

2012-01-17 Thread Aaron Grewell
This (or something like it) should be a candidate for stdlib. On Tue, Jan 17, 2012 at 10:47 AM, Krzysztof Wilczynski wrote: > Hi Aaron, > >> As long as we're lacking a builtin method for pretty-printing data >> structures during a debug session inline templates are going to >> continue to be popu

SOLVED: [Puppet Users] Exported variable foo...(fu?)

2012-01-17 Thread Peter Berghold
I have become fully convinced that running puppetmasterd in debug mode is hot stuff. I found the following deficiencies in my setup and fixed them: - Doing some random reading I needed to add storeconfigs=true to my master section of puppet.cfg - After doing that I got complaints abou

[Puppet Users] Users with different passwords on each host

2012-01-17 Thread Jamie
Say I have 50 user accounts that must exist on 3 hosts, each with different passwords (3 hosts, 50 users, 150 passwords). Is it possible to do this without defining each user 3 times? Thank you -- You received this message because you are subscribed to the Google Groups "Puppet Users" group.

Re: [Puppet Users] Users with different passwords on each host

2012-01-17 Thread Christopher Wood
Maybe something like this? class users { user { 'cwood': password => $fqdn ? { 'host1' => 'password1', 'host2' => 'password2', }, } } include users If you use a scripted generator to pop out the manif

[Puppet Users] Re: Users with different passwords on each host

2012-01-17 Thread Jamie
Ahh! That might work for me, thanks! You're wondering why I don't use LDAP or other centralized authentication? I'm not familiar with it, I don't know whether it has the ability to do what I want, and I'd have to convice my CTO, who doesn't experience my issues directly that it's better than me

[Puppet Users] more fun and games...(exported resources)

2012-01-17 Thread Peter Berghold
what does this mean? err: Could not retrieve catalog from remote server: Error 400 on SERVER: Exported resource Nagios_contact[sharkrivertech-support] cannot override local resource on node slcdmon0.slc.sharkrivertech.com warning: Not using cache on failed catalog err: Could not retrieve catalog;

[Puppet Users] Re: Problems with Host <<||>>

2012-01-17 Thread Florian Koch
Hi, first, thanks for the reply, and the solutio! Set "notify => undef" on the node without the dependency does the trick for me. For completing the Informations: i do the export on all nodes, and the collect on two nodes. the first collecting node should get all exported hosts, the second sch

[Puppet Users] Re: Users with different passwords on each host

2012-01-17 Thread Jamie
Worked great, just what I needed, you made my day! :) On Jan 17, 11:49 am, Christopher Wood wrote: > Maybe something like this? > > > class users { > > user { 'cwood': >   password => $fqdn ? { >     'host1' => 'password1', >     'host2' => 'password2',

[Puppet Users] ignoring a service that doesn't exist

2012-01-17 Thread Christopher Wood
I definitely need some assistance in conceptualizing something. If I want to configure syslog-ng instead of rsyslog, or configure rsyslog instead of sysklogd, the previous syslog daemon has to be stopped (and disabled) before the new one starts. De-configuring the previous one works just fine w

Re: [Puppet Users] ignoring a service that doesn't exist

2012-01-17 Thread Daniel Pittman
On Tue, Jan 17, 2012 at 13:09, Christopher Wood wrote: > I definitely need some assistance in conceptualizing something. > > If I want to configure syslog-ng instead of rsyslog, or configure rsyslog > instead of sysklogd, the previous syslog daemon has to be stopped (and > disabled) before the

Re: [Puppet Users] ignoring a service that doesn't exist

2012-01-17 Thread Nan Liu
On Tue, Jan 17, 2012 at 1:09 PM, Christopher Wood wrote: > I definitely need some assistance in conceptualizing something. > > If I want to configure syslog-ng instead of rsyslog, or configure rsyslog > instead of sysklogd, the previous syslog daemon has to be stopped (and > disabled) before the

[Puppet Users] OK.. now I've done it.. err: Could not find table 'hosts'

2012-01-17 Thread Peter Berghold
The sqlite3 backend is now complaining it can't find the table "hosts." How to fix? Not sure how I got here... -- Peter L. Berghold Owner, Shark River Technical Solutions LLC -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this g

[Puppet Users] Re: tomcat module

2012-01-17 Thread Berry Sizemore
After groking the defined types link, it everything looked good. The issue was that the data needed to be unique for this to work. I ensured that each of my instances had a unique name in its YAML file, as well for the names of the apps. Now it is cruising right along. Thanks, Berry On Jan 12,

[Puppet Users] stored configs - array sort order

2012-01-17 Thread Grant Byers
Hi, When using stored configs with exported resources, I'm getting an odd sort order for arrays. For example, I have the following resource exported by all nodes ; @@sshkey { "${::fqdn}_dsa": host_aliases => ["$::fqdn","$::hostname","$::hostip"], type => dsa, key => $::sshd

[Puppet Users] Re: NRPE configuration with Augeas

2012-01-17 Thread Jared Curtis
Thanks for the help guys. I actually decided to abandon using Augeas as it seemed like overkill for the project. I've setup a github page for this project at https://github.com/jaredcurtis/puppet-nrpe. I started doing this after reading Tim Sharpe's article "Stop writing puppet modules that suck

[Puppet Users] Re: augeas error: Could not evaluate: unknown error - Failed to initialize Augeas

2012-01-17 Thread LawrieC
Thanks for the tip Aaron. I have stuck with the platform RPMs as indicated earlier in the thread. I could not find a ruby-augeas SLED platform RPM. I downloaded the ruby-augeas-0.4.1-1.el5.src.rpm and tried to rebuild it on the SLED11SP1 machine. I had to make changes to the spec file to get rpm

[Puppet Users] params.pp class with parametrized class support?

2012-01-17 Thread Ryan Bowlby
If I wanted to allow all the variables normally set within params.pp to also be assigned as class parameters or as global variables how would I do this? I still want all the variables to be initially set to defaults within the params.pp class but allow for them to be overridden at the node level.

[Puppet Users] Re: Using foo::params, inheritance, and parameterized classes simultaneously?

2012-01-17 Thread Ryan Bowlby
Thanks for the great replies Nigel. As a person currently rolling out Puppet into production I'm stricken with doubt about how to best represent variables in a module. It would seem to me that I need to: 1. set default values in params.pp (based on facts, yadda yadda) 2. allow those values to be o

Re: [Puppet Users] Re: Using foo::params, inheritance, and parameterized classes simultaneously?

2012-01-17 Thread Nigel Kersten
On Tue, Jan 17, 2012 at 9:33 PM, Ryan Bowlby wrote: > Thanks for the great replies Nigel. As a person currently rolling out > Puppet into production I'm stricken with doubt about how to best > represent variables in a module. It would seem to me that I need to: > > 1. set default values in params

[Puppet Users] Re: Using foo::params, inheritance, and parameterized classes simultaneously?

2012-01-17 Thread Ryan Bowlby
Looking into it now, thanks. Related question, I see a lot of modules where an optional package is available as another class, example include apache::ssl would install apache and mod_ssl. With parametrized classes is it now better to make this a parameter? node blahblah { class { 'apache':

Re: [Puppet Users] Re: Display correctly any array

2012-01-17 Thread Antidot SAS
Thx this help a lot On Mon, Jan 16, 2012 at 6:04 PM, Krzysztof Wilczynski < krzysztof.wilczyn...@linux.com> wrote: > Hi, > > [...] > > There is no way to put a clean IFS for the ouput... > > You could use join() to join array elements with a single space and > display then with notice, or have a

Re: [Puppet Users] Re: Display correctly any array

2012-01-17 Thread Antidot SAS
Hey me again, stupid question where do I put the file? On Tue, Jan 17, 2012 at 9:58 AM, Antidot SAS wrote: > Thx this help a lot > > > On Mon, Jan 16, 2012 at 6:04 PM, Krzysztof Wilczynski < > krzysztof.wilczyn...@linux.com> wrote: > >> Hi, >> >> [...] >> > There is no way to put a clean IFS for

RE: [Puppet Users] Display correctly any array

2012-01-17 Thread Steve Shipway
This is because puppet lacks the join() function, the obvious (but absent) partner to the split() function. However you can add it by using a custom function very easily, as we've done. Email me if you'd like a copy of the join.rb file to put in your puppet/parser/functions directory. The onl

RE: [Puppet Users] How to handle multiple modules requiring the same packages

2012-01-17 Thread Steve Shipway
You can make the package resource definition conditional. class foo { if ! defined( Package[gcc] ) { package { gcc: ensure=>installed; } } } class bar { if ! defined( Package[gcc] ) { package { gcc: ensure=>installed; } } } Or, define a new class for the package(s) and include that clas

[Puppet Users] Re: Display correctly any array

2012-01-17 Thread Krzysztof Wilczynski
Hi Steve, > This is because puppet lacks the join() function, the obvious (but absent) > partner to the split() function. [...] By default yes, it does. But you can mitigate this problem with puppetlabs-stdlib[1] and/or tackle this one: https://github.com/kwilczynski/puppet-functions/blob/maste

[Puppet Users] Re: Puppet Triage-A-Thon

2012-01-17 Thread Krzysztof Wilczynski
Hi James, [...] Would it be possible to have one in London too? :-) KW -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-

[Puppet Users] Default handling

2012-01-17 Thread Antidot SAS
Hi everyone, Is there a way to handle default setting easily, let me explain, I want to create a user but if the uid is specified I would to use it as follow: --- class user::create ($uid='' ) { user { "$name": ensure => present, uid => "$uid", } --- Or am I forced to used the followi

[Puppet Users] Re: Network config module won't work. -Mac address errors

2012-01-17 Thread Luke
The code appears to be fine. The issue is with VMware it doesn't like me replacing the network config files but if I manually edit them it seems to be fine. Is it possible to have puppet just edit the contents of files instead of completely replacing them? Does anyone else have problems with file r

[Puppet Users] Re: Explanation of the resource package, little information in reference type

2012-01-17 Thread Antonio Xanxess
Hi Felix, You've finally found the problem. Indeed you were right, it was no problem of the resource package, had a problem with DNS name resolution prevented our local repository. Currently we solve this, so thank you very much for the help offered. A new greeting and apologies for the inconvenie

[Puppet Users] Re: Problems with Host <<||>>

2012-01-17 Thread jcbollinger
On Jan 16, 4:16 am, Florian Koch wrote: > Hi, > > i use exported hosts and  Host <<| |>> to collect all hosts and ips > for my hosts file. > > i like to use this to manage my dnsmasq installation, and use > > <<| tag == ${domain} |>> ~>Service['dnsmasq'] > > this works. > > on another Host i use

[Puppet Users] Re: Default handling

2012-01-17 Thread jcbollinger
On Jan 17, 4:34 am, Antidot SAS wrote: > Hi everyone, > > Is there a way to handle default setting easily, let me explain, I want to > create a user but if the uid is specified I would to use it as follow: > > --- > class user::create ($uid='' ) { > user { "$name": >   ensure => present, >   uid

[Puppet Users] pass values to puppet-lvm

2012-01-17 Thread Luke
i would like to use the module puppet-lvm and would like to pass values to it. I have it setup properly as a module but I can't for the lfe of me get it to take any values that I put in my baseconfig.pp in my home folder. like shouldn't something like this work?? puppet-lvm {'setvolume':

[Puppet Users] Re: Default handling

2012-01-17 Thread jcbollinger
On Jan 17, 4:34 am, Antidot SAS wrote: > Hi everyone, > > Is there a way to handle default setting easily, let me explain, I want to > create a user but if the uid is specified I would to use it as follow: > > --- > class user::create ($uid='' ) { > user { "$name": >   ensure => present, >   uid

[Puppet Users] Re: How to handle multiple modules requiring the same packages

2012-01-17 Thread jcbollinger
On Jan 17, 3:11 am, Steve Shipway wrote: > You can make the package resource definition conditional. > > class foo { >  if ! defined( Package[gcc] ) { >   package { gcc: ensure=>installed; } >  }} > > class bar { >  if ! defined( Package[gcc] ) { >   package { gcc: ensure=>installed; } >  } > >

Re: [Puppet Users] pip provider

2012-01-17 Thread Chris Blumentritt
Pip packages are case sensitive root@compute:~# pip freeze | grep -i xenapi XenAPI==1.2 On Mon, Jan 16, 2012 at 5:23 PM, Chris Blumentritt wrote: > debug: Prefetching pip resources for packagedebug: > Puppet::Type::Package::ProviderPip: Executing '/usr/bin/pip > freeze'debug: Puppet::Type::Packa

Re: [Puppet Users] Re: Default handling

2012-01-17 Thread Antidot SAS
OK thanks, this helped a lot, and finally with puppet 2.7.9 the 'undef' as a default value worked. On Tue, Jan 17, 2012 at 3:59 PM, jcbollinger wrote: > > > On Jan 17, 4:34 am, Antidot SAS wrote: > > Hi everyone, > > > > Is there a way to handle default setting easily, let me explain, I want >