[Puppet Users] Re: Why?

2011-08-11 Thread ki_chi_saga
See the little arrows? No i didn't See the puppet language guide. I did and now (...) I see it! Thank you! Rgds Mat .. On Aug 10, 4:28 pm, vagn scott vagnsc...@gmail.com wrote: On 08/10/2011 02:40 AM, ki_chi_saga wrote:

Re: [Puppet Users] Re: Strange Could not find dependency error

2011-08-11 Thread Christian Kauhaus
Am 10.08.2011 22:24, schrieb piavlo: Does anyone have clear logical explanation why nagios::client nagios::server have no dep problems but nagios-client nagios-server does? - is no legal character in identifier names. Unfortunately, the error messages are not very helpful in such a case.

[Puppet Users] Custom manifest

2011-08-11 Thread Himanshu Raina
Hi, Can I execute a command basis on some criteria in puppet. For example, I would want to execute the following command svn up; /usr/local/apache/bin/apachectl restart only if revision number of file on host = revision number of file on svn i.e. /usr/bin/svn info

Re: [Puppet Users] Custom manifest

2011-08-11 Thread Scott Smith
Why don't you generate httpd.conf from a template in Puppet and restart apache if deemed necessary? On Thu, Aug 11, 2011 at 1:51 AM, Himanshu Raina dopedoxy...@gmail.comwrote: Hi, Can I execute a command basis on some criteria in puppet. For example, I would want to execute the following

Re: [Puppet Users] Re: Does Node Inheritance work for people?

