[Puppet Users] Avoiding duplicate definitions

2012-03-05 Thread Thomas Sturm
Hello Puppeteers, one problem we stumble upon quite often is duplicate definition of resources. For instance we install the package git-core in our base- class every node is in. Now we want to use a module from github, e.g. https://github.com/uggedal/puppet-module-git, but this one also defines th

RE: [Puppet Users] net ads join

2012-03-05 Thread Jeremy Baron
On Mar 5, 2012 3:36 PM, "Kinzel, David" wrote: > It would be much simpler to use: > > onlyif => "net ads testjoin 2>&1 | grep 'Join is OK'" > > Which will use the return code of grep. Idk the onlyif interface offhand but you probably want a -q on the grep to suppress output. So, grep -q 'Join is

[Puppet Users] Re: Developers having access to deploy

2012-03-05 Thread Thomas Rasmussen
Thanks for the replies, I can see that there is no "easy" setup to allow what I'm looking for :-( I will be looking a bit more on the External Node Classifier to see if this will solve my problem. We will be using puppet to fully automate everything that has to be performed on servers, so I wil

Re: [Puppet Users] net ads join

2012-03-05 Thread Paul Morgan
On Mon, Mar 05, 2012 at 12:26:24PM -0800, Adam wrote: > Trying to set up a puppet module that runs through most of my samba/ > domain joining steps. I have an exec statement where I run my "net > ads join -U %" command. I would like to > include an additional test statement where the command runs

Re: [Puppet Users] Re: @@file tricks..

2012-03-05 Thread Brian Gallew
I do check_mk configuration and Netbackup work via this method. On Mon, Mar 5, 2012 at 1:57 PM, windowsrefund wrote: > > This is exactly how I handle things. > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send em

Re: [Puppet Users] net ads join

2012-03-05 Thread Aaron Grewell
I'm not sure how much membership-specific code you have, but if it's more than just this you may want a custom fact rather than using unless/onlyif every time. We use QAS instead of Samba for domain membership but the idea is the same: --vas_status.rb-- require 'facter' vastool = '/opt/quest/bi

[Puppet Users] Re: @@file tricks..

2012-03-05 Thread windowsrefund
This is exactly how I handle things. -- 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-users+unsubscr...@googlegroups.com. F

[Puppet Users] @@file tricks..

2012-03-05 Thread Peter Berghold
Folks, I haven't tried this yet, but I certainly intend to. If I set up an exported file definition such that: @@file{'munin-node-file': content=> template('blah'), path => "/etc/munin.d/${hostname}.cfg" } and then File << 'munin-node-file' >> Do I understand correctly t

Re: [Puppet Users] Duplicate definition + parameterized classes + class scope

2012-03-05 Thread Denmat
Hi, Here's what the docs say: "Okay, we can pass parameters into classes now and change their behavior. Great! But classes are still always singletons; you can’t declare more than one copy and get two different sets of behavior simultaneously. And you’ll eventually want to do that! What if you

RE: [Puppet Users] net ads join

