Re: [Puppet Users] The rewritten Puppet 2.7 language reference is live

2012-08-27 Thread Trevor Vaughan
Just to make this extra fun You CAN change variables after they've been assigned. If you assign a new value to the variable in a template, it will pick up the new value. Note that this should NOT be used as a feature but I'm sure it'll bite someone like it did me at some point since it lovel

Re: [Puppet Users] Re: Hiera, Hashes, and Create_resources

2012-08-27 Thread jcbollinger
On Monday, August 20, 2012 11:32:46 AM UTC-5, dkw wrote: > > Hi John: > > Thanks for your comments and instruction. More inline... > > On Fri, Aug 17, 2012 at 02:36:13PM -0700, jcbollinger wrote: > > > # cat common.yaml > > > --- > > > searchdomain: 'example.com' > > > ssh_auth

[Puppet Users] Re: Facter scripts and shell environment variables

2012-08-27 Thread jcbollinger
On Thursday, August 23, 2012 7:56:38 AM UTC-5, André Fernandes wrote: > > Thanks for the insight. > > I've been investigating a bit deeper and found that this is likely an > issue with the build of apache I'm using. > > I've run into the same problem with a "squid version" facter script and >

[Puppet Users] Fact based variables sowing up empty

2012-08-27 Thread llowder
I've got a single puppet master (2.7.19 + facter 1.6.11) controlling a number of nodes (2.7.17 + facter 1.6.8-10). On all of thse, fact absed variables work as expected (such as $::operatingsystem and $::fqdn). However, on my puppet master, when I run 'puppet agent --test' all fact based variab

[Puppet Users] FreeBSD $PACKAGESITE from -STABLE to -RELEASE

2012-08-27 Thread ftiff
Hi all, I'm using FreeBSD-9.0-RELEASE. When I install a package via puppet, it seems to use the -STABLE branches instead of -RELEASE. I can use pkg_add -r on the command-line, which will use the -RELEASE branch and break the dependencies. One workaround is to change the $PACKAGESITE variable t

[Puppet Users] class/define execution ordering

2012-08-27 Thread Tolbkni Kao
I am confused about the puppet class/define execution ordering. I wrote a module named 'mysql', manifests follow: *mysql/manifests/init.pp* > class mysql($base_dir='/usr/local/mysql') { > class { 'mysql::install': > base_dir => $base_dir, > } > } > *mysql/manifests/install.p

Re: [Puppet Users] FreeBSD $PACKAGESITE from -STABLE to -RELEASE

