[Puppet Users] Re: "varargs" usage in Parameterized Classes

2012-09-25 Thread Adrian Muraru
Thanks, I'll give it a try! On Monday, September 24, 2012 5:19:30 PM UTC+3, Axel Bock wrote: > > I've done it with hashes as Trevor suggests. I do it to pass values to > templates, what's your use case? > > basically my class looks like this: > class myclass( $myhash => {}) { > ... > } > > and I

Re: [Puppet Users] Iterate over array to mount NFS directories

2012-09-25 Thread Forrie
Thank you for your reply :) The head of the code would need something like this: $server = "nfs-server.domain.com" $prefix = "/our/prefix" # Arrays to iterate over, which would be a little longer than this $proddirs = [ "201201", "201202", "201203" ] $testdirs = [ "201201", "201202", "201203" ]

Re: [Puppet Users] Puppet windows -

2012-09-25 Thread Josh Cooper
Hi Pavel, On Tue, Sep 25, 2012 at 2:28 PM, Pavel Drobushevich wrote: > Hi all, > > We use puppet on many windows machines (Windows Server2008R2 x64). It works > fine, but on one of them it was fail down and couldn't start work again. I > try to reinstall, but it didn't help. May be you have any i

Re: [Puppet Users] MSI Package Provider and Install_options

2012-09-25 Thread Justin Brown
Josh, Thanks so much for the reply. I'll definitely give that a try. I'm constantly impressed with the pace of Puppet development. I suppose that's what I get for trying to wade through master on Git. Cheers, Justin On Tue, Sep 25, 2012 at 12:12 PM, Josh Cooper wrote: > Hi Justing, > > On Mon

Re: [Puppet Users] writing providers

2012-09-25 Thread Jakov Sosic
On 09/25/2012 08:14 PM, Justin Stoller wrote: I know that yours was more a question for the community but have you checked out: http://docs.puppetlabs.com/puppet/#hacking-and-extending If those aren't super helpful we'd love to make them better. Hmm, I've read: http://docs.puppetlabs.com/guide

[Puppet Users] Announce: Puppet 3.0.0-rc8 Available

2012-09-25 Thread Matthaus Owens
Puppet 3.0.0-rc8 is a feature release candidate for the 3.x series of Puppet. Downloads are available at: * Source http://downloads.puppetlabs.com/puppet/puppet-3.0.0-rc8.tar.gz RPMs are available at http://yum.puppetlabs.com Debs are available at http://apt.puppetlabs.com Gems are available v

[Puppet Users] Puppet windows -

2012-09-25 Thread Pavel Drobushevich
Hi all, We use puppet on many windows machines (Windows Server2008R2 x64). It works fine, but on one of them it was fail down and couldn't start work again. I try to reinstall, but it didn't help. May be you have any idea. Thanks in advance. *Error message from puppet* C:/puppet/puppet/lib/pup

Re: [Puppet Users] writing providers

2012-09-25 Thread Darin Perusich
HI Justin, I have reviewed those documents and the Provider Development doc doesn't tell me much more than what a provider does. There are no example other than how to set a command or limit to a certain system type. Take for example the docs on Using Parameterized Classes. I can take that documen

[Puppet Users] LDAP Account Manager supports Puppet

2012-09-25 Thread Roland Gruber
Hi all, the latest release of LDAP Account Manager supports to manage your Puppet LDAP entries via a web GUI. You can download it here (free, GPL license): https://www.ldap-account-manager.org/ There is also a live demo provided on the homepage. There you can try it online. Just edit a host en

Re: [Puppet Users] writing providers

2012-09-25 Thread Justin Stoller
I know that yours was more a question for the community but have you checked out: http://docs.puppetlabs.com/puppet/#hacking-and-extending If those aren't super helpful we'd love to make them better. HTH, Justin On Tue, Sep 25, 2012 at 10:47 AM, Jakov Sosic wrote: > On 09/25/2012 05:09 PM, Da

[Puppet Users] Re: Announce: Puppet 3.0.0-rc7 Available

