[Puppet Users] how can i create set of configs

2011-11-17 Thread Alexey Wasilyev
Hello! I have n mod-proxy servers. I wish to list all mod-proxy entries in the text file like a: mod-proxy1 www.example.com example.internal.lan mod-proxy1 www.example2.com example2.internal.lan mod-proxy2 www.example3.com example3.internal.lan .. and via puppet get on mod-proxy1 server /etc

[Puppet Users] Puppet throws error when evaluating block after statement

2011-11-17 Thread Martin Alfke
Hi, using the following manifests inside a module: define base_users::usermanagement($gid='', $uid='', $groups='', $comment='', $home='', $ensure=present) { if ($comment == '' ) { fail('need full username') } } when running a test: tests/init.pp base_users::use

Re: [Puppet Users] AW: nagios_service does not replace target file

2011-11-17 Thread Bernd Adamowicz
Hi, Removing the 'require' link leads back to the very first problem I've encountered: The files are not regenerated even thought the stored configurations inside the MySQL database changed (I did check the table content before.). Bernd On Thu, 17 Nov 2011 04:36:26 +0100, Gabriel Filion

[Puppet Users] Exported resources: how to avoid duplicate definitions?

2011-11-17 Thread Martijn Grendelman
Hi, Is there a way to 'unique-ify' a collection of resources? Suppose that nodes export '@@nagios_hostgroup' resources for hostgroups that they want to be a member of. The Nagios server node collect those: Nagios_hostgroup <<||>> But many nodes export the same hostgroups, because the whole po

[Puppet Users] Collecting resources from exporting node

2011-11-17 Thread Martijn Grendelman
Hi, I was looking at the basic example for exporting and collecting resources at http://docs.puppetlabs.com/guides/exported_resources.html : class ssh { @@sshkey { $hostname: type => dsa, key => $sshdsakey } Sshkey <<| |>> } I quote: "The above code would have every host export its SSH

[Puppet Users] Re: Puppet throws error when evaluating block after statement