2012-08-27 Thread Christopher Wood
I use some package defaults: case $::operatingsystem { freebsd, solaris: { Package { provider => $operatingsystem ? { 'freebsd' => 'freebsd', 'solaris' => 'pkgutil', }, source => $operatingsystem ? { 'freebsd' => 'http://repos.me/pub/FreeBSD/ports/a

[Puppet Users] Re: Fact based variables sowing up empty

2012-08-27 Thread llowder
And this is fixed now... Just had to move my storeconfigs settings from [main] to [master] On Monday, August 27, 2012 11:00:48 AM UTC-5, llowder wrote: > > I've got a single puppet master (2.7.19 + facter 1.6.11) controlling a > number of nodes (2.7.17 + facter 1.6.8-10). On all of thse, fact a

Re: [Puppet Users] Re: Configuring hosts with data from other hosts

2012-08-27 Thread Ohad Levy
On Sun, Aug 19, 2012 at 10:31 AM, treydock wrote: > Ive struggled with the same problem of distributing variables and other > generated data amongst hosts. > > For external resources Ive found a great use in configuring a BackupPC > server. Each node builds their backup configuration file with t

Re: [Puppet Users] Re: Getting all variable occurrences from Hiera

2012-08-27 Thread jcbollinger
On Friday, August 17, 2012 1:26:21 PM UTC-5, Tim Mooney wrote: > > > Consider: > > :hierarchy: - secure/fqdn/%{clientcert} > - fqdn/%{clientcert} > - secure/location/%{location} > - location/%{location} > - secure/common > - c

[Puppet Users] Re: Default node

2012-08-27 Thread jcbollinger
On Friday, August 17, 2012 4:27:00 PM UTC-5, Douglas wrote: > > Seems like nodes are matching the default node before they are > matching the more specific nodes. My site.pp has: > > include "nodes/*.pp" > Do you mean "import" where you wrote "include"? Because "import" is what you should

[Puppet Users] Re: erb template test if value in array

2012-08-27 Thread jcbollinger
On Tuesday, August 21, 2012 10:42:16 AM UTC-5, LTH wrote: > > In an .erb template, I want to test if a value is in an array (and if yes > do something). > > I thought the way to do it might me something like: > > <% if @testservers.include? @fqdn %> > environment = test > <% else %> > environmen

[Puppet Users] Re: Using Virtual Resource in custom resource type

2012-08-27 Thread jcbollinger
On Tuesday, August 21, 2012 1:56:46 PM UTC-5, Douglas Brancaglion wrote: > > Hi! > > I am facing difficulties in using the virtual resource types in resorce > custom [...] > What exactly is the nature of the problem? It looks like maybe your post was truncated. John -- You received this me

Re: [Puppet Users] The rewritten Puppet 2.7 language reference is live

2012-08-27 Thread Nick Fagerlund
On Sunday, August 26, 2012 6:44:25 PM UTC-7, Henrik Lindberg wrote: > > I just tested on puppet 2.7.14... > > puppet apply -e '$x = 1 $y =2 $b="x${$x+$y}x" notice($b)' > notice: Scope(Class[main]): x3x > notice: Finished catalog run in 0.01 seconds > > And > > puppet apply -e '$x = 1 $y =2

Re: [Puppet Users] The rewritten Puppet 2.7 language reference is live

2012-08-27 Thread Nick Fagerlund
On Monday, August 27, 2012 7:09:39 AM UTC-7, Trevor Vaughan wrote: > > Just to make this extra fun > > You CAN change variables after they've been assigned. > > If you assign a new value to the variable in a template, it will pick > up the new value. > > Ah ha, but templates are not part

[Puppet Users] Re: Hiera, OSSEC and per-node stuff?

2012-08-27 Thread jcbollinger
On Wednesday, August 22, 2012 2:47:57 PM UTC-5, Jakov Sosic wrote: > > Hi. > > I have an interesting use case. > > OSSEC is security tool based on server-client architecture. Server > generates keys for agents, and every agent has different key. > > Now I want to distribute these keys via pup

Re: [Puppet Users] Re: puppetlabs apache module syntax errors

2012-08-27 Thread Ryan Coleman
On Sun, Aug 26, 2012 at 6:22 PM, Shantanu wrote: > Thanks for the reply Ryan. I haven't made any changes after cloning > this module (commit 66d5ce9ae). Following are contents of dav_fs > manifest file: > > $ cat /etc/puppet/modules/apache/manifests/mod/dav_fs.pp > class apache::mod::dav_fs { >

[Puppet Users] Re: Job Listing - Linux Admin in Boulder, CO

2012-08-27 Thread Michael Schmitt
I'd definitely be interested, but I'm only a junior admin. I have about 2 years of experience and I'm still learning. I'd love to get my foot in the door though. Even if I'm not a good fit for this, does anyone know somewhere I could do this and improve my skills? -- You received this messa

Re: [Puppet Users] The rewritten Puppet 2.7 language reference is live

2012-08-27 Thread Trevor Vaughan
I get it, but it would be nice to explicitly tell people to be careful about this when talking about variables and pitfalls. Trevor On Mon, Aug 27, 2012 at 2:43 PM, Nick Fagerlund wrote: > > > On Monday, August 27, 2012 7:09:39 AM UTC-7, Trevor Vaughan wrote: >> >> Just to make this extra fun...

[Puppet Users] Re: Hiera Hash

2012-08-27 Thread jcbollinger
On Wednesday, August 22, 2012 9:22:04 PM UTC-5, Jarod Watkins wrote: > > Sorry, I should explained my issue: > > class apache ( > $apache = hiera_hash('apache'), > $mpm= $apache['mpm'], > ) > > This code will produce the following error: > > Could not retrieve catalog from remote server:

Re: [Puppet Users] The rewritten Puppet 2.7 language reference is live

2012-08-27 Thread Nick Fagerlund
On Monday, August 27, 2012 11:55:23 AM UTC-7, Trevor Vaughan wrote: > > I get it, but it would be nice to explicitly tell people to be careful > about this when talking about variables and pitfalls. > Okay, fair point. I'll put a note. -- You received this message because you are subscribed

[Puppet Users] Append string to list items.

2012-08-27 Thread Douglas Garstang
I have an array: $nodes = ['gfs01' ,'gfs02', 'gfs03', 'gfs04] and a string variable: $brick_store = "/var/bricks" How can I append "/var/bricks" to each item in the array? Lack of a looping construct makes this challenging in puppet. Such that: brick_array = ['gfs01:/var/bricks', 'gfs02:/var/

Re: [Puppet Users] Dependencies between defines

2012-08-27 Thread jcbollinger
On Thursday, August 23, 2012 12:59:32 AM UTC-5, Douglas wrote: > > On Wed, Aug 22, 2012 at 6:06 AM, Martin Alfke > > wrote: > > > > On 22.08.2012, at 14:27, Axel Bock wrote: > > > > Hi readers > > > > another question for my little puppet project: Can I (and if yes, how) > > define depend

Re: [Puppet Users] Re: how to connect agent to the master through a different user to execute a command through puppet module

2012-08-27 Thread jcbollinger
On Thursday, August 23, 2012 8:05:20 AM UTC-5, Prosenjit Ghosh wrote: > > Hi Nick, > > Your suggestion is not working. > > Actually when we try to connect the agent to the puppet through a > different user, no ssl directory got created under /var/lib/puppet in > agent side. > > Can you provi

Re: [Puppet Users] Append string to list items.

2012-08-27 Thread Trevor Vaughan
Try using regsubst: http://docs.puppetlabs.com/references/stable/function.html#regsubst On Mon, Aug 27, 2012 at 3:03 PM, Douglas Garstang wrote: > I have an array: > > $nodes = ['gfs01' ,'gfs02', 'gfs03', 'gfs04] > > and a string variable: > > $brick_store = "/var/bricks" > > How can I append "/v

[Puppet Users] PuppetConf 2012 -- Last day for early bird pricing

2012-08-27 Thread Michael Stahnke
It's the time of year again where we gather the Puppet faithful from around the world and hold PuppetConf. What started last year in Portland is moving to San Francisco this year, with a bigger venue, more tracks and amazing speakers. PuppetConf 2012 takes place in San Francisco, from September 27

[Puppet Users] Re: Module runs but doesn't apply changes

2012-08-27 Thread jcbollinger
On Friday, August 24, 2012 5:32:57 AM UTC-5, Matthew Smith wrote: > > Hi, > > I've been looking at an odd issue, we have a module that I can prove is > being loaded and run on both the agent and server end but no changes are > being made. > > I have validated that changes should have been appli

[Puppet Users] Node definition against list in an array?

2012-08-27 Thread Bruce
Hi, I have several large lists of nodes which have very dissimilar (almost random) hostnames, but the exact same puppet definitions. Is it possible to define them in arrays, and then do something like node $array_of_nodes { include foo include bar } node $array_of_nodes2 { include woz } Is

Re: [Puppet Users] Append string to list items.

2012-08-27 Thread Douglas Garstang
Trevor, Thanks. I'm getting 'bad target Array' with: define glusterfs::volume_create ( $brick_store, $nodes, $replicas='1', $transport='tcp' ) { . $n2 = regsubst ($nodes, '$', ":$brick_store") # Bad target array here. notice ("bricks = $n2") } On entering the define, $nodes = ['gfs

Re: [Puppet Users] The rewritten Puppet 2.7 language reference is live

2012-08-27 Thread jcbollinger
On Friday, August 24, 2012 6:02:54 PM UTC-5, Nick Fagerlund wrote: > > Yeah that reply isn't coming back. Anyway, I was totally hoping you'd > chime in with some holes you found. :) > > On Friday, August 24, 2012 6:33:01 AM UTC-7, Henrik Lindberg wrote: > >> - Arrays and Hashes are mutable; whic

Re: [Puppet Users] Append string to list items.

2012-08-27 Thread Ashley Penney
You could give inline_template() from stdlib a try instead. You could do: $nodes = ['gfs01' ,'gfs02', 'gfs03', 'gfs04] $brick_store = "/var/bricks" $new = inline_template('nodes.each {|n| etc etc etc') I'm not 100% sure it'll work in this case but I've done other similar evil things with inline_

Re: [Puppet Users] logoutput=>on_failure doesn't work as expected

2012-08-27 Thread Jo Rhett
I think you are using the syntax wrong. Try to phrase your request in statements like "ensure this is true" instead of if/then case logic. ensure foo requires bar Also remember that the server doesn't know anything about the client, and the client's information is only collected on

Re: [Puppet Users] Append string to list items.

2012-08-27 Thread jcbollinger
On Monday, August 27, 2012 3:06:30 PM UTC-5, Douglas wrote: > > Trevor, > > Thanks. I'm getting 'bad target Array' with: > > define glusterfs::volume_create ( $brick_store, $nodes, $replicas='1', > $transport='tcp' ) { > . > > $n2 = regsubst ($nodes, '$', ":$brick_store") # Bad targ

[Puppet Users] Re: Node definition against list in an array?

2012-08-27 Thread jcbollinger
On Monday, August 27, 2012 2:29:10 PM UTC-5, Bruce wrote: > > Hi, > > I have several large lists of nodes which have very dissimilar (almost > random) hostnames, but the exact same puppet definitions. Is it possible > to define them in arrays, and then do something like > > node $array_of_node

[Puppet Users] Loading Hiera into array/hash

2012-08-27 Thread Douglas Garstang
This is driving me crazy. I'm trying to load the nodes array into a puppet array with hiera. Hiera seems to always flatten an array or a hash to a string, with no delimiter in between, which makes it hard to split into an array later on. The hiera_hash and hiera_array functions only take a single

Re: [Puppet Users] Re: Announce: Puppet 3.0.0-rc4 Available

2012-08-27 Thread Eric Sorenson
I just published the saved query that lists these tickets, for a little nicer URL: https://projects.puppetlabs.com/projects/puppet/issues?query_id=263 On Saturday, August 25, 2012 10:40:59 AM UTC-7, Justin Stoller wrote: > > On Sat, Aug 25, 2012 at 3:45 AM, Sandra Schlichting > > wrote: > > Do

Re: [Puppet Users] The rewritten Puppet 2.7 language reference is live

2012-08-27 Thread Nick Fagerlund
On Monday, August 27, 2012 1:20:53 PM UTC-7, jcbollinger wrote: > > > D:< EWW. "Problematic" is putting it mildly, especially since behavior is >> inconsistent between arrays and hashes. (Both can add, only arrays can >> reassign to existing indexes.) But I'd better document it anyhow. >> > >

[Puppet Users] Exec{} keeps running

2012-08-27 Thread Douglas Garstang
Argh. I have the definition below. The gluster peer probe command has already been executed successfully, and I'm testing it with 'peer status'. Running the unless=> command yields: root@gfs01:~# /usr/sbin/gluster peer status | /bin/grep gfs02.us1.xxx.com Hostname: gfs02.us1.xxx.com root@gfs01:~#

[Puppet Users] Broken pipe?

2012-08-27 Thread awu
Hi, sorry if these seem really noobish questions. I just recently started trying to get mcollective working. I'm trying to do "mco ping" from my client and I get the following output debug 2012/08/27 15:32:13: pluginmanager.rb:167:in `loadclass' Loading Mcollective::Facts::Yaml_facts from mcolle

Re: [Puppet Users] logoutput=>on_failure doesn't work as expected

2012-08-27 Thread Alison Lindberg
Thank you for replying, Jo ! And yes, the resultant errors (once I got the service dependency to actually fail when the file wasn't found) are also not desireable as its misleading and creates to much verbosity(and alarm for any admin seeing) in the client syslog. I will give it a try...albiet I p

Re: [Puppet Users] The rewritten Puppet 2.7 language reference is live

2012-08-27 Thread Henrik Lindberg
On 2012-28-08 24:34, Nick Fagerlund wrote: ...blurry... ...ticket tracker ... outstanding bug ...DON'T DO THIS... Ah, which reminded me about the fun and games that can be played with node inheritance and regular expressions. There is a bug logged for that. Problem being that a node can inh

[Puppet Users] Array References?

2012-08-27 Thread Douglas Garstang
The first notice command shows the array as having two elements. The second notice command shows the same array as having only one element. Some sort of variable reference thing? How can I make a copy of the $nodes array rather than make a reference to it? notice ("NODES1=$nodes") $n2 = $n