2012-09-25 Thread Jos Backus
Hi Matthaus, Would it be possible to publish el6 RPMs for Ruby 1.9 which have 1.9.1 as the library version? The current 3.0.0 RPMs use 1.8. It looks like the RedHat spec file is already set up to handle this. Thanks! Jos -- You received this message because you are subscribed to the Google G

Re: [Puppet Users] writing providers

2012-09-25 Thread Jakov Sosic
On 09/25/2012 05:09 PM, Darin Perusich wrote: > Hello All, > > Does anyone have any good documentation, with examples, on writing > providers? I have both the puppet books and I've been reviewing the > various providers that are distributed w/puppet and modules but I'm > not seeing things like how

[Puppet Users] Re: writing providers

2012-09-25 Thread Cosmin-Viorel Ilie
I started by looking at this blog post: http://www.kartar.net/2010/02/puppet-types-and-providers-are-easy/ On Tuesday, September 25, 2012 6:09:30 PM UTC+3, Darin Perusich wrote: > > Hello All, > > Does anyone have any good documentation, with examples, on writing > providers? I have both the pu

Re: [Puppet Users] Where to place Custom Facts in Puppet module structure

2012-09-25 Thread Nan Liu
On Tue, Sep 25, 2012 at 1:44 AM, Leonig Mig wrote: > Using Puppet 2.7.11. > > Following http://puppetlabs.com/blog/facter-part-1-facter-101/ doesn't state > *where* custom facts should go.. however comment by 'nan' sept 2010 states: > > Custom facts should be placed under lib/facter sub directory

Re: [Puppet Users] How to make a module reject invalid parameter