2011-11-17 Thread jcbollinger
On Nov 17, 2:18 am, Martin Alfke wrote: > Hi, > > using the following manifests inside a module: > > define base_users::usermanagement($gid='', $uid='', $groups='', $comment='', > $home='', $ensure=present) { > >         if ($comment == '' ) { >                 fail('need full username') >    

[Solved] [Puppet Users] Puppet throws error when evaluating block after statement

2011-11-17 Thread Martin Alfke
On 17.11.2011, at 14:49, jcbollinger wrote: > > > On Nov 17, 2:18 am, Martin Alfke wrote: >> Hi, >> >> using the following manifests inside a module: >> >> define base_users::usermanagement($gid='', $uid='', $groups='', $comment='', >> $home='', $ensure=present) { >> >> if ($commen

[Puppet Users] puppetmanaged.org ?

2011-11-17 Thread Dan White
Anyone from puppetmanaged.org listening to this list ? The web page to create an account is busted. The CAPTCHA does not show up and you cannot register without it. So I tried their mailing list -- I was

Re: [Puppet Users] Collecting resources from exporting node

2011-11-17 Thread Martijn Grendelman
Hi, A small addition at the bottom... > I was looking at the basic example for exporting and collecting resources > at http://docs.puppetlabs.com/guides/exported_resources.html : > > class ssh { > @@sshkey { $hostname: type => dsa, key => $sshdsakey } > Sshkey <<| |>> > } > > I quote: >

Re: [Puppet Users] Exported resources: how to avoid duplicate definitions?

2011-11-17 Thread Martijn Grendelman
On 17-11-11 11:51, Martijn Grendelman wrote: > Hi, > > Is there a way to 'unique-ify' a collection of resources? > > Suppose that nodes export '@@nagios_hostgroup' resources for hostgroups > that they want to be a member of. The Nagios server node collect those: > > Nagios_hostgroup <<||>> >

[Puppet Users] Re: Virtual Define-based resources can only be realized once

2011-11-17 Thread Stephan
Hi John, thanks for your reply, much appreciated. > I recommend that you check whether > it is having the desired effect. Yeah, I actually double-checked before writing my post, and it did work just fine ... but I agree with you that the term "realize" is semantically questionable. What I actual

[Puppet Users] Multiple variables in a file path?

2011-11-17 Thread Jon Davis
I'm trying to use puppet to setup my apache v-hosts. I want to make sure the files are in order so my puppet statement is this: file { "apache-vhost-$name": path=> "/etc/apache2/sites-enabled/$order-$name", content => template("apache/vhost.erb")

Re: [Puppet Users] Multiple variables in a file path?

2011-11-17 Thread Christopher Wood
On Thu, Nov 17, 2011 at 09:04:09AM -0800, Jon Davis wrote: >I'm trying to use puppet to setup my apache v-hosts. I want to make sure >the files are in order so my puppet statement is this: >� � � � file { "apache-vhost-$name": >� � � � � � � � path � �=> "/etc/apache2/sites-enabled/

Re: [Puppet Users] Multiple variables in a file path?

2011-11-17 Thread Jon Davis
That did it, thanks. I "couldn't find" any examples of variable isolation in puppet, but going back now I realize there were... I just missed em. Much appreciated -Jon On Thu, Nov 17, 2011 at 09:10, Christopher Wood wrote: > On Thu, Nov 17, 2011 at 09:04:09AM -0800, Jon Davis wrote: > >I'm t

Re: [Puppet Users] Re: Editing a variable defined in the same scope

2011-11-17 Thread Justin Lloyd
Thanks for the feedback. I do see the same behavior and I no longer need to do this but I am confused by your suggestion to not use += even though it's a valid Puppet capability. My simplified example was actually based on a parameterized activemq class. In my MCollective server's node definition

Re: [Puppet Users] Re: What is the offical variable scope best practice?

2011-11-17 Thread Davide Ferrari
On Wed, 2011-11-16 at 06:54 -0800, jcbollinger wrote: > Starting in Puppet 2.8, however, it will be mandatory to refer to non- > local variables by their fully-qualified names. In preparation for > that, Puppet 2.7.x emits warning when your manifests resolve non-local > variables from the dynamic

[Puppet Users] Duplicate definition

2011-11-17 Thread Peter Horvath
Hi, I am using Puppet 2.6.1 on Ubuntu LTS and i am getting this strange error messages. Duplicate definition: File[conf] is already defined in file /etc/ puppet/modules/apache2/manifests/vhost.pp at line 10; cannot redefine at /etc/puppet/modules/apache2/manifests/vhost.pp:10 on node eurwebtest02

[Puppet Users] Re: [foreman-users] dropping support for ruby 1.85?

2011-11-17 Thread Ohad Levy
On Thu, Nov 17, 2011 at 5:42 PM, Markus Falb wrote: > > On 16.Nov.2011, at 08:58, Ohad Levy wrote: > >> On Wed, Nov 16, 2011 at 6:30 AM, Jo Rhett wrote: >>> On Nov 9, 2011, at 5:47 AM, Ohad Levy wrote: >>> >>> Ruby 1.87 support >>> Foreman 0.4 would be the last major version supporting Ruby older

Re: [Puppet Users] ANNOUNCE: Puppet Labs stdlib module version 2.2.0 released

2011-11-17 Thread Jo Rhett
On Nov 15, 2011, at 9:47 PM, James Turnbull wrote: > This allows the end user of the ntp module to establish require and > before relationships easily: > > class { 'ntp': } -> class { 'mcollective': } > class { 'mcollective': } -> class { 'ntp': } I assume these two statements are mutua

Re: [Puppet Users] Multiple nodes.pp files

2011-11-17 Thread Jo Rhett
On Nov 16, 2011, at 11:08 AM, Ramin K wrote: > You can also use regex in your node files to further simplify though > if you're doing a lot of logic here you should probably start thinking > about an ENC. > > fe.pp > node /^fe\d+(.*)/ inherits basenode { > > case $::fqdn { >/(.*)stage|demo(.

Re: [Puppet Users] dropping support for ruby 1.85?

2011-11-17 Thread Jo Rhett
On Nov 15, 2011, at 9:18 PM, Brian Gupta wrote: > Not speaking for Ohad here, but I do know that rails 3.x would have major > issues with Ruby versions <= 1.8.6, and are explicitly not supported. As it > stands foreman is not alone here, as puppetlabs is not supporting ruby 1.8.5 > for the lates

Re: [Puppet Users] [foreman-users] dropping support for ruby 1.85?

2011-11-17 Thread Jo Rhett
On Nov 17, 2011, at 10:30 AM, Ohad Levy wrote: > if its not clear, what it means, is that if you want to run it on > RHEL5, you can either keep running the current 0.4.x versions or > upgrade your ruby stack. otherwise use a more recent distribution. Given that "upgrading the ruby stack" means e

Re: [Puppet Users] Duplicate definition

2011-11-17 Thread Jo Rhett
On Nov 17, 2011, at 10:02 AM, Peter Horvath wrote: > Duplicate definition: File[conf] is already defined in file /etc/ > puppet/modules/apache2/manifests/vhost.pp at line 10; cannot redefine > at /etc/puppet/modules/apache2/manifests/vhost.pp:10 on node > eurwebtest02 > > Do you have any idea what

Re: [Puppet Users] [foreman-users] dropping support for ruby 1.85?

2011-11-17 Thread Ohad Levy
On Thu, Nov 17, 2011 at 8:55 PM, Jo Rhett wrote: > On Nov 17, 2011, at 10:30 AM, Ohad Levy wrote: > > if its not clear, what it means, is that if you want to run it on > RHEL5, you can either keep running the current 0.4.x  versions or > upgrade your ruby stack. otherwise use a more recent distrib

Re: [Puppet Users] puppetmanaged.org ?

2011-11-17 Thread Yaakov Nemoy
Hi Dan, I used to participate in this project, but i don't know if the project owner is on the list. I don't want to pronounce the project dead, but it's been pretty inactive lately. -Yaakov 2011/11/17 Dan White : > Anyone from puppetmanaged.org listening to this list ? > > The web page to creat

[Puppet Users] Group membership dublicated resources

2011-11-17 Thread Vasil Mikhalenya
Hi all, I have define vhost($vhost,$db){ user { "apache" : name => apache, groups => "$title" , require => User["$title"],}... } and in nodes.pp node 'myhost' { wg::web::vhost { "foo": vhost => "vhost1", db => "db1" } wg::web::vhost { "bar": vhost => "vhost1", db => "db2"

Re: [Puppet Users] puppetmanaged.org ?

2011-11-17 Thread Dan White
Thanks for responding. I found the project while looking for a recipe for iptables. Have you used the one there ? It looks like it has all the bells and whistles I need, but there are some features that I do not understand. “Sometimes I think the surest sign that intelligent life exists elsewh

Re: [Puppet Users] puppetmanaged.org ?

2011-11-17 Thread Nan Liu
On Thu, Nov 17, 2011 at 2:07 PM, Dan White wrote: > Thanks for responding. > > I found the project while looking for a recipe for iptables. > > Have you used the one there ?  It looks like it has all the bells and > whistles I need, but there are some features that I do not understand. I recomme

Re: [Puppet Users] [foreman-users] dropping support for ruby 1.85?

2011-11-17 Thread Jo Rhett
On Nov 17, 2011, at 11:02 AM, Ohad Levy wrote: > On Thu, Nov 17, 2011 at 8:55 PM, Jo Rhett wrote: >> On Nov 17, 2011, at 10:30 AM, Ohad Levy wrote: >> >> if its not clear, what it means, is that if you want to run it on >> RHEL5, you can either keep running the current 0.4.x versions or >> upgra

[Puppet Users] Open Source Team update 2011-11-17

2011-11-17 Thread Jacob Helwig
We have been working on going through the list of submitted patches in Patchwork[0], and the open pull requests in GitHub[1][2][3]. There has been activity on a number of them, but not all with activity have resulted in merged changes. We also recently finished work on a fix for the problem of us

Re: [Puppet Users] Duplicate definition

2011-11-17 Thread Peter Horvath
i know all of this and i did grep before i wrote this email :) There is no other file[conf] On 17 November 2011 18:58, Jo Rhett wrote: > On Nov 17, 2011, at 10:02 AM, Peter Horvath wrote: > > Duplicate definition: File[conf] is already defined in file /etc/ > puppet/modules/apache2/manifests/vho

[Puppet Users] Re: Multiple nodes.pp files

2011-11-17 Thread Ramin K
Tech documentation is littered with examples that illustrate exactly one thing and call it day. 99% of the power of any system comes from learning to combine multiple functions. I chose that example because it illustrates regex, using regex in a node as well as case statements, adding classes based

Re: WG: [Puppet Users] Naginator and Puppet on different hosts

2011-11-17 Thread Bernd Adamowicz
Well, I've really started trying this the day after, but it took some time to get the final solution and a reliable system working. I'm also still struggling with another problem I've already posted on this list ("nagios_service does not replace target file"). Both is now covered in my late

Re: [Puppet Users] ANNOUNCE: Puppet Labs stdlib module version 2.2.0 released

2011-11-17 Thread Jeff McCune
On Nov 17, 2011, at 10:40 AM, Jo Rhett wrote: > On Nov 15, 2011, at 9:47 PM, James Turnbull wrote: >> This allows the end user of the ntp module to establish require and >> before relationships easily: >> >> class { 'ntp': } -> class { 'mcollective': } >> class { 'mcollective': } -> cla

Re: [Puppet Users] AW: nagios_service does not replace target file

2011-11-17 Thread Gabriel Filion
On 11-11-17 04:04 AM, Bernd Adamowicz wrote: > Removing the 'require' link leads back to the very first problem I've > encountered: The files are not regenerated even thought the stored > configurations inside the MySQL database changed (I did check the table > content before.). hmm right, sorry y

Re: [Puppet Users] AW: nagios_service does not replace target file

2011-11-17 Thread Bernd Adamowicz
The rsync process does definitely not disturb the generation of the files. I've checked this several times. However I will have a look at the module mentioned by you as soon as I'm back in the office on Monday. Maybe I'll find some issues. Thanks so far! Bernd On Thu, 17 Nov 2011 22:06:02

[Puppet Users] Variables inside node definition

2011-11-17 Thread Gonzalo Servat
Hi All, How would I go about achieving the following? node basenode { include motd } node www inherits basenode { $purpose = "web server" } In the "motd" module, I have a template that formats a standard /etc/motd file and I want to make use of the $purpose variable. When I access scop

[Puppet Users] Re: Duplicate definition

2011-11-17 Thread jcbollinger
On Nov 17, 1:50 pm, Peter Horvath wrote: > i know all of this and i did grep before i wrote this email :) > There is no other file[conf] In that case, the one declaration must be processed twice. It must appear inside a defined type that you instantiate more than once. If both definition ins

[Puppet Users] Re: What is the offical variable scope best practice?

2011-11-17 Thread jcbollinger
On Nov 17, 11:38 am, Davide Ferrari wrote: > On Wed, 2011-11-16 at 06:54 -0800, jcbollinger wrote: > > Starting in Puppet 2.8, however, it will be mandatory to refer to non- > > local variables by their fully-qualified names.  In preparation for > > that, Puppet 2.7.x emits warning when your man

[Puppet Users] Re: Editing a variable defined in the same scope

2011-11-17 Thread jcbollinger
On Nov 17, 11:23 am, Justin Lloyd wrote: > Thanks for the feedback. I do see the same behavior and I no longer need to > do this but I am confused by your suggestion to not use += even though it's > a valid Puppet capability. The C language has a standard feature referred to as 'trigraphs'. I

Re: [Puppet Users] [foreman-users] dropping support for ruby 1.85?

2011-11-17 Thread Michael Stahnke
On Thu, Nov 17, 2011 at 11:34 AM, Jo Rhett wrote: > On Nov 17, 2011, at 11:02 AM, Ohad Levy wrote: > > On Thu, Nov 17, 2011 at 8:55 PM, Jo Rhett wrote: > > On Nov 17, 2011, at 10:30 AM, Ohad Levy wrote: > > if its not clear, what it means, is that if you want to run it on > > RHEL5, you can eithe

Re: [Puppet Users] [foreman-users] dropping support for ruby 1.85?

2011-11-17 Thread Aaron Grewell
I'm not sure about the Ruby packages specifically, but Fedora has diverged so much from RHEL5 that building recent packages is a major undertaking. You'd probably be better off with tarballs and FPM. On Thu, Nov 17, 2011 at 2:42 PM, Michael Stahnke wrote: > On Thu, Nov 17, 2011 at 11:34 AM, Jo R

Re: [Puppet Users] [foreman-users] dropping support for ruby 1.85?

2011-11-17 Thread Eric Shamow
To Mike's point, I backported from f13 or 14 SRPMs - can't remember which - with great regularity and very little problem to RHEL 5. Haven't done it in ages but it's not too bad. And where that fails, gem2rpm… -Eric -- Eric Shamow Professional Services http://puppetlabs.com/ (c)631.871.64

[Puppet Users] Re: Virtual Define-based resources can only be realized once

2011-11-17 Thread jcbollinger
On Nov 17, 10:57 am, Stephan wrote: > Hi John, > > thanks for your reply, much appreciated. > > > I recommend that you check whether > > it is having the desired effect. > > Yeah, I actually double-checked before writing my post, and it did > work just fine ... but I agree with you that the term

Re: [Puppet Users] Virtual Define-based resources can only be realized once

2011-11-17 Thread Nan Liu
On Tue, Nov 15, 2011 at 8:05 AM, Stephan wrote: > Hi all, > > here is what I have: > > A module that is responsible to roll out and configure TSM (a backup > tool). Basically I need a text file that mentions all directories that > have to be backed up. I want to make it a virtual resource and let

[Puppet Users] msi package provider: Invalid parameter install_options

2011-11-17 Thread Mohamed Lrhazi
C:\Users\ml623>puppet --version 2.7.7 Puppet complains about a package resource I am trying to use saying: Invalid parameter install_options The resource is defined as: package { "splunk": name => $gu_splunk::client::splunk_package, provider => 'msi', ensure => installed,

Re: [Puppet Users] [foreman-users] dropping support for ruby 1.85?

2011-11-17 Thread Dan Carley
On 17 Nov 2011 22:42, "Michael Stahnke" wrote: > A while back you could just take the srpms from Fedora's 1.8.7 and > they would build pretty easily on EL5. I haven't tried that for a > while, but you can at least get the RPMs from a known source that way. SRPMs from EL6 (which has Ruby 1.8.7) a