2011-08-11 Thread Bruce Richardson
On Mon, Aug 08, 2011 at 06:25:20AM -0700, Alessandro Franceschi wrote: NEVER include a class in the inheritance tree (well you can if you don't redefine variables used in that class but still is not necessary). In a nodes inheritance layout BEFORE you set the variables and THEN you include

Re: [Puppet Users] Custom manifest

2011-08-11 Thread Himanshu Raina
Hi Scott, For that I would need to have a puppet file server installed. The idea behind using puppet and svn is to keep track of revision history of changes made to configuration files. Also, if my understanding is wrong could you please guide me to do it using template as you have mentioned.

Re: [Puppet Users] Custom manifest

2011-08-11 Thread Scott Smith
Puppet's file server is built in. You don't have to do anything extra beyond creating the template and specifying it in your manifest. If your Puppet manifests are under version control (they should be), your Apache configuration is essentially versioned as well. On Thu, Aug 11, 2011 at 2:12 AM,

Re: [Puppet Users] Custom manifest

2011-08-11 Thread Scott Smith
Then you would be missing out on one of the best features of Puppet. On Thu, Aug 11, 2011 at 2:39 AM, Himanshu Raina dopedoxy...@gmail.comwrote: What if I don't want to use the templates and instead would want to do it otherwise (as mentioned earlier). Regards, On Thu, Aug 11, 2011 at

Re: [Puppet Users] Custom manifest

2011-08-11 Thread Scott Smith
http://docs.puppetlabs.com/index.html explains it pretty well :) On Thu, Aug 11, 2011 at 2:55 AM, Himanshu Raina dopedoxy...@gmail.comwrote: So, can you guide me on how can this be done using templates. Regards, On Thu, Aug 11, 2011 at 3:19 PM, Scott Smith sc...@ohlol.net wrote: Then you

[Puppet Users] parameterized class precedences

2011-08-11 Thread lluis
Hello, I want to access variable of a parameterized class but it fails with class has not been evaluated. Tried to evaluate it first adding stages and requires, but still same. I'll explain better with an example: stage { pre: before = Stage[main] } class directory($path) { file { $path:

Re: [Puppet Users] Custom manifest

2011-08-11 Thread Daniel Pittman
Scott is right, but if you really wanted to do it the hard way, two choices: One, use an `exec` resource that just runs those commands on the client. Which pretty much sucks, FWIW, but not quite as much if you use the `unless` and `notify` metaparameters for `exec`. Two, you can use something

Re: [Puppet Users] Does Node Inheritance work for people?

2011-08-11 Thread Charles Johnson
We probably have the quintessential setup for using node inheritance. We now have about 1000 nodes in a HPC cluster with CentOS 5.x. About 950 nodes are identical, and the naming scheme is simplistic (vmp). The remaining nodes are gateways that users log into to launch jobs, or infrastructure

Re: [Puppet Users] Re: Why?

2011-08-11 Thread Randall Hansen
On Thu, Aug 11, 2011 at 12:40 AM, ki_chi_saga fan...@kth.se wrote: See the little arrows? No i didn't I think that this is more common than we suspect. It's been on my list for a while, now I have a ticket: http://projects.puppetlabs.com/issues/8923 Maybe what we're doing now cannot be

[Puppet Users] Re: Does Node Inheritance work for people?

2011-08-11 Thread Alessandro Franceschi
To be honest I don't find painful at all to include at node level ONE and only one (role) class. I wonder where you find all this duplication. If your node names are standardized (ie: web01 web02 web03.. ) you can even use wildcards for all the nodes that share the same role. I personally find

[Puppet Users] cleaning puppet dashboard

2011-08-11 Thread Arnau Bria
Hi all, I have a cron that follows http://docs.puppetlabs.com/dashboard/manual/1.2/maintaining.html and cleans our puppet dashboard: [...] rake RAILS_ENV=production reports:prune upto=1 unit=wk rake RAILS_ENV=production db:raw:optimize [...] but I've found a table which is 22GB and I'm not able

Re: [Puppet Users] Is accessing vars from different class safe?

2011-08-11 Thread Stefan Schulte
On Sat, Aug 06, 2011 at 04:14:31PM +0200, Stefan Schulte wrote: Is it ALWAYS safe to access $::my_application::paramBalsoInterestingForBackup inside the backup::client class or can I run into ordering issues? At least I can answer this question my self: It is not safe, you can end up with 2

Re: [Puppet Users] Is accessing vars from different class safe?

2011-08-11 Thread Aaron Grewell
It's fine, just make sure class2 requires class1. That's what requires are for. On Thu, Aug 11, 2011 at 8:26 AM, Stefan Schulte stefan.schu...@taunusstein.net wrote: On Sat, Aug 06, 2011 at 04:14:31PM +0200, Stefan Schulte wrote: Is it ALWAYS safe to access

[Puppet Users] Re: Strange Could not find dependency error

2011-08-11 Thread piavlo
Hi Christian Strangely then I had - in manifest like this class nagios-client { include nagios::params, nagios::nrpe, nagios::plugins } but was not including nagios-client any where - the puppet master/ agent did not give any errors - or this is since nagios-client was never compiled on the

[Puppet Users] Re: cleaning puppet dashboard

2011-08-11 Thread Luke Bigum
Hi Arnau, This is not a Puppet Dashboard problem, it's a MySQL feature of InnoDB. You're using per-table InnoDB data files. InnoDB data files grow. They never, ever, ever shrink. So what you've got there is a 22GB sparse file that MySQL will fill up with more resource_statuses rows. It won't use

Re: [Puppet Users] Is accessing vars from different class safe?

2011-08-11 Thread Stefan Schulte
On Thu, Aug 11, 2011 at 08:30:37AM -0700, Aaron Grewell wrote: It's fine, just make sure class2 requires class1. That's what requires are for. Unfortunately it still doesnt worked. Changed class2 to class mod2::class2 { file { $mod1::class1::message: ensure = file,

[Puppet Users] Distributing a PHP file as template fails

2011-08-11 Thread Tom De Vylder
Hi all, I'm trying to distribute a PHP file as a template. The problem I'm running into is that each variable in the PHP file is recognized as a Puppet or ERB variable. Take this snippet for instance: # cat include/init.php ?php $dbhost = '%= app_dbhost %'; $dbname = '%= app_dbname

[Puppet Users] Creating manifests automatically from an existing configuration?

2011-08-11 Thread Spiral Syzygy
Hello, I'm new to puppet and I would like to use it to clone the configuration of an existing base machine. Are there any tools that would allow puppet to scan the existing machine's state and generate manifests I can then use to manage this other machine? I know I can make them by hand or use

[Puppet Users] Re: Distributing a PHP file as template fails

2011-08-11 Thread Tom De Vylder
Forgot to mention some important details: # cat /etc/debian_version 6.0.2 # puppet --version # Take 1: Debian default 2.6.2 # puppet --version # take 2: Debian Backports 2.7.1 On 11 Aug 2011, at 10:42, Tom De Vylder wrote: Hi all, I'm trying to distribute a PHP file as a template. The

Re: [Puppet Users] Custom manifest

2011-08-11 Thread Tom De Vylder
Hi, You could use something like this: exec { svn up: command = svn up, notify = Service[apache], } service { apache: enable = true, ensure = running, } Regards, Tom On 11 Aug 2011, at 10:51, Himanshu Raina wrote: Hi, Can I execute a command basis on

Re: [Puppet Users] Is accessing vars from different class safe?

2011-08-11 Thread Aaron Grewell
I think you'll have to do it at the class level with the arrow operators rather than at the resource level. I haven't ever done that, but I think if the manifest contains something like: class { 'mod2::class2': } class { 'mod1::class1': message = 'Hallo Welt'} mod1 - mod2 you may have

Re: [Puppet Users] Creating manifests automatically from an existing configuration?

2011-08-11 Thread Daniel Pittman
On Thu, Aug 11, 2011 at 16:05, Spiral Syzygy spiralena...@gmail.com wrote: I'm new to puppet and I would like to use it to clone the configuration of an existing base machine. Are there any tools that would allow puppet to scan the existing machine's state and generate manifests I can then

Re: [Puppet Users] Creating manifests automatically from an existing configuration?

2011-08-11 Thread Eric Shamow
This could also be a place for the use of exported resources. End result is similar to puppet resource but can change dynamically, which is nice. -- Join us for PuppetConf (http://www.bit.ly/puppetconfsig), September 22nd and 23rd in Portland, OR. Eric Shamow Professional Services

Re: [Puppet Users] Is accessing vars from different class safe?

2011-08-11 Thread Stefan Schulte
On Thu, Aug 11, 2011 at 09:23:51AM -0700, Aaron Grewell wrote: I think you'll have to do it at the class level with the arrow operators rather than at the resource level. I haven't ever done that, but I think if the manifest contains something like: class { 'mod2::class2': } class {

Re: [Puppet Users] need urgent help with including Ruby DSL class from puppet manifests

2011-08-11 Thread Stefan Schulte
On Thu, Aug 11, 2011 at 09:06:37AM -0700, piavlo wrote: Hi, I have a Ruby class in nagios module - it's located in nagios/ manifests/ssa_nagios_checks.rb and looks like this hostclass :ssa_nagios_checks do ... end In nagios/manifests/init.pp I have class nagios::server { ...

Re: [Puppet Users] need urgent help with including Ruby DSL class from puppet manifests

2011-08-11 Thread Ken Barber
If you look at this example: I have a Ruby class in nagios module - it's located in nagios/ manifests/ssa_nagios_checks.rb and looks like this hostclass :ssa_nagios_checks do ... end In nagios/manifests/init.pp I have class nagios::server { ...    include ssa_nagios_checks ... }

[Puppet Users] Parse Puppet Manifests

2011-08-11 Thread Andrew Thompson
I am looking for a method to parse the entire set of puppet manifests/ modules. For example I want to see a list of all packages that I am managing with puppet. I have seen the compile option, but this only gives me a particular node's point of view. While I could just scrape all of the

[Puppet Users] Re: need urgent help with including Ruby DSL class from puppet manifests

2011-08-11 Thread piavlo
Hi Ken, Thank you so much for your reply I did like you said BUT i was still getting the error err: Must pass a parameter or all necessary values at /etc/puppet/ modules/nagios/manifests/server.pp:19 on node mon1a.internal Then I started to insert notice statement in the ruby DSL class - it

[Puppet Users] Passing hash as parameters to manifest

2011-08-11 Thread treydock
I have a module for backuppc, and am trying to pass a hash to a define to create a single script and the necessary directories. What I can't seem to figure out how to do is have this hash's values be used to create files / directories and also populate a template. Here's the hash...

Re: [Puppet Users] Re: need urgent help with including Ruby DSL class from puppet manifests

2011-08-11 Thread Ken Barber
Is it this line? raise Puppet:Error, Unsupported ssa nagios check type $type Should be double colon ... Puppet::Error. Looking at your code, I can't help but think a function is a better fit then Ruby DSL. ken. On Thu, Aug 11, 2011 at 9:34 PM, piavlo lolitus...@gmail.com wrote: Hi Ken,

[Puppet Users] Re: Is accessing vars from different class safe?

2011-08-11 Thread jcbollinger
On Aug 11, 10:54 am, Stefan Schulte stefan.schu...@taunusstein.net wrote: On Thu, Aug 11, 2011 at 08:30:37AM -0700, Aaron Grewell wrote: It's fine, just make sure class2 requires class1.  That's what requires are for. Unfortunately it still doesnt worked. Changed class2 to     class

[Puppet Users] Re: Creating manifests automatically from an existing configuration?

2011-08-11 Thread jcbollinger
On Aug 11, 11:52 am, Eric Shamow e...@puppetlabs.com wrote:  This could also be a place for the use of exported resources. End result is similar to puppet resource but can change dynamically, which is nice.   If the OP already had Puppet manifests for the machine he wanted to clone, then he

[Puppet Users] Vanishing facts

2011-08-11 Thread John T. Guthrie
Hello all, I am running puppet 2.7.1 with mongrel and an apache proxy. I have been seeing an issue where it appears that the puppetmaster is completely ignoring any facts that are sent to it. When a client connects, any configuration that relies on facts shows those variables as being empty

Re: [Puppet Users] Re: Creating manifests automatically from an existing configuration?

2011-08-11 Thread Spiral Syzygy
Thank you John, I think you hit the nail on the head. I just started this gig and the sysadmin before me started the process of setting up our machines to be managed by puppet. We have a project to add a redundant server and he started this project with puppet in mind, but the manifests are not

Re: [Puppet Users] Re: Is accessing vars from different class safe?

2011-08-11 Thread Aaron Grewell
Thanks John , I wasn't aware of that distinction. I suspect you've saved me a forehead=wall session on down the road. :-) On Aug 11, 2011 2:31 PM, jcbollinger john.bollin...@stjude.org wrote: On Aug 11, 10:54 am, Stefan Schulte stefan.schu...@taunusstein.net wrote: On Thu, Aug 11, 2011 at

Re: [Puppet Users] Re: Creating manifests automatically from an existing configuration?

2011-08-11 Thread Eric Shamow
John, I suspect you're right. User requirements FTW. -Eric -- Join us for PuppetConf (http://www.bit.ly/puppetconfsig), September 22nd and 23rd in Portland, OR. Eric Shamow Professional Services http://puppetlabs.com/ (c)631.871.6441 On Thursday, August 11, 2011 at 2:45 PM, jcbollinger

Re: [Puppet Users] Re: Creating manifests automatically from an existing configuration?

2011-08-11 Thread Spiral Syzygy
Thanks for your input folks. I have successfully run the manifests we have with out trouble. I'm looking forward to simplifying my job with this great tool, along with a few other side projects. Puppet is the first CMS I've laid hands on and so far, I'm stoked. :) On Thu, Aug 11, 2011 at 3:23 PM,

Re: [Puppet Users] Vanishing facts

2011-08-11 Thread Nan Liu
On Thu, Aug 11, 2011 at 4:59 PM, John T. Guthrie jguth...@book.com wrote: Hello all, I am running puppet 2.7.1 with mongrel and an apache proxy.  I have been seeing an issue where it appears that the puppetmaster is completely ignoring any facts that are sent to it. When a client connects,

Re: [Puppet Users] Vanishing facts

2011-08-11 Thread Ken Barber
Is your config facts_terminus=yaml for a reason? Usually its 'facter'. ken. On Thu, Aug 11, 2011 at 10:59 PM, John T. Guthrie jguth...@book.com wrote: Hello all, I am running puppet 2.7.1 with mongrel and an apache proxy.  I have been seeing an issue where it appears that the puppetmaster is

Re: [Puppet Users] Distributing a PHP file as template fails

2011-08-11 Thread vagn scott
On 08/11/2011 04:42 AM, Tom De Vylder wrote: # cat include/init.php ?php $dbhost = '%= app_dbhost %'; $dbname = '%= app_dbname %'; $dbuser = '%= app_dbuser %'; $dbpass = '%= app_dbpass %'; ? Surely you mean (note the dash (-) ): ?php $dbhost = '%= app_dbhost -%';

Re: [Puppet Users] Parse Puppet Manifests

2011-08-11 Thread Henrik Lindberg
Don't know exactly what you are looking for, but you may be interested in http://cloudsmith.github.com/geppetto/ which is tooling for puppet development - editor with syntax coloring, cross-reference checking, module-dependency checking, etc. As Geppetto contains its own parser that creates a

[Puppet Users] Re: Passing hash as parameters to manifest

2011-08-11 Thread treydock
Looking up the use of create_resources which is mentioned in the bug you linked, looks like it's available only in 2.7.x. I'm currently running 2.6.9, but may be worth upgrading for. I tried you suggestion, but get this error... err: Could not retrieve catalog from remote server: Error 400 on

Re: [Puppet Users] Re: Passing hash as parameters to manifest

2011-08-11 Thread Nan Liu
On Thu, Aug 11, 2011 at 7:19 PM, treydock treyd...@gmail.com wrote: Looking up the use of create_resources which is mentioned in the bug you linked, looks like it's available only in 2.7.x.  I'm currently running 2.6.9, but may be worth upgrading for. Pretty sure you can be backport to 2.6