Re: [Puppet Users] Facter displaying multiple IP addresses?

2012-02-13 Thread Torbjörn Norinder
You could do IP: %= scope.to_hash.inject([]) { |acc, (k,v)| acc v if k =~ /^ipaddress_/; acc }.join(', ') % Regards, On Sun, Feb 12, 2012 at 07:01:01PM -0800, Will S. G. wrote: Hi, I have a motd module (not mine) that rewrites /etc/motd with some useful host details. One particular

[Puppet Users] question regarding case and facts

2012-02-13 Thread Stefan Wiederoder
Hi group, is it possible to AND different facts using a case? for example: factA is BL460c and factB is G6, then AND (=concat) the two arguments: case $factA.$factB: { BL460cG1 :{ notify {G1:}} BL460cG6 :{ notify {G6:}} BL460cG7 :{ notify {G7:}} } thanks,

[Puppet Users] Dynamically extending the group membership of a custom system user

2012-02-13 Thread Christian Requena
Hello, I need to expand the membership of a custom system user depending on the availability of some group on the target system i.e. user { logger: name = logger, ensure = present, groups = [adm, wheel, this _group_ if it exists], shell = /bin/bash; } The this

[Puppet Users] Re: question regarding case and facts

2012-02-13 Thread Marc DiBlasi
You can do: case $factA$factB { } Or even better, assign them to a new variable: $concatenatedFacts = $factA$factB case $concatenatedFacts { } Or if it makes it cleaner for your specific implementation, you may want to check $factA, then have a nested if statement to check $factB. On Feb

[Puppet Users] Re: Puppet Dashboard 1.2.5 Available [security update - moderate]

2012-02-13 Thread John Morrissey
On Thu, Jan 26, 2012 at 03:42:12PM -0800, Michael Stahnke wrote: Welcome to the first Puppet Dashboard maintenance release of the new year. [snip] This release is available for download at: http://downloads.puppetlabs.com/dashboard/ We have created Debian and RPM packages as well as a

[Puppet Users] Re: neatest way to determine a major version of centos/linux?

2012-02-13 Thread d...@looprock.com
Elias, cat '/etc/redhat-release |awk {'print $3'}|cut -c1' works fine under redhat and centos, however I just tested it and it's worth noting that it doesn't work under scientific linux. Gary, Using the facter value is great, thanks. I didn't think of doing this. It's by far the neatest and

Re: [Puppet Users] Re: SSL certificates issues with some of the nodes

2012-02-13 Thread Mukul Malhotra
Hi, I am getting the following error message as after removing the SSL certificates from the node server, *err: Could not request certificate: Retrieved certificate does not match private key; please remove certificate from server and regenerate it with the current key* Thanks mukulm On Fri,

Re: [Puppet Users] Dynamically extending the group membership of a custom system user