2012-09-25 Thread Justin Stoller
On Tue, Sep 25, 2012 at 8:57 AM, Philip Brown wrote: > I tried a few google searches on this, and attempted to look through > docs.puppetlabs.com, but couldnt find anything... > > how do you make a module throw an error for an unrecognized parameter? > > ie: > > class setitup($machtype) { > case

Re: [Puppet Users] MSI Package Provider and Install_options

2012-09-25 Thread Josh Cooper
Hi Justing, On Mon, Sep 24, 2012 at 11:28 PM, Justin Brown wrote: > Nan, > > Thanks for the reply. That's certainly what the code and doc string > indicate. However, I think that I may have encountered a Puppet bug, but I > don't know enough Ruby to troubleshoot much. > > Here's my new resource:

Re: [Puppet Users] install vmware tools through puppet

2012-09-25 Thread Hai Tao
Wolf, that is wonderful fact, and we can deploy vmtools based on its underneath ESX version now! however, "Address 0xEA550" seems to be ESX4.1U1, but ESX4U1. Can you verify? On Mon, Sep 24, 2012 at 3:59 PM, Wolf Noble wrote: > I've just added a fact to github which on vmware hosts running lin

Re: [Puppet Users] Re: PuppetDB SSL error (while trying to reach the dashboard)

2012-09-25 Thread Deepak Giridharagopal
On Tue, Sep 25, 2012 at 06:44:03AM -0700, SirHopcount wrote: Hi Chris Sorry for the late response but I wanted to check some things first before responding. I made a new Puppetmaster and used this to install a new PuppetDB server. I successfully connected them together, I can do a successful p

Re: [Puppet Users] problem with class include order

2012-09-25 Thread windowsrefund
Luke, You should really refrain from adding that bloated signature when communicating with mailing lists. It's basically a small DoS :) -- 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.go

[Puppet Users] Re: How to make a module reject invalid parameter

2012-09-25 Thread windowsrefund
if !$foo { fail 'foo is missing' } -- 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/-/MikiJcuantMJ. To post to this group, send email to puppet-users@googleg

[Puppet Users] How to make a module reject invalid parameter

2012-09-25 Thread Philip Brown
I tried a few google searches on this, and attempted to look through docs.puppetlabs.com, but couldnt find anything... how do you make a module throw an error for an unrecognized parameter? ie: class setitup($machtype) { case $machtype { prod: { blah} dev: {blah} default: {

[Puppet Users] Re: Overriding variables.

2012-09-25 Thread George Shammas
Hi John, Thanks for the response. They variables are only used in the template, as the NRPE daemon is manged by flat files. I will do some research into hiera. --George On Tuesday, September 25, 2012 11:28:31 AM UTC-4, jcbollinger wrote: > > > > On Monday, September 24, 2012 11:47:31 AM UTC-5,

[Puppet Users] Re: Overriding variables.

2012-09-25 Thread jcbollinger
On Monday, September 24, 2012 11:47:31 AM UTC-5, George Shammas wrote: > > I am trying to override variables in a class that is defined in the > default node profile. I want parent class to be included in every single > node, but override its variables in others. I have tried > it several diff

[Puppet Users] writing providers

2012-09-25 Thread Darin Perusich
Hello All, Does anyone have any good documentation, with examples, on writing providers? I have both the puppet books and I've been reviewing the various providers that are distributed w/puppet and modules but I'm not seeing things like how to properly execute commands, best way to parse output,

Re: [Puppet Users] Re: puppetd --tags doesnt work for some module

2012-09-25 Thread jcbollinger
On Tuesday, September 25, 2012 5:29:07 AM UTC-5, Heriyanto wrote: > > Thanks for your reply john, the funny thing is: > > running on production environment with "environment=production" option on > puppet.conf: > puppetd --test --env staging # its work > puppetd --test --env stag

[Puppet Users] Re: problem with class include order

2012-09-25 Thread jcbollinger
On Tuesday, September 25, 2012 4:05:26 AM UTC-5, Nikita Burtsev wrote: > > Hello, > > We have a weird problem with includes: > err: Could not retrieve catalog from remote server: Error 400 on SERVER: > Could not find resource 'Class[Common_software]' for relationship from > 'Class[Default_rep

[Puppet Users] Re: PuppetDB SSL error (while trying to reach the dashboard)

2012-09-25 Thread SirHopcount
I forgot to include the firefox SSL warning: mgmt-puppetdb-01.edu.local:8081 uses an invalid security certificate. The certificate is not trusted because no issuer chain was provided. (Error code: sec_error_unknown_issuer) I do accept the exception but that is when I get the error: The connect

[Puppet Users] Re: hello world application

2012-09-25 Thread tetlika
Thanks Jon - chomp helped! after I added .chomp to the facter code : require 'facter' Facter.add("server_role") do setcode do %x{source /etc/environment; echo $ROLE}.chomp end end everything worked out but in documentation its written that chomp may be needed just in version pr

[Puppet Users] Re: hello world application

2012-09-25 Thread jmccann
Maybe try to use $::server_role instead since you are trying to use the value from a fact (global variable)? If that doesn't work what version of puppet are you using? Regards, Jake On Tuesday, September 25, 2012 8:25:47 AM UTC-5, tetlika wrote: > > hi! > > I have added custom fact server_role

[Puppet Users] Re: hello world application

2012-09-25 Thread Jon Ward
Could you try changing your if statement to: if $server_role =~ /app/ If that returns the result you want, it could be that you have an unwanted newline character at the end of your fact value. (If that's the case a little chomp in your fact code will sort you out.) On Tuesday, September 25, 2

[Puppet Users] Re: hello world application

2012-09-25 Thread tetlika
P.S. when I'm executing puppet code: case $server_role { 'app': { notice("server is app") } default: { notice("role is not set") } } I receive: $ puppet apply manifests/init.pp notice: Scope(Class[main]): role is not set notice: Finished catalog run in 0.25 seconds while I expect

[Puppet Users] Re: PuppetDB SSL error (while trying to reach the dashboard)

2012-09-25 Thread SirHopcount
Hi Chris Sorry for the late response but I wanted to check some things first before responding. I made a new Puppetmaster and used this to install a new PuppetDB server. I successfully connected them together, I can do a successful puppet run on the PuppetDB node itself. When i check the puppe

Re: [Puppet Users] problem with class include order

2012-09-25 Thread jcbollinger
On Tuesday, September 25, 2012 4:20:26 AM UTC-5, Luke Bigum wrote: > > Hi Nikita, > > On 25/09/12 10:05, Nikita Burtsev wrote: > > Hello, > > > > We have a weird problem with includes: > > err: Could not retrieve catalog from remote server: Error 400 on > > SERVER: Could not find resource '

[Puppet Users] hello world application

2012-09-25 Thread tetlika
hi! I have added custom fact server_role: $ facter | grep server_role server_role => app than wrote a code: if $server_role == "app" { notice("Welcome") } when I'm executing this puppet code I got no notice, if I'm executing just the code: notice("Welcome") everything's fine what

Re: [Puppet Users] Using Exported Resources in nginx loadbalancer conf

2012-09-25 Thread Jon Ward
Thanks Bill - looks like concat provides a potential solution, will give that a go. Jon On Tuesday, September 25, 2012 1:50:39 PM UTC+1, Bill Fraser wrote: > > Hi Jon, > > I have seen something similar done with Puppet Labs' haproxy module: > > https://github.com/puppetlabs/puppetlabs-haproxy

Re: [Puppet Users] require class inside fact

2012-09-25 Thread Frank
On Tuesday, September 25, 2012 at 1:32 PM, Jo Rhett wrote: > Your usage here is backwards. You need to re-read how puppet works. The node > collects its facts and submits them to the puppet master. The puppet master > uses the facts to compile a catalog for the node, which will be run by the

Re: [Puppet Users] puppet and std

2012-09-25 Thread Stephen Gran
Hi, On Tue, 2012-09-25 at 06:06 -0700, jcbollinger wrote: > > > On Monday, September 24, 2012 6:11:33 PM UTC-5, Fabrice Bacchella > wrote: > > My main problem was not with puppet failing, I managed to find > the cause, and it was my own mistake. I was much more suprised

Re: [Puppet Users] puppet and std

2012-09-25 Thread jcbollinger
On Monday, September 24, 2012 6:11:33 PM UTC-5, Fabrice Bacchella wrote: > > > My main problem was not with puppet failing, I managed to find the cause, > and it was my own mistake. I was much more suprised by the output to a > null'ed stderr. I think that should never happen. Either fd2 is sti

Re: [Puppet Users] How to change node hostname?

2012-09-25 Thread Trevor Vaughan
You just need to kill /var/lib/pupet/ssl and restart your daemons/run puppet again. Be *very* careful to test this first! Trevor On Tue, Sep 25, 2012 at 6:10 AM, Bernd Adamowicz wrote: > On master use: > puppetca --clean your.host.name > > On the agent I use this to delete all keys and certific

Re: [Puppet Users] Using Exported Resources in nginx loadbalancer conf

2012-09-25 Thread Bill Fraser
Hi Jon, I have seen something similar done with Puppet Labs' haproxy module: https://github.com/puppetlabs/puppetlabs-haproxy Essentially the balancer members export information about themselves (hostname, port, listening service, etc) which is collected by a balancer server. The configuration i

Re: [Puppet Users] require class inside fact

2012-09-25 Thread Jo Rhett
Your usage here is backwards. You need to re-read how puppet works. The node collects its facts and submits them to the puppet master. The puppet master uses the facts to compile a catalog for the node, which will be run by the node. So you can set $foot in the fact, and echo it in the class, bu

[Puppet Users] require class inside fact

2012-09-25 Thread Frank
Hello, I've created a class where I define some variables like $mydns, $myproxy, etc to use everywhere (in other manifests) The question is: Can I call these class variables inside a fact definition? Something like: #somemanifest.pp class x { $foo = "great" } #somefact.rb Facter.add("foo")

Re: [Puppet Users] Using Exported Resources in nginx loadbalancer conf

2012-09-25 Thread Jon Ward
Hi Greg, Yeah that's what I'd hoped - my balancer.conf.erb template had this: upstream <%= balancer_name %>_balancer { include /etc/nginx/conf.d.upstream_servers/*.conf; } However when I try to start nginx I get: Starting nginx: [emerg]: "include" directive is not allowed here A bit of googl

Re: [Puppet Users] Using Exported Resources in nginx loadbalancer conf

2012-09-25 Thread Greg Sutcliffe
On 25 September 2012 12:03, Jon Ward wrote: > Hi all, > > I'm attempting to use exported resources to dynamically generate an nginx > config file. What I'd like to do if have all my web servers export their > hostname inside a file resource, and have these collected by my loadbalancer > and used i

[Puppet Users] Using Exported Resources in nginx loadbalancer conf

2012-09-25 Thread Jon Ward
Hi all, I'm attempting to use exported resources to dynamically generate an nginx config file. What I'd like to do if have all my web servers export their hostname inside a file resource, and have these collected by my loadbalancer and used in the config file, restarting nginx if anything has

Re: [Puppet Users] Re: puppetd --tags doesnt work for some module

2012-09-25 Thread shell heriyanto
Thanks for your reply john, the funny thing is: running on production environment with "environment=production" option on puppet.conf: puppetd --test --env staging # its work puppetd --test --env staging --tags ntp # its work puppetd --test --env staging --tags http # its doesn't

AW: [Puppet Users] How to change node hostname?

2012-09-25 Thread Bernd Adamowicz
On master use: puppetca --clean your.host.name On the agent I use this to delete all keys and certificates. find /var/lib/puppet -name "*" -type f -exec rm -f {} \; There might be a more elegant solution. Regards, Bernd Von: puppet-users@googlegroups.com [mailto:puppet-users@googlegroups.com] I

[Puppet Users] How to change node hostname?

2012-09-25 Thread Sandra Schlichting
Dear readers, I have changed the hostname of a node, and so the question is: How do I delete the old puppet certificate on the node and master? Hugs, Sandra =) -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the we

Re: [Puppet Users] ENC RDBM best practice

2012-09-25 Thread erkan yanar
On Wed, May 30, 2012 at 10:49:29PM +0100, Ken Barber wrote: > Perhaps look at the Puppet Dashboard or Foreman schemas as a starting > point? These are both ENC's that are already working. Oh right. Thx! erkan -- über den grenzen muß die freiheit wohl wolkenlos sein -- You received this messag

Re: [Puppet Users] problem with class include order

2012-09-25 Thread Nikita Burtsev
Hi Luke, "sometimes" means this: [root@test-hpc puppet]# puppetd -vt --noop info: Retrieving plugin err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find resource 'Class[Common_software]' for relationship from 'Class[Default_repositories]' on node hpc.tornado war

Re: [Puppet Users] Variable interpolation inside hiera data

2012-09-25 Thread Josh
So obvious now that I think about it! *slaps head* Cheers Josh On Tuesday, September 25, 2012 3:11:32 AM UTC+1, Nan Liu wrote: > > On Mon, Sep 24, 2012 at 2:39 AM, Josh > > > wrote: > > I am using the latest version of hiera and puppet and wondering if there > is > > any way to make variable

Re: [Puppet Users] problem with class include order

2012-09-25 Thread Luke Bigum
Hi Nikita, On 25/09/12 10:05, Nikita Burtsev wrote: Hello, We have a weird problem with includes: err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find resource 'Class[Common_software]' for relationship from 'Class[Default_repositories]' My wild guess would

Re: [Puppet Users] Iterate over array to mount NFS directories

2012-09-25 Thread Luke Bigum
Hi Forrie, With regards to your iteration question, you would need to use a defined type, something like this (untested): define nfs_mount ( $server, $prefix, $state = "mounted" ) { $mount_point = "${prefix}/${name}" #If the state is "unmounted" the mount point 'File' is removed f

[Puppet Users] Where to place Custom Facts in Puppet module structure

2012-09-25 Thread Leonig Mig
Hi, Using Puppet 2.7.11. Following http://puppetlabs.com/blog/facter-part-1-facter-101/ doesn't state *where* custom facts should go.. however comment by 'nan' sept 2010 states: Custom facts should be placed under lib/facter sub directory inside modules to take advantage of the autoloader (0.

[Puppet Users] problem with class include order

2012-09-25 Thread Nikita Burtsev
Hello, We have a weird problem with includes: err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find resource 'Class[Common_software]' for relationship from 'Class[Default_repositories]' My wild guess would be that "common_software" gets in before "default_re