[Puppet Users] Variables and scope with inherits

2012-08-12 Thread Svein
I want to have a parametrized class with lookup from params.pp but I keep getting into problems. init.pp: class foo ( $bar = $foo::params::bar, $foofoo = $foo::params::foofoo ) inherits foo::params { file {'/tmp/foobar': content => template("foo/foobar.erb"), } } params: class f

Re: [Puppet Users] puppet class and user groups question

2012-08-12 Thread devzero2000
For situation like this define the group as a virtual group , better yet define a module that contain the virtual group including it in your class and "realize" it when necessary. Or sometime better use the "spaceship" operator if you want to realize with a command multiple user resources, virtual

[Puppet Users] Re: Ruby Facter.add syntax please help

2012-08-12 Thread karl
have now found the solution so not to worry thanks. problem was that a extra "end" was missing On Monday, August 13, 2012 2:01:07 PM UTC+10, karl wrote: > > Hi, > > Please could someone take a look at the below code and tell me where it is > failing ? > > Facter.add('syslocation') do > #

[Puppet Users] puppet class and user groups question

2012-08-12 Thread Andrew
Hi all, so, summary: I am cant think of a way to supply group creds on the same group to two different classes that both require access to the ssl certificates. The ssl certs are group but not world accessible, 'mode => 660'. I have ldap doing tls, in one class, so the ldap user needs to be in t

[Puppet Users] Ruby Facter.add syntax please help

2012-08-12 Thread karl
Hi, Please could someone take a look at the below code and tell me where it is failing ? Facter.add('syslocation') do #confine :kernel => "Linux" setcode do name = Facter.value('hostname') case name when /^e(t|d|u|s|p|q)(p|v)(sol|lin)\d+/ "E DC"

Re: [Puppet Users] syntax change or regression?

2012-08-12 Thread Trevor Vaughan
Though not elegant, you could also run it through an inline template. Alternatively, you could write a puppet function that manipulates your data structure appropriately and returns an appropriate answer for you to use in your selector. Trevor On Sun, Aug 12, 2012 at 1:11 PM, Justin Stoller wro

Re: [Puppet Users] syntax change or regression?

2012-08-12 Thread Justin Stoller
On Sun, Aug 12, 2012 at 1:35 AM, Samuel José Martín wrote: > > Hi, > > I am using puppet to generate ipsec tunnels configuration on OpenBSDs > gateways. > Having a bunch of offices, I did something like this: > > $enc = $office ? > { > "paris" => > { > "lond

Re: [Puppet Users] variable scoping?

2012-08-12 Thread devzero2000
On Sun, Aug 12, 2012 at 2:43 PM, Eric Shamow wrote: > First off, it's important to distinguish import from include. They "feel" > like similar concepts but they're not - import goes and physically loads a > file. Include says "ensure that this class is part of this host's resource > graph." > It

Re: [Puppet Users] Installing Modules.

2012-08-12 Thread Dan White
First suggestion: Update your Puppet to 2.7.14+ Then this will work: http://docs.puppetlabs.com/puppet/2.7/reference/modules_installing.html#installing-from-the-puppet-forge Contrarywise, you go here: https://github.com/puppetlabs/puppetlabs-lvm and click on the button that says "Zip" with the pic

Re: [Puppet Users] variable scoping?

2012-08-12 Thread Eric Shamow
First off, it's important to distinguish import from include. They "feel" like similar concepts but they're not - import goes and physically loads a file. Include says "ensure that this class is part of this host's resource graph." It's important not to think of Puppet in procedural, top-down te

Re: [Puppet Users] Return value from a define?

2012-08-12 Thread Erik Dalén
On 12 August 2012 08:30, Douglas Garstang wrote: > So, general puppet design question. I have a definition called > create_vg that creates an lvm volume group. An input to this is > obviously the list of physical disks. In a normal programming > language, I'd put the identification of the physica

[Puppet Users] syntax change or regression?

2012-08-12 Thread Samuel José Martín
Hi, I am using puppet to generate ipsec tunnels configuration on OpenBSDs gateways. Having a bunch of offices, I did something like this: $enc = $office ? { "paris" => { "london" => "aes", "kiev" => "3des" }, "london" =