2012-03-05 Thread Kinzel, David
>exec { > path => "/usr/bin", > onlyif => 'test `net ads testjoin 2>&1 | grep Join | sed -e \'s/ >*Join is OK*/1/g\' -ne 1' > command => 'net ads join -U % >createcomputer="Samba" >} > >The onlyif doesn't work if the result of the testjoin returns "Join is >OK", depending on the test sy

[Puppet Users] How to test functions in 2.7.X

2012-03-05 Thread Trevor Vaughan
So, many moons ago, the following used to work: require 'puppet' Puppet::Parser::Functions::function(:mangle_ip_address) s = Puppet::Parser::Scope.new # Mask the ipaddress variable s.setvar('ipaddress','11.22.33.44') s.mangle_ip_address However, now that we have to call 'lookupvar' in our functi

[Puppet Users] net ads join

2012-03-05 Thread Adam
Trying to set up a puppet module that runs through most of my samba/ domain joining steps. I have an exec statement where I run my "net ads join -U %" command. I would like to include an additional test statement where the command runs only if it hasn't already been joined to the domain yet; howe

[Puppet Users] Duplicate definition + parameterized classes + class scope

2012-03-05 Thread chris_sny...@sra.com
I apologize if this horse has already been beaten to death, but I'm new here and very, very confused. I'm just starting to work with Puppet and I can not make heads or tails of the language: specifically how to use parameterized classes. I've spent a week reading the docs and testing manifests and

[Puppet Users] storeconfigs duplicate hosts?

2012-03-05 Thread Matthew Nicholson
So, we use storconfigs (thin) in our environment and recetly start to see thw following issue: First of all we use thin storeconfigs, and the only thing we really use it for currently is ssh keys, however we plan on using ti for nagios at some point. In our shop (HPC), we frequently rebuild hosts

[Puppet Users] File class overwritten by other classes

2012-03-05 Thread Pablo Fernandez
Dear Puppeteers, After many hours of reading manuals, books and google, I'm starting to thing there is no right way to edit files in puppet, and I must be wrong. A massive work is ahead (puppetizing our whole cluster) and I would like to start with the right foot. My idea is to make puppet a t

Re: [Puppet Users] Re: issues with new clients certs

2012-03-05 Thread kish
On Fri, Mar 2, 2012 at 9:07 PM, Matthew Nicholson wrote: > Furthermore I can verify the cert client side w/ the ca: > > root::wave { 10:34:20 Fri Mar 02 } > ~-> openssl verify -CAfile /var/lib/puppet/ssl/certs/ca.pem > /var/lib/puppet/ssl/certs/wave.pem > /var/lib/puppet/ssl/certs/wave.pem: OK My

Re: [Puppet Users] Re: puppet 2.7.11 requires ruby = 1.8.5

2012-03-05 Thread Craig White
On Mar 2, 2012, at 5:19 PM, Russell Van Tassell wrote: > The gem includes everything you will need... the (basic) difference is simply > running "puppet agent" versus "puppet master" -- some packages just hide the > simplicity (probably a legacy thing?). > > Note: I do not believe things like

[Puppet Users] Puppet Master VMs

2012-03-05 Thread Jeffrey Watts
I am. I run ours on a 1GB RAM VM with 2 vCPUs. We manage about 500 Linux servers, each checking in every 30 mins. It's pretty much idle, though I'm gradually rolling out our modules so our catalog currently compiles fast. I'm using Webrick, and plan on moving to Passenger/Apache whenever it starts

[Puppet Users] Module reusability

2012-03-05 Thread Nikolay Sturm
Hi, yesterday I published some ideas about improving the reusability of chef cookbooks on my blog. As I don't consider this issue chef-specific, you might be interested in this as well: http://blog.nistu.de/2012/03/04/reusability-in-configuration-management-systems/ I would love to discuss these

[Puppet Users] Re: fully qualified array of variables

2012-03-05 Thread jcbollinger
On Mar 4, 4:47 am, Eslam Mamdouh wrote: > $replicas works now by replacing > > <% if has_variable?(scope.lookupvar('class_name::params::replicas')) then %> > > with > > > <% if has_variable?("class_name::params::replicas") then %> > > but the problem now with $dbhost variable "else condition" >

[Puppet Users] Re: Best practices for excluding certain modules from certain nodes

2012-03-05 Thread jcbollinger
On Mar 2, 2:12 pm, Romeo Theriault wrote: > On Fri, Mar 2, 2012 at 08:56, Romeo Theriault > wrote: > > [...] one item I can't seem to find a clean way of dealing > > with is one-off nodes. For example, let's say I want to apply a class > > called zabbix::agent to my whole infrastructure, so I

Re: [Puppet Users] Running command in server

2012-03-05 Thread Pablo Fernandez
Hi, > Try using %x{} instead of system. The system() function returns the > return code of the process, not the output. > irb> %x{hostname --fqdn}.chomp > => "dagon.fnord.no" That worked, thanks! For the record, this is how it looks like: $new_ip=inline_template("<%= %x{host $hostname|awk '

Re: [Puppet Users] New hiera backend for mysql

2012-03-05 Thread ygor
Sounds like a great idea, but I am still trying to get a basic understanding of just puppet and hiera. I really like the idea of separating the. ode unique data from the general manifest, but I would like to see a beginner's guide to puppet/hiera. The other piece that I am very interested in i

Re: [Puppet Users] Running command in server

2012-03-05 Thread Stig Sandbeck Mathisen
"pablo.fernan...@cscs.ch" writes: > Do you know what am I doing wrong? How do I capture the system() > output? Try using %x{} instead of system. The system() function returns the return code of the process, not the output. Oh, and "chomp" the extra whitespace off the output. If you're new to r

[Puppet Users] Running command in server

2012-03-05 Thread pablo.fernan...@cscs.ch
Dear Puppet users, I'm quite new to Puppet, and I know less about ruby. That's probably why I have this question, hopefully you could answer it. I have google'd quite a lot about it, without success: I install nodes on a private subnet, and they get their FQDN from a local DHCP server, so the $ho

Re: [Puppet Users] Re: zombie child process

2012-03-05 Thread Raboo
On Monday, March 5, 2012 12:23:52 PM UTC+1, Krzysztof Wilczynski wrote: > > I would imagine, that adding code to either ignore SIGCHLD, or collect > child status (exit code), or use Process.detach could help :-) > > How and what in the what what now? -- You received this message because you a

Re: [Puppet Users] Re: zombie child process

2012-03-05 Thread Krzysztof Wilczynski
Hi, So /bin/sh gets defunc on Retrieving plugin.. What's my next step? > I would imagine, that adding code to either ignore SIGCHLD, or collect child status (exit code), or use Process.detach could help :-) KW -- You received this message because you are subscribed to the Google Groups "Pupp

Re: [Puppet Users] Re: zombie child process

2012-03-05 Thread Raboo
Ok, it fails at early run. Mar 5 03:57:33 srzarnsas007 puppet-agent[22690]: Retrieving plugin Mar 5 03:57:35 srzarnsas007 puppet-agent[22690]: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb Mar 5 03:57:35 srzarnsas007 puppet-agent[22690]: Loading facts in /var/lib/puppet/lib/fact

[Puppet Users] require custom ruby code in custom function

2012-03-05 Thread flex
hi, all: i want to require my own ruby class in a custom function, now i put the ruby file in the same directory with custom function, and require it in the function file like this: require File.join([File.expand_path(File.dirname(__FILE__)), 'test.rb']) but i think this is too ugly, is there a

[Puppet Users] -> vs => for dependency

2012-03-05 Thread C R Ritson
This happed to concern the LVM module, but I don't think that is important in this case. What is the difference between using -> and => to enforce a requirement that one class cannot be applied if the other fails to be asserted? In this case I have:- mount { "/addon/work2" :

[Puppet Users] New hiera backend for mysql

2012-03-05 Thread Craig Dunn
Hi all, Over the weekend I came up with a new backend for hiera for looking up configuration values directly from a MySQL database that may be useful to some http://www.craigdunn.org/2012/03/introducing-hiera-mysql-mysql-backend-for-hiera/ http://github.com/crayfishx/hiera-mysql Regard