2012-02-13 Thread Gabriel Filion
Hello, On 12-02-13 07:59 AM, Christian Requena wrote: I need to expand the membership of a custom system user depending on the availability of some group on the target system i.e. user { logger: name = logger, ensure = present, groups = [adm, wheel, this _group_ if it

Re: [Puppet Users] Question about reusing classes/modules

2012-02-13 Thread Kenneth Lo
Eric: Can you elborate on why global variables is a bad idea? Most of my environment's key-value pairs are set via dashboard as ENC, which I think are all global. --KL From: Eric Shamow e...@puppetlabs.commailto:e...@puppetlabs.com Reply-To:

Re: [Puppet Users] Re: neatest way to determine a major version of centos/linux?

2012-02-13 Thread Jeffrey Watts
Gary, I've been solving this problem by using the following inline_template in the modules that need to get the major release version: $os_major_ver = inline_template(%= operatingsystemrelease.split('.')[0] %) I'm new to Puppet, and I like the elegance of your example below - to implement it,

Re: [Puppet Users] Re: neatest way to determine a major version of centos/linux?

2012-02-13 Thread Gary Larizza
On Mon, Feb 13, 2012 at 9:17 AM, Jeffrey Watts jeffrey.w.wa...@gmail.comwrote: Gary, I've been solving this problem by using the following inline_template in the modules that need to get the major release version: $os_major_ver = inline_template(%= operatingsystemrelease.split('.')[0] %)

Re: [Puppet Users] Re: neatest way to determine a major version of centos/linux?

2012-02-13 Thread Gary Larizza
* $modulepath NOT $modulepatch On Mon, Feb 13, 2012 at 9:29 AM, Gary Larizza g...@puppetlabs.com wrote: On Mon, Feb 13, 2012 at 9:17 AM, Jeffrey Watts jeffrey.w.wa...@gmail.comwrote: Gary, I've been solving this problem by using the following inline_template in the modules that need to

Re: [Puppet Users] Re: neatest way to determine a major version of centos/linux?

2012-02-13 Thread Jeffrey Watts
Yes, thanks. My only concern though is that catalogs will fail to compile if that particular module that it's located in isn't included in that node definition. I worry that any successors will not be able to easily figure out what I've done. Could I create a module named global and have it

Re: [Puppet Users] Re: neatest way to determine a major version of centos/linux?

2012-02-13 Thread Gary Larizza
Hey Jeffrey, Yes, many sites have a 'stdlib' or 'global' that contains custom facts, functions, types/providers, and the like. You wouldn't even need a class declaration at all, you could just have a directory called 'global' that has lib/facter/{facts here} in it. As long as that global module

Re: [Puppet Users] Re: neatest way to determine a major version of centos/linux?

2012-02-13 Thread Gary Larizza
On Mon, Feb 13, 2012 at 9:36 AM, Jeffrey Watts jeffrey.w.wa...@gmail.comwrote: Yes, thanks. My only concern though is that catalogs will fail to compile if that particular module that it's located in isn't included in that node definition. I worry that any successors will not be able to

Re: [Puppet Users] Re: neatest way to determine a major version of centos/linux?

2012-02-13 Thread Jeffrey Watts
Oh, that really clears it up. Thanks! Jeffrey. On Mon, Feb 13, 2012 at 11:48 AM, Gary Larizza g...@puppetlabs.com wrote: And I don't think I've cleared this up for you - you DON'T NEED TO INCLUDE the class in a node declaration for a node to have that module's custom facts loaded and

[Puppet Users] Announce: zypprepo module

2012-02-13 Thread Darin Perusich
Hello All, I'd like to announce the release of 'zypprepo', a client-side description of a zypper repository type. This Puppet type is a port of the 'yumrepo' type from the Puppet 2.7 code based and is available from Puppet Forge, link below. For those using puppet-module it can be easily

Re: [Puppet Users] Re: Puppet Dashboard 1.2.5 Available [security update - moderate]

2012-02-13 Thread Michael Stahnke
On Mon, Feb 13, 2012 at 7:06 AM, John Morrissey j...@horde.net wrote: On Thu, Jan 26, 2012 at 03:42:12PM -0800, Michael Stahnke wrote: Welcome to the first Puppet Dashboard maintenance release of the new year. [snip] This release is available for download at:

[Puppet Users] Announce: zypprepo module

2012-02-13 Thread Darin Perusich
Hello All, I'd like to announce the release of 'zypprepo', a client-side description of a zypper repository type. This Puppet type is a port of the 'yumrepo' type from the Puppet 2.7 code based and is available from Puppet Forge, link below. For those using puppet-module it can be easily

Re: [Puppet Users] Announce: zypprepo module

2012-02-13 Thread Michael Stahnke
On Mon, Feb 13, 2012 at 11:16 AM, Darin Perusich da...@darins.net wrote: Hello All, I'd like to announce the release of 'zypprepo', a client-side description of a zypper repository type. This Puppet type is a port of the 'yumrepo' type from the Puppet 2.7 code based and is available from

[Puppet Users] Re: Re: Puppet Dashboard 1.2.5 Available [security update - moderate]

2012-02-13 Thread John Morrissey
On Mon, Feb 13, 2012 at 11:16:35AM -0800, Michael Stahnke wrote: On Mon, Feb 13, 2012 at 7:06 AM, John Morrissey j...@horde.net wrote: On Thu, Jan 26, 2012 at 03:42:12PM -0800, Michael Stahnke wrote: Welcome to the first Puppet Dashboard maintenance release of the new year. [snip] This

[Puppet Users] Removing the ability to serve symlinks as symlinks from the master...

2012-02-13 Thread Daniel Pittman
G'day. We recently found some issues with the `links = follow` setting in recursive file copying; the designed behaviour is that it should allow you to determine if the master serves a symlink in a module as a symlink, or as the content of the file that the symlink points to. The full details

[Puppet Users] Bug when using array in file resource?

2012-02-13 Thread Justin Lloyd
I'm trying to use an array on a file resource to create symlinks. If I have multiple elements in the array, I get a redefinition error showing it's replacing $name or $title with the CLASS name rather than the RESOURCE name. Here's a simplified example using one array element, where I'd expect to

[Puppet Users] Re: Bug when using array in file resource?

2012-02-13 Thread Justin
Forgot to mention I'm running Puppet 2.7.10 on Ubuntu 10.04.3. -- 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

Re: [Puppet Users] Bug when using array in file resource?

2012-02-13 Thread Nan Liu
On Mon, Feb 13, 2012 at 3:21 PM, Justin Lloyd jstn...@gmail.com wrote: I'm trying to use an array on a file resource to create symlinks. If I have multiple elements in the array, I get a redefinition error showing it's replacing $name or $title with the CLASS name rather than the RESOURCE name.

Re: [Puppet Users] Bug when using array in file resource?

2012-02-13 Thread Justin Lloyd
I was wondering if I'd need to create a define() but the language guide's description seems misleading, at least to me. From the 6th paragraph of the Resources section: http://docs.puppetlabs.com/guides/language_guide.html#resources The field before the colon is the resource’s *title,* which

Re: [Puppet Users] Bug when using array in file resource?

2012-02-13 Thread Nan Liu
On Mon, Feb 13, 2012 at 3:37 PM, Justin Lloyd jstn...@gmail.com wrote: I was wondering if I'd need to create a define() but the language guide's description seems misleading, at least to me. From the 6th paragraph of the Resources section:

Re: [Puppet Users] Bug when using array in file resource?

2012-02-13 Thread Justin Lloyd
Ok, thanks for the tip. On Mon, Feb 13, 2012 at 3:42 PM, Nan Liu n...@puppetlabs.com wrote: On Mon, Feb 13, 2012 at 3:37 PM, Justin Lloyd jstn...@gmail.com wrote: I was wondering if I'd need to create a define() but the language guide's description seems misleading, at least to me. From the

Re: [Puppet Users] Question about reusing classes/modules

2012-02-13 Thread Brian Gupta
I would say Global vars aren't necessarily evil. However, they ideally fit into a hierarchical structure, where one can have variable scoping with an ability to override global vars with more tightly scoped local overrides. Foreman, and Hiera support the ability to set the same variable at