Re: [Puppet Users] Alternatives to a dynamic scope lookup

2013-02-24 Thread Roman Shaposhnik
On Tue, Feb 12, 2013 at 12:50 PM, jcbollinger john.bollin...@stjude.org wrote: I am open to the idea of offering architectural advice, but I don't have either sufficient understanding of your requirements or sufficient understanding of your current code to offer any at this point. As for

Re: [Puppet Users] Alternatives to a dynamic scope lookup

2013-02-12 Thread Roman Shaposhnik
On Mon, Feb 11, 2013 at 3:06 PM, jcbollinger john.bollin...@stjude.org wrote: Puppet DSL does not have such a feature. :-( You have at least three alternatives: Depending on how your classes are arranged, hiera may provide a reasonable way to address this problem. (Notwithstanding your

Re: [Puppet Users] how to implement cascading defaults based on puppet classes

2013-02-11 Thread Roman Shaposhnik
On Mon, Feb 11, 2013 at 6:39 AM, jcbollinger john.bollin...@stjude.org wrote: I am inclined to suspect, however, that you are rejecting Hiera based on mis- or limited understanding of what it can do for you. If Hiera can in fact do the job adequately, then I think it makes the most sense to

[Puppet Users] Alternatives to a dynamic scope lookup

2013-02-11 Thread Roman Shaposhnik
Hi! now that dynamic scope lookup is going away, I'm looking for a good alternative for the following use case: suppose I have a set of classes that all set up a pretty rich internal state with quite a few variables defined in their namespace. On top of that all of them need to do a common set of

Re: [Puppet Users] Alternatives to a dynamic scope lookup

2013-02-11 Thread Roman Shaposhnik
On Mon, Feb 11, 2013 at 1:49 PM, Jo Rhett jrh...@netconsonance.com wrote: From the snippet you posted, I don't see why you can't pass $var1 into the define. No magic, just straightforward variable passing, right? Sure thing. The trouble is that as I said -- there's *quite* a rich state that

Re: [Puppet Users] how to implement cascading defaults based on puppet classes

2013-02-10 Thread Roman Shaposhnik
On Sun, Feb 10, 2013 at 9:32 AM, Keith Burdis ke...@burdis.org wrote: Have you looked at using hiera [1] for your configuration? It is very good for cascading defaults with more specific config at the top of the hierarchy and the least specific at the bottom. It is part of Puppet 3 and an add

[Puppet Users] how to implement cascading defaults based on puppet classes

2013-02-09 Thread Roman Shaposhnik
Hi! suppose my puppet recipes are deploying a configuration for the entire cluster (lets say Hadoop) consisting of quite a few distributed systems (lets say distributed file-system -- HDFS, scheduler -- YARN, coordinator -- zookeeper). Each of these distributed systems in turn consists of a few

Re: [Puppet Users] Thoughts on roles/profiles class paradigm

2013-01-09 Thread Roman Shaposhnik
Hi! On Wed, Jan 9, 2013 at 1:34 PM, Wolf Noble wno...@datapipe.com wrote: Hi Gang, My colleagues and I are contemplating refactoring our modules to take advantage of the roles/profiles paradigm suggested by Craig Dunn in his blog post found here: http://www.craigdunn.org/2012/05/239/ I

Re: [Puppet Users] Thoughts on roles/profiles class paradigm

2013-01-09 Thread Roman Shaposhnik
On Wed, Jan 9, 2013 at 2:08 PM, Craig Dunn cr...@puppetlabs.com wrote: The point was not a 1-1 mapping between nodes and roles (although that was mentioned), the key point I was trying to make is to add layers of classes to provide abstraction between your node definition (whether thats in an

Re: [Puppet Users] How manage xml elements as resources?

2013-01-07 Thread Roman Shaposhnik
On Mon, Jan 7, 2013 at 1:24 PM, Schofield dbschofi...@gmail.com wrote: I would like to use puppet classes to inject and/or replace xml elements into an existing xml configuration file. This seems to me to be a common problem already solved. Can anyone suggest the easiest way to do this?

Re: [Puppet Users] How to manage one line in a file by puppet

2013-01-04 Thread Roman Shaposhnik
Hi! On Fri, Jan 4, 2013 at 9:46 AM, Andreas Hilboll li...@hilboll.de wrote: Hi, I want to write a puppet module for xen on Debian. This module will need to manage one line in the file /etc/default/grub, namely the line starting with GRUB_CMDLINE_XEN=. Currently I want to leave the rest of

Re: [Puppet Users] Hostname wildcards in module

2012-12-27 Thread Roman Shaposhnik
On Thu, Dec 27, 2012 at 5:29 AM, Allan Mullan ammul...@gmail.com wrote: I'm new to Puppet (yay!) and working through having a different resolv.conf for systems that contain a certain string in their hostname. I've got the following in my modules/system/files.pp: class system::files {

Re: [Puppet Users] How to specify dependency

2012-12-26 Thread Roman Shaposhnik
On Tue, Dec 25, 2012 at 8:16 PM, Andrey Ageyev a.age...@gmail.com wrote: Hi, sorry for stupid question, but how I can specify package depends on class with parameters? class nginx::install ( $nginx = nginx-light, $ensure = 'installed' ) { include nginx::service package { $nginx :

Re: [Puppet Users] Whats the best approach to create a repo of the installers to be used for installing and upgrading in the puppet managed nodes

2012-12-21 Thread Roman Shaposhnik
On Wed, Dec 19, 2012 at 11:59 PM, Louis Coilliot louis.coill...@think.fr wrote: Hello, why not making a rpm or deb package for the application and using the resource 'package' ? In general I found fpm to be a reasonable compromise between full fledged high-brow packaging efforts and lose

Re: [Puppet Users] how to add a user to puppet

2012-12-21 Thread Roman Shaposhnik
Hi! It really isn't quite clear what the context here is. Could you tell us a bit more about your setup? Thanks, Roman. On Fri, Dec 21, 2012 at 12:22 PM, Murali Babu drop2muralib...@gmail.com wrote: Hi, some one please help me with following, how to add a user to puppet how to add a

Re: [Puppet Users] How to only apply my manifests to certain classes?

2012-12-20 Thread Roman Shaposhnik
On Thu, Dec 20, 2012 at 8:11 AM, Steve Button steve.but...@gmail.com wrote: Hi, I've written a new resolv class, but I only want it to get pushed out (for instance) UAT servers for now. Or perhaps just servers which have apache installed, or just the ones which are part of project xyz. There

Re: [Puppet Users] Question on modeling multiple services sharing configuration

2012-12-17 Thread Roman Shaposhnik
On Mon, Dec 17, 2012 at 6:46 AM, Nikola Petrov nikol...@gmail.com wrote: You have a bunch of options for this if I understand you well. You can one of the following: * use augeas with virtual resources * use the concat module Understood. I'm leaning heavily towards augeas at this point

Re: [Puppet Users] Question on modeling multiple services sharing configuration

2012-12-16 Thread Roman Shaposhnik
On Sun, Dec 16, 2012 at 1:39 PM, Tom Linkin tho...@puppetlabs.com wrote: You may also want to consider looking at the concat module that R.I. Pienaar has on github. It should allow you to easily do the fragments on a common file like you described. https://github.com/ripienaar/puppet-concat

Re: [Puppet Users] Question on modeling multiple services sharing configuration

2012-12-16 Thread Roman Shaposhnik
On Sun, Dec 16, 2012 at 6:41 AM, Jason Slagle raist...@tacorp.net wrote: This is a pattern I feel augeas is awesome at. I just did a similar thing for puppet.conf on my end. Yup. Using augeas is my #1 design choice ATM. Btw, have you had any experience with the XML lens? Those config files are

[Puppet Users] Question on modeling multiple services sharing configuration

2012-12-15 Thread Roman Shaposhnik
Hi! I would appreciate any advice on the best practices on how to model a collection of services that each has its own configuration file, but also share a common one. Now, the trouble is, that the common configuration file is not *really* just a place for the common configuration to reside, but

Re: [Puppet Users] exec GIT Variable PS1

2012-12-11 Thread Roman Shaposhnik
On Tue, Dec 11, 2012 at 8:18 AM, MaTi Villagra mativilla...@gmail.com wrote: Hello I'm trying to push PS1 variable at .bashrc file exec { 'GIT PS1 Variable': cwd = '/home/developer/.bashrc', command = '/bin/echo PS1='[\u@\h \W\$(__git_ps1 \ (%s)\)]\$ ' The single quote

[Puppet Users] Any advice on how to debug Could not evaluate: Puppet::Util::Log requires a message

2012-12-05 Thread Roman Shaposhnik
Hi! all of a sudden my puppet runs started to spew out this mysterious message on the most basic of use of Package resource: err: /Stage[main]/Hadoop_gateway_node/Hadoop::Client[hadoop client]/Package[hadoop-doc]: Could not evaluate: Puppet::Util::Log requires a message Does anybody have a clue