[Puppet Users] Return value from a define?

2012-08-12 Thread Douglas Garstang
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 physical disks into one function, and pass the result of that to

Re: [Puppet Users] variable scoping?

2012-08-12 Thread Zachary Alex Stern
So, your explanation makes sense to me - but that doesn't exactly explain to me why the include statement isn't enough. E.g. when I'm including the puppet::params class in the puppet::config class, what affect is it having at all, if not setting things like the variables included in the

[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 = {

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

2012-08-12 Thread Erik Dalén
On 12 August 2012 08:30, Douglas Garstang doug.garst...@gmail.com 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

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

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

Re: [Puppet Users] variable scoping?

2012-08-12 Thread devzero2000
On Sun, Aug 12, 2012 at 2:43 PM, Eric Shamow e...@puppetlabs.com 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

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 faus...@gmail.com 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 = {

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

[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

[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

[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 #confine

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 of