[Puppet Users] using mco to manage puppet resources by class

2013-12-07 Thread Jay Christopherson
Has anyone successfully use the class selectors for the puppet MCollective plugin? Something like: $ mco puppet runonce --tags mysql::master >From the docs: *puppet_tags* *===* *Validates that a comma seperated list of tags are valid Puppet class names* * Author: R.I.Pienaar >* *

[Puppet Users] Re: scope question

2013-11-17 Thread Jay Christopherson
If I stick a "notify { "$version": }" into the define, it shows the expected value, so my issue appears to be scope access. On Sun, Nov 17, 2013 at 4:50 PM, Jay Christopherson wrote: > I have a parent class, a child class, and a defined type, like so: > &

[Puppet Users] scope question

2013-11-17 Thread Jay Christopherson
I have a parent class, a child class, and a defined type, like so: *init.pp*: class parent { create_resources(parent::versions, hiera('versions')) ... } *versions.pp:* define parent::versions($version) { } *child.pp*: class parent::child { include parent notify{ "${version}": } } (

Re: [Puppet Users] frustrating dependency problem

2013-11-16 Thread Jay Christopherson
oh damn. can't believe I missed that. On Sat, Nov 16, 2013 at 11:59 AM, Dan White wrote: > Rename the file “services.pp” to "myservice.pp” to match the defined type > > On Nov 16, 2013, at 1:52 PM, Jay Christopherson > wrote: > > I'm having a diffi

[Puppet Users] Re: frustrating dependency problem

2013-11-16 Thread Jay Christopherson
There is a typo in the example class - "ensure => running" doesn't apply to a package... sorry if that creates any confusion. On Sat, Nov 16, 2013 at 10:52 AM, Jay Christopherson wrote: > I'm having a difficult time with a dependency issue. Basically, I want to > b

[Puppet Users] frustrating dependency problem

2013-11-16 Thread Jay Christopherson
I'm having a difficult time with a dependency issue. Basically, I want to be able to call a defined type, but it's not working out so far. I have my manifests setup like this: init.pp: class foo { } bar.pp: class foo::bar { include foo package{ "test": e

[Puppet Users] Re: Failed to parse template, wrong number of arguments (create_resources)

2013-07-30 Thread Jay Christopherson
And I guess I solved my own issues. I muddled around and this syntax works: *<% scope['test::appcfg']['backends']['nodes'].each do |server| -%>* * <%= server %>* *<% end -%>* On Tue, Jul 30, 2013 at 11:32 AM, Jay Christopherson wrote: > O

[Puppet Users] Re: Failed to parse template, wrong number of arguments (create_resources)

2013-07-30 Thread Jay Christopherson
|server| -%>* * <%= server %>* *<% end -%>* but I can't quite seem to find the correct scope syntax to make it work. I've tried a few variations, but haven't hit on it yet. On Tue, Jul 30, 2013 at 10:32 AM, Jay Christopherson wrote: > I'm having some issues

[Puppet Users] Failed to parse template, wrong number of arguments (create_resources)

2013-07-30 Thread Jay Christopherson
I'm having some issues trying to track down a problem I'm having parsing a simple template, using create_resources and Hiera. Here's my setup (abridged): ../hieradata/settings.yaml: *global:* * variables:* *env: foo* * * *appSpecific:* * serverName: someServer* ../modules/test/manifests/

Re: [Puppet Users] Re: randomly changing template (hiera backed)

2013-03-14 Thread Jay Christopherson
Yep, a hash structure. I didn't even think to check whether Ruby hashes were ordered (I just assumed they would be), which should have been the first thing to check when I noticed that my results were unordered. Thanks for the info! On Thu, Mar 14, 2013 at 6:36 PM, Ellison Marks wrote: > each_

[Puppet Users] randomly changing template (hiera backed)

2013-03-14 Thread Jay Christopherson
I have a template that I'm using to build Memcache configs from. The template looks like this: USER="memcached" MAXCONN="1024" OPTIONS="" PIDDIR="/var/run/memcached" <% cachebins.each_pair do |bin, params| %> <%= bin.upcase %>_PORT="<%= params['port'] %>" <%= bin.upcase %>_CACHESIZE="<%= params[

Re: [Puppet Users] Re: hiera / create_resources / define

2013-03-11 Thread Jay Christopherson
Awesome, that's exactly what I was looking for. On Mon, Mar 11, 2013 at 11:02 AM, Ellison Marks wrote: > You don't have access to the configs variable What you do have access to > is the $title variable, which I think is what you want. This is > automatically set by puppet to the name of the def

Re: [Puppet Users] Re: hiera / create_resources / define

2013-03-11 Thread Jay Christopherson
So, this is mostly working now (thanks for the pointers!), but how can I reference the top level "configs" within my define? For example: configs: config1: Name: app1 WorkingDir: /var/app1 config2: Name: app2 WorkingDir: /var/app2 ... config100: Name: app100 Workin

Re: [Puppet Users] Re: hiera / create_resources / define

2013-03-08 Thread Jay Christopherson
Yes, sorry about the case mixing. That was a mis-paste. Thanks for the advice, I'll start working through your suggestions. On Fri, Mar 8, 2013 at 2:49 PM, Ellison Marks wrote: > Through create_resources, Name and WorkingDir are being passed to your > defined type as parameters. Your defined t

[Puppet Users] hiera / create_resources / define

2013-03-08 Thread Jay Christopherson
I'm trying to use create_resources to create a series of files with semi-custom content based on a template. This is what I have: foo.conf.erb: Name "<%= name %>" WorkingDir "<%= working_dir %>" ... a bunch of static entries YAML: configs: config1: Name: app1 WorkingDir: /var/a

[Puppet Users] undefined method 'to_sym' for ["", "]:Array

2010-06-07 Thread Jay Christopherson
I am running into a problem with my LDAP puppet setup with this error message: PuppetClient: err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not parse for environment DR: undefined method `to_sym' for ["ENV1", "ENV2"]:Array PuppetMaster: err: Could not parse for env