[Puppet Users] MCollective Cost?

2012-02-01 Thread Douglas Garstang
Someone told me yesterday that collective wasn't free, New to me. Has
something changed in the past month, or are they looking at the
commercial version? The web site must be somewhat confusing if a new
user thinks it costs, but it doesn't.

Doug

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Mcollective for OpenSUSE

2012-03-14 Thread Douglas Garstang
Sorry if there's an mcollective mailing list...

So, I'm working for a company that using OpenSUSE, which in my opinion
is a very bad idea.

Anyway, how can I get collective for OpenSUSE that doesn't involve
using tarballs? It's not in the standard OpenSUSE repo's. Does someone
else have a repo? Are there spec files for building RPM's in the
tarball?

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Mcollective for OpenSUSE

2012-03-14 Thread Douglas Garstang
On Wed, Mar 14, 2012 at 9:59 AM, Darin Perusich  wrote:
> There's a .spec in the tarball that builds cleanly when you comment
> out the two %defines and manually set the version and release. The
> %defines cause a "Too many levels of recursion in macro expansion."
> error.

Darin,

I haven't gone backed and looked at the spec file, but when you
attempt to install mcollective-common, it barfs because it can't find
the rubygems-stomp dependency, which doesn't seem to exist on
OpenSUSE. Since OpenSUSE also uses RPM's, it would be nice if the
people that wrote the spec file could have written to build clean
RPM's, not just RPM's that work only on CentOS/Redhat.

Douglas.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Mcollective for OpenSUSE

2012-03-14 Thread Douglas Garstang
On Wed, Mar 14, 2012 at 12:37 PM, Darin Perusich  wrote:
> Hi Douglas,
>
>
> On Wed, Mar 14, 2012 at 3:22 PM, Douglas Garstang
>  wrote:
>> On Wed, Mar 14, 2012 at 9:59 AM, Darin Perusich  wrote:
>>> There's a .spec in the tarball that builds cleanly when you comment
>>> out the two %defines and manually set the version and release. The
>>> %defines cause a "Too many levels of recursion in macro expansion."
>>> error.
>>
>> Darin,
>>
>> I haven't gone backed and looked at the spec file, but when you
>> attempt to install mcollective-common, it barfs because it can't find
>> the rubygems-stomp dependency, which doesn't seem to exist on
>> OpenSUSE. Since OpenSUSE also uses RPM's, it would be nice if the
>> people that wrote the spec file could have written to build clean
>> RPM's, not just RPM's that work only on CentOS/Redhat.
>>
>
> rubygems-stomp is available in the devel:languages:ruby:extensions
> repository, link below, so you can download/install the rpm from there
> or add the repo to you system. I have this repo installed on the
> system I built mcollective on so stomp was available.
>
> Also, you can search all the available opensuse repo's for packages at
> http://software.opensuse.org/search.
>
> http://download.opensuse.org/repositories/devel:/languages:/ruby:/extensions/

Any idea where that is via rsync? This yields nothing:

rsync -avrt rsync://rsync.opensuse.org/opensuse-full | grep rubygem-stomp

Copying files from a repo without anything except rsync isn't really feasible.

Douglas.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] mcollective bits

2012-03-19 Thread Douglas Garstang
I've always found the mcollective docs at
http://docs.puppetlabs.com/mcollective/reference/basic/gettingstarted.html
very confusing.

What _exactly_ goes on the client (i.e. the remote system)? The docs
talk about editing both the server.cfg and the client.cfg files. The
server.cfg file is part of the collective package and the client.cfg
file is part of the client.cfg package. However, I though the client
package was installed on the single querying system? As you can see,
it's all quite confusing and the documentation doesn't clearly explain
it.

Doug

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] extlookup can't match key.

2012-03-19 Thread Douglas Garstang
I have a 2.7.6 server and a 2.6.4 client. I'm trying to use ext_lookup.

site.pp:
$extlookup_datadir = "/etc/puppet/manifests/extdata"
$extlookup_precedence = ["%{fqdn}", "domain_%{domain}", "common"]

/etc/puppet/manifests/extdata/common.csv:
key1,var1:

manifest has:
$var1 = extlookup(“key1”, "Unknown”)

I'm getting error:
err: Could not match “key1”, at
/etc/puppet/modules/function/manifests/common.pp:3 on node
abc.aws.ixxx.com

What's up?

Doug

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] extlookup can't match key.

2012-03-20 Thread Douglas Garstang
On Mon, Mar 19, 2012 at 5:53 PM, Gary Larizza  wrote:
>
>
> On Tue, Mar 20, 2012 at 11:35 AM, Douglas Garstang 
> wrote:
>>
>> I have a 2.7.6 server and a 2.6.4 client. I'm trying to use ext_lookup.
>>
>> site.pp:
>> $extlookup_datadir = "/etc/puppet/manifests/extdata"
>> $extlookup_precedence = ["%{fqdn}", "domain_%{domain}", "common"]
>
>
> Try using Puppet variables:  [$fqdn, "domain_${domain}", 'common']

Tried. Still getting the same error. I don't think it's even
recognizing ext lookup(). Wasn't that functionality added in puppet
2.6? Btw, what I originally had was copied straight from the docs.

Doug

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] extlookup can't match key.

2012-03-20 Thread Douglas Garstang
On Tue, Mar 20, 2012 at 7:33 AM, Douglas Garstang
 wrote:
> On Mon, Mar 19, 2012 at 5:53 PM, Gary Larizza  wrote:
>>
>>
>> On Tue, Mar 20, 2012 at 11:35 AM, Douglas Garstang 
>> wrote:
>>>
>>> I have a 2.7.6 server and a 2.6.4 client. I'm trying to use ext_lookup.
>>>
>>> site.pp:
>>> $extlookup_datadir = "/etc/puppet/manifests/extdata"
>>> $extlookup_precedence = ["%{fqdn}", "domain_%{domain}", "common"]
>>
>>
>> Try using Puppet variables:  [$fqdn, "domain_${domain}", 'common']
>
> Tried. Still getting the same error. I don't think it's even
> recognizing ext lookup(). Wasn't that functionality added in puppet
> 2.6? Btw, what I originally had was copied straight from the docs.
>
> Doug

I get the same error if I replace ext lookup with xxx. It seems like
the function isn't there, yet the docs clearly state it was added in
puppet 2.6.1, and my server is 2.7.6 and my client is 2.6.4...

Doug

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] extlookup can't match key.

2012-03-20 Thread Douglas Garstang
On Tue, Mar 20, 2012 at 8:03 AM, Douglas Garstang
 wrote:
> On Tue, Mar 20, 2012 at 7:33 AM, Douglas Garstang
>  wrote:
>> On Mon, Mar 19, 2012 at 5:53 PM, Gary Larizza  wrote:
>>>
>>>
>>> On Tue, Mar 20, 2012 at 11:35 AM, Douglas Garstang 
>>> wrote:
>>>>
>>>> I have a 2.7.6 server and a 2.6.4 client. I'm trying to use ext_lookup.
>>>>
>>>> site.pp:
>>>> $extlookup_datadir = "/etc/puppet/manifests/extdata"
>>>> $extlookup_precedence = ["%{fqdn}", "domain_%{domain}", "common"]
>>>
>>>
>>> Try using Puppet variables:  [$fqdn, "domain_${domain}", 'common']
>>
>> Tried. Still getting the same error. I don't think it's even
>> recognizing ext lookup(). Wasn't that functionality added in puppet
>> 2.6? Btw, what I originally had was copied straight from the docs.
>>
>> Doug
>
> I get the same error if I replace ext lookup with xxx. It seems like
> the function isn't there, yet the docs clearly state it was added in
> puppet 2.6.1, and my server is 2.7.6 and my client is 2.6.4...
>
> Doug

Jeez... it shouldn't be this damn hard...

Doug

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] extlookup can't match key.

2012-03-20 Thread Douglas Garstang
On Tue, Mar 20, 2012 at 9:55 AM, Nan Liu  wrote:
> On Tue, Mar 20, 2012 at 9:33 AM, Douglas Garstang
>  wrote:
>> On Tue, Mar 20, 2012 at 8:03 AM, Douglas Garstang
>>  wrote:
>>> On Tue, Mar 20, 2012 at 7:33 AM, Douglas Garstang
>>>  wrote:
>>>> On Mon, Mar 19, 2012 at 5:53 PM, Gary Larizza  wrote:
>>>>>
>>>>>
>>>>> On Tue, Mar 20, 2012 at 11:35 AM, Douglas Garstang 
>>>>> 
>>>>> wrote:
>>>>>>
>>>>>> I have a 2.7.6 server and a 2.6.4 client. I'm trying to use ext_lookup.
>>>>>>
>>>>>> site.pp:
>>>>>> $extlookup_datadir = "/etc/puppet/manifests/extdata"
>>>>>> $extlookup_precedence = ["%{fqdn}", "domain_%{domain}", "common"]
>>>>>
>>>>>
>>>>> Try using Puppet variables:  [$fqdn, "domain_${domain}", 'common']
>>>>
>>>> Tried. Still getting the same error. I don't think it's even
>>>> recognizing ext lookup(). Wasn't that functionality added in puppet
>>>> 2.6? Btw, what I originally had was copied straight from the docs.
>>>>
>>>> Doug
>>>
>>> I get the same error if I replace ext lookup with xxx. It seems like
>>> the function isn't there, yet the docs clearly state it was added in
>>> puppet 2.6.1, and my server is 2.7.6 and my client is 2.6.4...
>
> If you replace extlookup with xxx it should error:
> $ puppet apply -e " notice(xxx('key1','unknown'))"
> Unknown function xxx at line 1 ...
>
> $ puppet apply -e "notice(extlookup('key1','unknown'))"
> notice: Scope(Class[main]): unknown
> notice: Finished catalog run in 0.04 seconds
>
> Feel free to try the one line example above, it doesn't seem like it's
> compiling the manifest you are describing.

So, now it's working. _after_ I upgraded the client to 2.7.6...

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] OpenSUSE weirdness.

2012-03-20 Thread Douglas Garstang
I'm having some weird issues with puppet 2.7.6 on OpenSUSE.

When I run puppet in the foreground, it's all fine. However, when I
run it as a service, all that get's logged is:

abc:/var/log/puppet # cat puppet.log
Tue Mar 20 10:11:57 -0700 2012 Puppet (warning): iconv doesn't seem to
support UTF-8/UTF-16 conversions
Tue Mar 20 10:11:58 -0700 2012 Puppet (notice): Reopening log files
Tue Mar 20 10:11:57 -0700 2012 Puppet (warning): iconv doesn't seem to
support UTF-8/UTF-16 conversions

Although, it seems to be running fine. When I stop the daemon, the
following is immediately flushed to puppet.log:

Tue Mar 20 10:12:47 -0700 2012 Puppet (notice): Starting Puppet client
version 2.7.6
Tue Mar 20 10:12:48 -0700 2012 Puppet (err): Could not retrieve
catalog from remote server: getaddrinfo: Name or service not known
Tue Mar 20 10:12:48 -0700 2012 Puppet (notice): Using cached catalog
Tue Mar 20 10:12:50 -0700 2012
/Stage[main]/Sudo::Common/File[/etc/sudoers] (err): Could not
evaluate: getaddrinfo: Name or service not known Could not retrieve
file metadata for puppet:///modules/sudo/etc/sudoers: getaddrinfo:
Name or service not known at
/etc/puppet/modules/sudo/manifests/common.pp:17
Tue Mar 20 10:12:51 -0700 2012
/Stage[main]/Snmp::Agent/File[/etc/snmp/snmpd.conf] (err): Could not
evaluate: getaddrinfo: Name or service not known Could not retrieve
file metadata for puppet:///modules/snmp/etc/snmp/snmpd.conf:
getaddrinfo: Name or service not known at
/etc/puppet/modules/snmp/manifests/agent.pp:26
Tue Mar 20 10:12:51 -0700 2012 /Stage[main]/Snmp::Agent/Service[snmpd]
(notice): Dependency File[/etc/snmp/snmpd.conf] has failures: true
Tue Mar 20 10:12:51 -0700 2012 /Stage[main]/Snmp::Agent/Service[snmpd]
(warning): Skipping because of failed dependencies
Tue Mar 20 10:12:51 -0700 2012
/Stage[main]/Ssh::Server/File[/etc/ssh/sshd_config] (err): Could not
evaluate: getaddrinfo: Name or service not known Could not retrieve
file metadata for puppet:///modules/ssh/etc/ssh/sshd_config:
getaddrinfo: Name or service not known at
/etc/puppet/modules/ssh/manifests/server.pp:26
Tue Mar 20 10:12:51 -0700 2012 /Stage[main]/Ssh::Server/Service[sshd]
(notice): Dependency File[/etc/ssh/sshd_config] has failures: true
Tue Mar 20 10:12:51 -0700 2012 /Stage[main]/Ssh::Server/Service[sshd]
(warning): Skipping because of failed dependencies
Tue Mar 20 10:12:51 -0700 2012
/Stage[main]/Mcollective::Agent/File[/usr/libexec/mcollective/mcollective/agent/package.rb]
(err): Could not evaluate: getaddrinfo: Name or service not known
Could not retrieve file metadata for
puppet:///modules/mcollective/agent/package.rb: getaddrinfo: Name or
service not known at
/etc/puppet/modules/mcollective/manifests/agent.pp:43
Tue Mar 20 10:12:51 -0700 2012
/Stage[main]/Mcollective::Agent/Service[mcollective] (notice):
Dependency File[/usr/libexec/mcollective/mcollective/agent/package.rb]
has failures: true
Tue Mar 20 10:12:51 -0700 2012
/Stage[main]/Mcollective::Agent/Service[mcollective] (warning):
Skipping because of failed dependencies
Tue Mar 20 10:12:51 -0700 2012
/Stage[main]/Postfix::Server/File[/etc/postfix/main.cf] (err): Could
not evaluate: getaddrinfo: Name or service not known Could not
retrieve file metadata for
puppet:///modules/postfix/etc/postfix/main.cf: getaddrinfo: Name or
service not known at
/etc/puppet/modules/postfix/manifests/server.pp:27
Tue Mar 20 10:12:51 -0700 2012
/Stage[main]/Postfix::Server/Service[postfix] (notice): Dependency
File[/etc/postfix/main.cf] has failures: true
Tue Mar 20 10:12:51 -0700 2012
/Stage[main]/Postfix::Server/Service[postfix] (warning): Skipping
because of failed dependencies
Tue Mar 20 10:12:51 -0700 2012 Puppet (notice): Finished catalog run
in 1.82 seconds
Tue Mar 20 10:12:52 -0700 2012 Puppet (err): Could not send report:
getaddrinfo: Name or service not known
Tue Mar 20 10:13:24 -0700 2012 Puppet (notice): Caught TERM; calling stop

I'm rather confused. I tried putting autoflush = true in the [user]
section of puppet.conf but it had no effect. I also don't know why
those name service errors are occurring.

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Relative Symlinks

2012-03-21 Thread Douglas Garstang
Is there any way to get relative symlinks in puppet?

This:

file {
"tomcat-current":
#"/opt/foo/apache-tomcat-current":
ensure => link,
target => "/opt/foo/apache-tomcat-${tomcat_version}";
}

yields:

Wed Mar 21 09:58:05 -0700 2012 Puppet (err): Failed to apply catalog:
Parameter path failed: File paths must be fully qualified, not
'tomcat-current' at
/etc/puppet/env/development/modules/tomcat7/manifests/server.pp:18

Doug

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Relative Symlinks

2012-03-21 Thread Douglas Garstang
Thanks.

On Wed, Mar 21, 2012 at 10:04 AM, Christopher Wood
 wrote:
> $ cat /tmp/symlink.pp
> file { '/tmp/link_to_zz':
>  ensure => link,
>  target => 'zz',
> }
> $ puppet /tmp/symlink.pp
> notice: /Stage[main]//File[/tmp/link_to_zz]/ensure: created
> $ ls -l /tmp/link_to_zz
> lrwxrwxrwx 1 cwood cwood 2 Mar 21 13:03 /tmp/link_to_zz -> zz
>
> (ln target linkname)
>
> On Wed, Mar 21, 2012 at 09:59:50AM -0700, Douglas Garstang wrote:
>> Is there any way to get relative symlinks in puppet?
>>
>> This:
>>
>>     file {
>>         "tomcat-current":
>>         #"/opt/foo/apache-tomcat-current":
>>             ensure => link,
>>             target => "/opt/foo/apache-tomcat-${tomcat_version}";
>>     }
>>
>> yields:
>>
>> Wed Mar 21 09:58:05 -0700 2012 Puppet (err): Failed to apply catalog:
>> Parameter path failed: File paths must be fully qualified, not
>> 'tomcat-current' at
>> /etc/puppet/env/development/modules/tomcat7/manifests/server.pp:18
>>
>> Doug
>>
>> --
>> 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 
>> puppet-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/puppet-users?hl=en.
>>
>>
>
> --
> 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 
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/puppet-users?hl=en.
>



-- 
Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garst...@gmail.com
Cell: +1-805-340-5627

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Module in maintenance mode

2011-06-21 Thread Douglas Garstang
All,

I have a module that I would like to set a variable for, and then if that is
variable is set, consider the module (which deploys software), in
'maintenance mode', where it drops out of the module, and moves into the
next module, kind of like a return function. Can puppet do that? I don't
want to use fail() as it stops ALL puppet processing.

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Module in maintenance mode

2011-06-21 Thread Douglas Garstang
Oh... right... of course... Put the logic one level up... That will work. Thanks

On Jun 21, 2011, at 5:54 PM, Patrick  wrote:

> 
> On Jun 21, 2011, at 5:04 PM, Douglas Garstang wrote:
> 
>> All,
>> 
>> I have a module that I would like to set a variable for, and then if that is 
>> variable is set, consider the module (which deploys software), in 
>> 'maintenance mode', where it drops out of the module, and moves into the 
>> next module, kind of like a return function. Can puppet do that? I don't 
>> want to use fail() as it stops ALL puppet processing.
> 
> Well, this Pesudo-code should work:
> 
> 
> 
> init.pp
> class my_module {
> 
>   $module_is_enabled = true
> 
>   if( $module_is_enabled ) {
>   include my_module::content
>   }
> 
> }
> 
> content.pp:
> class my_module::content {
> 
>   Put real content here
> }
> 
> -- 
> 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 
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/puppet-users?hl=en.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Puppet Dashboard without MySQL

2011-06-27 Thread Douglas Garstang
All,

Can puppet dashboard be used WITHOUT MySQL?

Can't find it documented here:

http://docs.puppetlabs.com/guides/installing_dashboard.html#external_node_classification

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Puppet Dashboard without MySQL

2011-06-27 Thread Douglas Garstang
Oh. That's a deal breaker. :( Makes the puppet dashboard unusable.

On Mon, Jun 27, 2011 at 10:32 AM, Jacob Helwig  wrote:

> On Mon, 27 Jun 2011 10:24:38 -0700, Douglas Garstang wrote:
> >
> > All,
> >
> > Can puppet dashboard be used WITHOUT MySQL?
> >
> > Can't find it documented here:
> >
> >
> http://docs.puppetlabs.com/guides/installing_dashboard.html#external_node_classification
> >
> > Doug.
> >
>
> There are some MySQLisms in the currently released versions of Dashboard
> that we're working on getting rid of, but right now Dashboard does need
> MySQL to work properly.
>
> If all you're interested is external node classification (and not the
> report collection) then you might be able to get away with using
> something else, as long as you don't mind certain pages blowing up.
>
> I haven't actually tried this though, and I'm fairly certain that the
> main page is one of the ones that will blow up.
>
> --
> Jacob Helwig
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iQGcBAEBAgAGBQJOCL6mAAoJEHJabXWGiqEB2FEMAJoHbfmlqN+Vj1wzUVxqV7rs
> 7xzCVkHh6VN4h53kJmSZGnVlfyvjw5Ry/GLg1SboneKJJVbxY84IVsLPEhA+6WiB
> R3LMNb+88BrXAfx4aIZjmyLxCDBYRv57y9gYn3tf7TFu32H6fdxa97PPDLdbulIf
> kGKQdLianpJijCX4sd0A8fmAmEhR27cY+B2a3dxgGkaxR6zB7FgUwyLXPo5jqka8
> e1zry40+wPk0yVHrRBxV9RM2vB0bIq0wgyUTfsU0EzdD7pK8aGkNJGhVlpXPxMDH
> lN5Qdau72A3eF1/kf3sSnhR8JUl1RV+ndMFXjEUZ2UtPcf/uQLoVrzPpQZXYBHZW
> XNAPPHbb747M+54QV0OxX7FlMrAz6RGsiFbIYGRRLbn1rQE84+hR+JPdkS8hAocx
> JEGfMOVAvgdMsF86t99HK6yDAEWHhzmBgPWXWp43FMFjmg1yZcMe0TYkuvaovhFX
> juPi8Cf7N4rAxcSTlLV51YEbsbqCIL3a3jP/0sRSYQ==
> =4Xrj
> -END PGP SIGNATURE-
>
>


-- 
Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garst...@gmail.com
Cell: +1-805-340-5627

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Puppet Dashboard without MySQL

2011-06-27 Thread Douglas Garstang
Actually, to be more specific, our nodes are stored in yaml files, and I'd
like to keep them that way, and continue to have the yaml files as the
source of truth, not a MySQL database. Puppet dashboard should read from
those yaml files.

Doug.

On Mon, Jun 27, 2011 at 10:24 AM, Douglas Garstang
wrote:

> All,
>
> Can puppet dashboard be used WITHOUT MySQL?
>
> Can't find it documented here:
>
>
> http://docs.puppetlabs.com/guides/installing_dashboard.html#external_node_classification
>
> Doug.
>
>


-- 
Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garst...@gmail.com
Cell: +1-805-340-5627

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: Puppet Dashboard without MySQL

2011-06-27 Thread Douglas Garstang
On Mon, Jun 27, 2011 at 10:49 AM, Nan Liu  wrote:

> On Mon, Jun 27, 2011 at 10:35 AM, Douglas Garstang
>  wrote:
> > Actually, to be more specific, our nodes are stored in yaml files, and
> I'd
> > like to keep them that way, and continue to have the yaml files as the
> > source of truth, not a MySQL database. Puppet dashboard should read from
> > those yaml files.
> > Doug.
>
> You can use Dashboard in any of the following combination:
>
> ENC
> Reporting
> ENC + Reporting.
>
>
Kinda wanted to use it for more than reporting. Shame, really. It would be
nice if there was a tool that could translate any external node format.

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: Puppet Dashboard without MySQL

2011-06-27 Thread Douglas Garstang
On Mon, Jun 27, 2011 at 12:30 PM, Ohad Levy  wrote:

> On Mon, Jun 27, 2011 at 9:40 PM, Douglas Garstang
>  wrote:
> > On Mon, Jun 27, 2011 at 10:49 AM, Nan Liu  wrote:
> >>
> >> On Mon, Jun 27, 2011 at 10:35 AM, Douglas Garstang
> >>  wrote:
> >> > Actually, to be more specific, our nodes are stored in yaml files, and
> >> > I'd
> >> > like to keep them that way, and continue to have the yaml files as the
> >> > source of truth, not a MySQL database. Puppet dashboard should read
> from
> >> > those yaml files.
> >> > Doug.
> >>
> >> You can use Dashboard in any of the following combination:
> >>
> >> ENC
> >> Reporting
> >> ENC + Reporting.
> >>
> >
> > Kinda wanted to use it for more than reporting. Shame, really. It would
> be
> > nice if there was a tool that could translate any external node format.
>
> not sure what do you mean by translate, but Foreman can import
> information from other ENC's
>
>
I don't want to import the nodes, I want to leave the node information in
YAML files and have Foreman read from that. When edits are made to the
nodes, I want the edits to be made to the YAML files. Putting the node
config into anything else removes the ability to do revision control, and
importing the data info Foreman (I assume) obfuscates it to the point that I
can't easily view/edit the files any more.

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Linux hardening

2011-07-03 Thread Douglas Garstang
On Fri, Jul 1, 2011 at 3:48 PM, James Turnbull  wrote:

> Nicolas Arias wrote:
>
>> Hi guys!.
>>
>> I want to use puppet to automate initial linux hardening and to
>> maintain a security configuration standard.
>>
>> Does any one knows if there are modules going around that take care of
>> the usual hardening steps?.
>>
>> If not, i will work on them and share them.
>>
>>
> I started this modeled on the CIS Linux Security guidelines.
>
> https://github.com/jamtur01/**puppet-hardening
>
> It's not complete but covers a selection of the controls.  You're welcome
> to fork/hack on it.  Patches welcome etc.
>
> Regards
>
>
This raises an interesting question. I had been doing something similar
recently, and I had implemented the hardening within the specific puppet
modules that they were related to. However, you've written a totally
separate module. Which is better?

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Skipping Tags?

2011-07-19 Thread Douglas Garstang
All,

Is there a way to tell puppet to run, but to skip/ignore resources with a
certain tag? The use case is tagging certain resources as, say, 'software
deployment', and then having the resources tagged as that always ignored
unless specifically told to do so? We'd like to put software deployment
stuff into puppet, but only have it actually run when we tell it to.

Doug

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] ANNOUNCE: Cloud Provisioner v0.6.0rc1 release

2011-07-21 Thread Douglas Garstang
'Cloud Provisioner' seems like a funny name if it's only designed to manage
Amazon EC2 instances. Why didn't you just call it the 'Amazon Provisioner' ?

On Thu, Jul 21, 2011 at 4:18 PM, Jeff McCune  wrote:

> We are happy to announce the first public release candidate of our Puppet
> Cloud Provisioner.
>
> This release is available for download at our Module Forge:
> http://forge.puppetlabs.com/puppetlabs/cloud_provisioner<http://downloads.puppetlabs.com/dashboard/>
>
> Extensive documentation can be found at:
> http://docs.puppetlabs.com/guides/cloud_pack_getting_started.html
>
> Please report feedback via the Puppet Labs Redmine site, using an
> affected version of 0.6.0rc1:
> http://projects.puppetlabs.com/projects/cloud-pack<http://projects.puppetlabs.com/projects/dashboard>
>
>
> Overview:
>
> The Puppet  Cloud Provisioner was written to make it easier to deploy and
> configure instances in EC2 using Puppet.
>
> It contains the following command line actions:
>
> puppet node create - Launches a new Amazon EC2 instance.
>
> puppet node install - Installs Puppet on an EC2 instance.
>
> puppet node init - Installs Puppet on a machine instance and automatically
> signs its certificates.
>
> puppet node list - Lists deployed EC2 instances in a certain region.
>
> puppet node terminate - Terminates running EC2 instance.
>
>
> For more detailed information about the available commands, download the
> module and run:
>
> puppet help node
>
> More Details about the iteration leading up to this release
> ===
> * Add --type option to launch different EC2 instance sizes
> * (#7510) Add inline documentation for actions and options
> * (#8286) Warn if the payload used with the install action is not a tar.gz
> file
> * (#8265) Make the platform flag optional and default to 'AWS' (Note,
> puppet-provisioner provisions AWS EC2 instances in this release)
> * (#7511) Add the ability to launch instances in any EC2 region using the
> --region option.  The default region is us-east-1
> * (#8157) Improve the feedback of the terminate action by explicitly
> stating
> the instance has been terminated.
> * (#8185) Add a list action to list EC2 instances and their current status.
> * (#8343) Print the EC2 instance public DNS name as soon as it is available
> * (#8350) Change all output to use Puppet's configured log destination
> * (#8348) Add a fingerprint action to make a best effort to obtain the SSH
> public host key fingerprint from the launched EC2 instance.
> * (#7508) Add the ability to install Puppet using rubygems on a target
> system.
> * (#7508) Improve the install action using template scripts to install
> Puppet
> on launched systems.
> * (#8403) Replace dependency on uuidgen Mac OS X executable with guid gem.
> * (#8422) Catch the exit status of installation script and display an error
> if
> they're non zero.
> * (#8204) Include a puppet enterprise install script that downloads from
> S3.
> This should improve install times on low bandwidth connections.
> * (#8472) Add support for non-root logins when installing puppet on a
> target
> system.
> * (#8493) Rename cloudpack to cloud-provisioner
>
> --
> Jeff McCune
> @0xEFF
> Join us for PuppetConf <http://links.puppetlabs.com/puppetconf>, Sept
> 22-23 in Portland, OR
>
> --
> 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
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>



-- 
Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garst...@gmail.com
Cell: +1-805-340-5627

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Puppet RPM's

2011-07-26 Thread Douglas Garstang
Does anyone know where I can get the latest puppet, 2.7.1 as RPM's?

The spec file that comes with the puppet 2.7.1 source is broken again, and
only version 0.25.5 seems to be available via EPEL, which means that the
website's assertion that you can get puppet as an RPM from there is somewhat
untrue.

Douglas.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Upgrading 0.25.5 to 2.7.1

2011-07-27 Thread Douglas Garstang
All,

I'm upgrading puppet clients from 0.25.5 to 2.7.1. I've rolled an RPM for
the new version, and I'm:

1. Stopping puppet
2. Upgrading RPM
3. Change the puppet master on the client to point to a new puppet master
running 2.7.1.
3. Starting puppet

I am seeing this in the log files on the client:

Could not evaluate: certificate verify failed Could not retrieve file
metadata for puppet://hprov01.h.xxx.com/plugins: certificate verify failed
Jul 27 13:53:54 hsqlstor04p1-old puppet-agent[9468]: Could not retrieve
catalog from remote server: certificate verify failed
Jul 27 13:53:54 hsqlstor04p1-old puppet-agent[9468]: Using cached catalog
Jul 27 13:53:54 hsqlstor04p1-old puppet-agent[9468]: Could not send report:
certificate verify failed
Jul 27 13:53:54 hsqlstor04p1-old puppet-agent[9468]: Could not run Puppet
configuration client: interning empty string

After stopping puppet again, removing /var/lib/puppet/ssl and restarting
puppet, all is ok. Why do I need to blow away the client side certs? I
recently upgraded 0.25.5 to 2.6.8, and I don't believe I had to do this. I
have a couple of hundred servers to upgrade, and I don't want to have to
remove all the client side ssl directories as part of the upgrade process.

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Upgrading 0.25.5 to 2.7.1

2011-07-27 Thread Douglas Garstang
On Wed, Jul 27, 2011 at 2:01 PM, Jacob Helwig  wrote:

> On Wed, 27 Jul 2011 13:58:25 -0700, Douglas Garstang wrote:
> >
> > All,
> >
> > I'm upgrading puppet clients from 0.25.5 to 2.7.1. I've rolled an RPM for
> > the new version, and I'm:
> >
> > 1. Stopping puppet
> > 2. Upgrading RPM
> > 3. Change the puppet master on the client to point to a new puppet master
> > running 2.7.1.
> > 3. Starting puppet
> >
> > I am seeing this in the log files on the client:
> >
> > Could not evaluate: certificate verify failed Could not retrieve file
> > metadata for puppet://hprov01.h.xxx.com/plugins: certificate verify
> failed
> > Jul 27 13:53:54 hsqlstor04p1-old puppet-agent[9468]: Could not retrieve
> > catalog from remote server: certificate verify failed
> > Jul 27 13:53:54 hsqlstor04p1-old puppet-agent[9468]: Using cached catalog
> > Jul 27 13:53:54 hsqlstor04p1-old puppet-agent[9468]: Could not send
> report:
> > certificate verify failed
> > Jul 27 13:53:54 hsqlstor04p1-old puppet-agent[9468]: Could not run Puppet
> > configuration client: interning empty string
> >
> > After stopping puppet again, removing /var/lib/puppet/ssl and restarting
> > puppet, all is ok. Why do I need to blow away the client side certs? I
> > recently upgraded 0.25.5 to 2.6.8, and I don't believe I had to do this.
> I
> > have a couple of hundred servers to upgrade, and I don't want to have to
> > remove all the client side ssl directories as part of the upgrade
> process.
> >
> > Doug.
> >
>
> It sounds like you have a new server with 2.7.1, in addition to your old
> server.  Did you copy over the master certificates to the new 2.7.1
> master from the old one?
>
> If the new 2.7.1 master had generated a new certificate, I would expect
> to get the errors you're seeing.
>
>
I do. I guess I had assumed, wrongly apparently, that a client could have
knowledge of multiple servers.

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Upgrading 0.25.5 to 2.7.1

2011-07-27 Thread Douglas Garstang
On Wed, Jul 27, 2011 at 2:01 PM, Jacob Helwig  wrote:

> On Wed, 27 Jul 2011 13:58:25 -0700, Douglas Garstang wrote:
> >
> > All,
> >
> > I'm upgrading puppet clients from 0.25.5 to 2.7.1. I've rolled an RPM for
> > the new version, and I'm:
> >
> > 1. Stopping puppet
> > 2. Upgrading RPM
> > 3. Change the puppet master on the client to point to a new puppet master
> > running 2.7.1.
> > 3. Starting puppet
> >
> > I am seeing this in the log files on the client:
> >
> > Could not evaluate: certificate verify failed Could not retrieve file
> > metadata for puppet://hprov01.h.xxx.com/plugins: certificate verify
> failed
> > Jul 27 13:53:54 hsqlstor04p1-old puppet-agent[9468]: Could not retrieve
> > catalog from remote server: certificate verify failed
> > Jul 27 13:53:54 hsqlstor04p1-old puppet-agent[9468]: Using cached catalog
> > Jul 27 13:53:54 hsqlstor04p1-old puppet-agent[9468]: Could not send
> report:
> > certificate verify failed
> > Jul 27 13:53:54 hsqlstor04p1-old puppet-agent[9468]: Could not run Puppet
> > configuration client: interning empty string
> >
> > After stopping puppet again, removing /var/lib/puppet/ssl and restarting
> > puppet, all is ok. Why do I need to blow away the client side certs? I
> > recently upgraded 0.25.5 to 2.6.8, and I don't believe I had to do this.
> I
> > have a couple of hundred servers to upgrade, and I don't want to have to
> > remove all the client side ssl directories as part of the upgrade
> process.
> >
> > Doug.
> >
>
> It sounds like you have a new server with 2.7.1, in addition to your old
> server.  Did you copy over the master certificates to the new 2.7.1
> master from the old one?
>
> If the new 2.7.1 master had generated a new certificate, I would expect
> to get the errors you're seeing.
>
> --
>

Oh, and which files under /var/lib/puppet/ssl on the server would be the
relevant master certs?

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Upgrading 0.25.5 to 2.7.1

2011-07-27 Thread Douglas Garstang
On Wed, Jul 27, 2011 at 2:10 PM, Douglas Garstang
wrote:

> On Wed, Jul 27, 2011 at 2:01 PM, Jacob Helwig wrote:
>
>> On Wed, 27 Jul 2011 13:58:25 -0700, Douglas Garstang wrote:
>> >
>> > All,
>> >
>> > I'm upgrading puppet clients from 0.25.5 to 2.7.1. I've rolled an RPM
>> for
>> > the new version, and I'm:
>> >
>> > 1. Stopping puppet
>> > 2. Upgrading RPM
>> > 3. Change the puppet master on the client to point to a new puppet
>> master
>> > running 2.7.1.
>> > 3. Starting puppet
>> >
>> > I am seeing this in the log files on the client:
>> >
>> > Could not evaluate: certificate verify failed Could not retrieve file
>> > metadata for puppet://hprov01.h.xxx.com/plugins: certificate verify
>> failed
>> > Jul 27 13:53:54 hsqlstor04p1-old puppet-agent[9468]: Could not retrieve
>> > catalog from remote server: certificate verify failed
>> > Jul 27 13:53:54 hsqlstor04p1-old puppet-agent[9468]: Using cached
>> catalog
>> > Jul 27 13:53:54 hsqlstor04p1-old puppet-agent[9468]: Could not send
>> report:
>> > certificate verify failed
>> > Jul 27 13:53:54 hsqlstor04p1-old puppet-agent[9468]: Could not run
>> Puppet
>> > configuration client: interning empty string
>> >
>> > After stopping puppet again, removing /var/lib/puppet/ssl and restarting
>> > puppet, all is ok. Why do I need to blow away the client side certs? I
>> > recently upgraded 0.25.5 to 2.6.8, and I don't believe I had to do this.
>> I
>> > have a couple of hundred servers to upgrade, and I don't want to have to
>> > remove all the client side ssl directories as part of the upgrade
>> process.
>> >
>> > Doug.
>> >
>>
>> It sounds like you have a new server with 2.7.1, in addition to your old
>> server.  Did you copy over the master certificates to the new 2.7.1
>> master from the old one?
>>
>> If the new 2.7.1 master had generated a new certificate, I would expect
>> to get the errors you're seeing.
>>
>> --
>>
>
> Oh, and which files under /var/lib/puppet/ssl on the server would be the
> relevant master certs?
>
> Doug.
>
>

Hmmm. that's not going to work, since the host names of the servers are
different, and therefore, so are the cert names. Now I'm really confused.
Since the client can't have knowledge of two servers, this means that if
things go south, and I have to switch the client back to the original
master, that I will have to remove the certs again. There's got to be an
easier way.

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Puppet HA from 'Pro Puppet'

2011-07-30 Thread Douglas Garstang
All,

I'm trying to set puppet 2.7.1 up in a HA configuration by following the
steps in the new 'Pro Puppet' book. I got puppet working with passenger
initially, and confirmed that was working.

The fact I can't really point to the book as a reference here makes it a bit
hard to describe what I am doing, but one of the steps in the book that is a
bit unclear is:

"In addition to the configuration file, you need to duplicates the Rack
configuration directory into the new DocumentRoot location (see Listing
4-10).

Listing 4-10. Create the first Puppet master worker rack configuration

# rsync -avxH /etc/puppet/rack/puppetmaster{,_18140}/

building file list ... done

created directory /etc/puppet/rack/puppetmaster_18140 ./

config.ru

public/

tmp/

"


It doesn't say where to run the rsync (ie copy) from. I ran it
from /usr/share/puppet/rack/puppetmasterd/config.ru, and therefore,
/etc/puppet/rack/puppetmaster_18140
ended up with:


[root@hpmas01 httpd]# ls -l /etc/puppet/rack/puppetmaster_18140/public

total 12

-rw-r--r-- 1 puppet puppet  431 Jul 30 14:27 config.ru

drwxr-xr-x 2 root   root   4096 Jul 30 14:27 public

drwxr-xr-x 2 root   root   4096 Jul 30 14:27 tmp

My client, connecting to this server, is reporting:

err: Could not retrieve catalog from remote server: Error 403 on SERVER:
Forbidden request: hxmgt01.h.xxx.com(10.5.100.106) access to /catalog/
sv4xen04.h.xxx.com [find] at line 98
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run
err: Could not send report: Error 403 on SERVER: Forbidden request:
hxmgt01.h.xxx.com(10.5.100.106) access to /report/sv4xen04.h.xxx.com [save]
at line 98

Ideas?

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Master failover and cert names.

2011-07-30 Thread Douglas Garstang
Well, this is frustrating.

Let's say I have two puppet masters, where one is active, and the other is a
hot stand by. Obviously each is going to have a different FQDN. Everything
will work fine when the client talks to the server that signed it's
certificate. However, after a failover to the secondary master, it's all
going to fail because the FQDN of the master will not match.

I've been searching around, reading the mailing list, and am surprised to
find very little information on this. The new "Pro Puppet" book skims over
this detail. You'd think they'd have some proof it before selling it.

Anyway, someone suggested just using a DNS alias, but that doesn't seem to
work. If my master is called hpma01p1, and the ssl certs are created in the
default manner, when I create a DNS alias, and my client talks to hpma01p1
by using 'puppet', it still fails:

Could not request certificate: Retrieved certificate does not match private
key; please remove certificate from server and regenerate it with the
current key

I know that there's a 'certname' option but it looks like it's only valid in
the [agent], not the master section. How do I do this?

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Master failover and cert names.

2011-07-30 Thread Douglas Garstang
On Sat, Jul 30, 2011 at 8:03 PM, Douglas Garstang
wrote:

> Well, this is frustrating.
>
> Let's say I have two puppet masters, where one is active, and the other is
> a hot stand by. Obviously each is going to have a different FQDN. Everything
> will work fine when the client talks to the server that signed it's
> certificate. However, after a failover to the secondary master, it's all
> going to fail because the FQDN of the master will not match.
>
> I've been searching around, reading the mailing list, and am surprised to
> find very little information on this. The new "Pro Puppet" book skims over
> this detail. You'd think they'd have some proof it before selling it.
>
> Anyway, someone suggested just using a DNS alias, but that doesn't seem to
> work. If my master is called hpma01p1, and the ssl certs are created in the
> default manner, when I create a DNS alias, and my client talks to hpma01p1
> by using 'puppet', it still fails:
>
> Could not request certificate: Retrieved certificate does not match private
> key; please remove certificate from server and regenerate it with the
> current key
>
> I know that there's a 'certname' option but it looks like it's only valid
> in the [agent], not the master section. How do I do this?
>
> Doug.
>
>
>
Actually, correction I'm getting this on the client:

debug: Using cached certificate for ca
/usr/lib/ruby/1.8/openssl/ssl.rb:91:in `post_connection_check': hostname not
match with the server certificate (OpenSSL::SSL::SSLError)
from /usr/lib/ruby/1.8/net/http.rb:588:in `connect'
from /usr/lib/ruby/1.8/net/http.rb:553:in `do_start'
from /usr/lib/ruby/1.8/net/http.rb:542:in `start'
from /usr/lib/ruby/1.8/net/http.rb:1035:in `request'

This post last message in this thread
http://groups.google.com/group/puppet-users/browse_thread/thread/175183b711074480,
says:

"We have a single key/cert for the master named "puppet.arces.net" (or
puppet-qa.arces.net for the QA one).  I don't designate a cert name
anywhere - I just have a cert generated for the puppetmasters that
matches the hostname that the clients use to connect to the load
balancer, not a cert name for the hosts themselves. "

Seems to work for him for some reason!

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Master failover and cert names.

2011-07-31 Thread Douglas Garstang
On Sat, Jul 30, 2011 at 10:38 PM, James Turnbull wrote:

> Douglas Garstang wrote:
> > Well, this is frustrating.
> >
> > Let's say I have two puppet masters, where one is active, and the other
> > is a hot stand by. Obviously each is going to have a different FQDN.
> > Everything will work fine when the client talks to the server that
> > signed it's certificate. However, after a failover to the secondary
> > master, it's all going to fail because the FQDN of the master will not
> > match.
> >
> > I've been searching around, reading the mailing list, and am surprised
> > to find very little information on this. The new "Pro Puppet" book skims
> > over this detail. You'd think they'd have some proof it before selling
> it.
> >
>
> Douglas
>
> Did you read the chapter carefully?  The Front End Load Balancer
> Configuration section explains this pretty clearly.
>
>
Several times. Starts on page 99. Can't find any reference to it.

Also, I'd like to point out, that the book talks initially about setting up
a separate primary and secondary CA, but after mentioning that these should
go on a separate server, only details how to do it on the puppet master.
Putting the CA function on a different server is not a trivial thing and I
spent a few hours yesterday reading between the lines, trying to work out
how to put in on a separate server, and finally gave up about 1am this
morning.

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: Master failover and cert names.

2011-08-01 Thread Douglas Garstang
On Mon, Aug 1, 2011 at 8:03 AM, linuxbsdfreak wrote:

> HI Doug,
>
> I am also facing the same issue after following the steps from the
> book. I tried with nginx and passenger and i mentioned it on the
> following post.
>
>
> http://groups.google.com/group/puppet-users/browse_thread/thread/44bc89455ccc311a#
>
> Regards,
> Kevin
>
>
Thanks for the reply Kevin. Good to know I'm not the only one.

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Extlookup() Docs

2011-08-03 Thread Douglas Garstang
So the new extlookup that can apparently read YAML files, here:

http://www.devco.net/archives/2011/05/28/pluggable_extlookup_for_puppet.php

Are there any docs on how to actually install? I need a _little_ more than a
reference to the source code on github

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Puppet HA from 'Pro Puppet'

2011-08-03 Thread Douglas Garstang
:(

On Sun, Jul 31, 2011 at 8:32 PM, Jeff McCune  wrote:

> On Sat, Jul 30, 2011 at 3:01 PM, Nigel Kersten wrote:
>
>>
>>
>> On Sat, Jul 30, 2011 at 2:53 PM, Douglas Garstang <
>> doug.garst...@gmail.com> wrote:
>>
>>> All,
>>>
>>> I'm trying to set puppet 2.7.1 up in a HA configuration by following the
>>> steps in the new 'Pro Puppet' book. I got puppet working with passenger
>>> initially, and confirmed that was working.
>>>
>>> The fact I can't really point to the book as a reference here makes it a
>>> bit hard to describe what I am doing, but one of the steps in the book that
>>> is a bit unclear is:
>>>
>>> "In addition to the configuration file, you need to duplicates the Rack
>>> configuration directory into the new DocumentRoot location (see Listing
>>> 4-10).
>>>
>>> Listing 4-10. Create the first Puppet master worker rack configuration
>>>
>>> # rsync -avxH /etc/puppet/rack/puppetmaster{,_18140}/
>>>
>>> building file list ... done
>>>
>>> created directory /etc/puppet/rack/puppetmaster_18140 ./
>>>
>>> config.ru
>>>
>>> public/
>>>
>>> tmp/
>>>
>>> "
>>>
>>>
>>> It doesn't say where to run the rsync (ie copy) from. I ran it
>>> from /usr/share/puppet/rack/puppetmasterd/config.ru, and therefore, 
>>> /etc/puppet/rack/puppetmaster_18140
>>> ended up with:
>>>
>>
>> The command expands to provide a source and a destination.
>>
>> ~ nbk $ echo /etc/puppet/rack/puppetmaster{,_18140}/
>>
>> /etc/puppet/rack/puppetmaster/ /etc/puppet/rack/puppetmaster_18140/
>>
>>
>> It shouldn't matter what working directory you're using as it expands to
>> absolute paths for source and destination.
>>
>> I'd repeat the command as provided in the book as it looks like you've got
>> some problems with paths like:
>>
>> /etc/puppet/rack/puppetmaster_18140/public/public
>>
>>
> I second what Nigel said, along with the information that the following
> error may be caused by Apache not setting the SSL verification environment
> variable correctly, or you're using an invalid certificate.
>
>
> "err: Could not retrieve catalog from remote server: Error 403 on SERVER:
> Forbidden request: hxmgt01.h.xxx.com(10.5.100.
> 106) access to /catalog/sv4xen04.h.xxx.com [find] at line 98"
>
> --
> Jeff McCune
> @0xEFF
> Join us for PuppetConf <http://links.puppetlabs.com/puppetconf>, Sept
> 22-23 in Portland, OR
>
>  --
> 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
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>



-- 
Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garst...@gmail.com
Cell: +1-805-340-5627

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: module / class scope

2011-08-03 Thread Douglas Garstang
On Wed, Aug 3, 2011 at 9:20 AM, jcbollinger wrote:

>
> On Aug 2, 5:16 pm, Aaron Grewell  wrote:
> > I think you'll need to use both an include and a require.  The include
> makes
> > the class(es) in the file available, the require creates the actual
> > dependency.
>
> Yes, if the class in question is not otherwise 'include'd then it
> needs to be.  You must have an 'include' of it in scope everywhere you
> reference it.  Provided that it is not parameterized, it is safe to
> 'include' the class anywhere and everywhere that you reference it,
> though you may be able to reduce the number includes with some thought
> and planning.
>
> Be careful however: it is not quite right to say "include makes the
> class(es) in the file available."  That's what 'import' does, and it
> looks like you have already structured things so that you don't need
> explicit imports (good form, that).
>
> 'Include', on the other hand, specifies that the class's resources
> should be included in the current node's catalog.  To draw an
> (imperfect) analogy with C, 'import foo' is like #including a header
> file, whereas 'include foo' is more like calling a function.
>
>
>
This may bite me in the ass one day, but since I've been using extlookup and
accessing module variables INSIDE the module, I haven't had a single problem
with variable scope. It's become a non issue. My 2c worth.

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Extlookup() Docs

2011-08-03 Thread Douglas Garstang
On Wed, Aug 3, 2011 at 10:21 AM, R.I.Pienaar  wrote:

>
>
> - Original Message -
> > So the new extlookup that can apparently read YAML files, here:
> >
> >
> >
> http://www.devco.net/archives/2011/05/28/pluggable_extlookup_for_puppet.php
> >
> >
> > Are there any docs on how to actually install? I need a _little_ more
> > than a reference to the source code on github
> >
>
> its not in puppet core and probably wont be, a more complete system is @
> http://www.devco.net/archives/tag/hiera
>
>
I realise it's not integrated into puppet. Hence the reason for asking how
to integrate into puppet. In the previous version of extlookup, before that
one was integrated into puppet, you would copy extlookup.rb to a path on the
client. How do you do it with this one?

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Extlookup() Docs

2011-08-03 Thread Douglas Garstang
On Wed, Aug 3, 2011 at 10:28 AM, R.I.Pienaar  wrote:

>
>
> - Original Message -
> >
> > On Wed, Aug 3, 2011 at 10:21 AM, R.I.Pienaar < r...@devco.net > wrote:
> >
> >
> >
> >
> >
> >
> >
> > - Original Message -
> > > So the new extlookup that can apparently read YAML files, here:
> > >
> > >
> > >
> http://www.devco.net/archives/2011/05/28/pluggable_extlookup_for_puppet.php
> > >
> > >
> > > Are there any docs on how to actually install? I need a _little_
> > > more
> > > than a reference to the source code on github
> > >
> >
> > its not in puppet core and probably wont be, a more complete system
> > is @ http://www.devco.net/archives/tag/hiera
> >
> >
> >
> >
> > I realise it's not integrated into puppet. Hence the reason for
> > asking how to integrate into puppet. In the previous version of
> > extlookup, before that one was integrated into puppet, you would
> > copy extlookup.rb to a path on the client. How do you do it with
> > this one?
>
> you can pluginsync out the extlookup.rb but the util/* stuff has to
> be copied into the ruby libdir cos pluginsync is broken/incomplete
>
>
Thanks, but...

I have no idea what 'pluginsync out the extlookup.rb' stuff' means...

Not really sure about what the rest of that statement means either...

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Extlookup() Docs

2011-08-03 Thread Douglas Garstang
On Wed, Aug 3, 2011 at 10:37 AM, R.I.Pienaar  wrote:

>
>
> - Original Message -
> >
> > >
> > > its not in puppet core and probably wont be, a more complete system
> > > is @ http://www.devco.net/archives/tag/hiera
> > >
> > >
> > >
> > >
> > > I realise it's not integrated into puppet. Hence the reason for
> > > asking how to integrate into puppet. In the previous version of
> > > extlookup, before that one was integrated into puppet, you would
> > > copy extlookup.rb to a path on the client. How do you do it with
> > > this one?
> >
> > you can pluginsync out the extlookup.rb but the util/* stuff has to
> > be copied into the ruby libdir cos pluginsync is broken/incomplete
> >
> >
> >
> >
> >
> >
> >
> > Thanks, but...
> >
> >
> > I have no idea what 'pluginsync out the extlookup.rb' stuff' means...
> >
> >
> > Not really sure about what the rest of that statement means either...
>
> A simple google search for 'puppet pluginsync' suggests that this is
> incredibly well documented.
>
> Maybe you just didn't try to help yourself first before asking others
> to spoon feed you?
>
>
There's not a single reference to the word 'pluginsync' on your web page.
I've never even heard of that before. How was I supposed to know to google
for 'pluginsync'? Good grief...

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Hiera

2011-08-03 Thread Douglas Garstang
Anyone using? The docs are really bad.

Doug

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: module / class scope

2011-08-03 Thread Douglas Garstang
On Wed, Aug 3, 2011 at 2:56 PM, jcbollinger wrote:

>
>
> On Aug 3, 12:23 pm, Douglas Garstang  wrote:
> > On Wed, Aug 3, 2011 at 9:20 AM, jcbollinger  >wrote:
> >
> >
> >
> >
> >
> >
> >
> > > On Aug 2, 5:16 pm, Aaron Grewell  wrote:
> > > > I think you'll need to use both an include and a require.  The
> include
> > > makes
> > > > the class(es) in the file available, the require creates the actual
> > > > dependency.
> >
> > > Yes, if the class in question is not otherwise 'include'd then it
> > > needs to be.  You must have an 'include' of it in scope everywhere you
> > > reference it.  Provided that it is not parameterized, it is safe to
> > > 'include' the class anywhere and everywhere that you reference it,
> > > though you may be able to reduce the number includes with some thought
> > > and planning.
> >
> > > Be careful however: it is not quite right to say "include makes the
> > > class(es) in the file available."  That's what 'import' does, and it
> > > looks like you have already structured things so that you don't need
> > > explicit imports (good form, that).
> >
> > > 'Include', on the other hand, specifies that the class's resources
> > > should be included in the current node's catalog.  To draw an
> > > (imperfect) analogy with C, 'import foo' is like #including a header
> > > file, whereas 'include foo' is more like calling a function.
> >
> > This may bite me in the ass one day, but since I've been using extlookup
> and
> > accessing module variables INSIDE the module, I haven't had a single
> problem
> > with variable scope. It's become a non issue. My 2c worth.
>
>
> Doug, I think you posted this to the wrong thread.  I do like
> extlookup(), though, and using it can definitely help in avoiding
> trouble with variable scoping.
>
>
>
I was saying that the use of extlookup negates variable scoping problems.

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Extlookup() again.

2011-08-03 Thread Douglas Garstang
Can't get the extlookup() that supports yaml to work.

I did this...

On server:
mv /usr/lib/ruby/site_ruby/1.8/puppet/parser/functions/extlookup.rb
/usr/lib/ruby/site_ruby/1.8/puppet/parser/functions/extlookup.rb.orig
Replaced /usr/lib/ruby/site_ruby/1.8/puppet/parser/functions/extlookup.rb
with puppet-extlookup/lib/puppet/parser/functions/extlookup.rb
mkdir /usr/lib/ruby/site_ruby/1.8/puppet/util/extlookup/
Added puppet-extlookup/lib/puppet/util/extlookup.rb to
/usr/lib/ruby/site_ruby/1.8/puppet/util
Added puppet-extlookup/lib/puppet/util/extlookup/csv_parser.rb to
/usr/lib/ruby/site_ruby/1.8/puppet/util/extlookup
Added puppet-extlookup/lib/puppet/util/extlookup/yaml_parser.rb to
/usr/lib/ruby/site_ruby/1.8/puppet/util/extlookup
Added puppet-extlookup/lib/puppet/util/extlookup/puppet_parser.rb to
/usr/lib/ruby/site_ruby/1.8/puppet/util/extlookup

Created /etc/puppet/extlookup.yaml:
---
:parser: YAML
:precedence:
- environment_%{environment}
- common
:yaml:
  :datadir: /etc/puppet/extdata

Created /etc/puppet/extdata/settings.yaml:
---
testkey: testval

Calling with:
$test_var = extlookup('testkey', '---', 'settings.yaml')
notice("TEST VAR=$test_var")

And $test_var is always '---'. Replacing settings.yaml with a bogus file
name also returns '---', which tells me that the file isn't being found.
What am I missing here? Quite possibly a lot given the really bad docs.

What is 'precedence' for? Not documented.

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Extlookup() again.

2011-08-03 Thread Douglas Garstang
On Wed, Aug 3, 2011 at 3:50 PM, Douglas Garstang wrote:

> Can't get the extlookup() that supports yaml to work.
>
> I did this...
>
> On server:
> mv /usr/lib/ruby/site_ruby/1.8/puppet/parser/functions/extlookup.rb
> /usr/lib/ruby/site_ruby/1.8/puppet/parser/functions/extlookup.rb.orig
> Replaced /usr/lib/ruby/site_ruby/1.8/puppet/parser/functions/extlookup.rb
> with puppet-extlookup/lib/puppet/parser/functions/extlookup.rb
> mkdir /usr/lib/ruby/site_ruby/1.8/puppet/util/extlookup/
> Added puppet-extlookup/lib/puppet/util/extlookup.rb to
> /usr/lib/ruby/site_ruby/1.8/puppet/util
> Added puppet-extlookup/lib/puppet/util/extlookup/csv_parser.rb to
> /usr/lib/ruby/site_ruby/1.8/puppet/util/extlookup
> Added puppet-extlookup/lib/puppet/util/extlookup/yaml_parser.rb to
> /usr/lib/ruby/site_ruby/1.8/puppet/util/extlookup
> Added puppet-extlookup/lib/puppet/util/extlookup/puppet_parser.rb to
> /usr/lib/ruby/site_ruby/1.8/puppet/util/extlookup
>
> Created /etc/puppet/extlookup.yaml:
> ---
> :parser: YAML
> :precedence:
> - environment_%{environment}
> - common
> :yaml:
>   :datadir: /etc/puppet/extdata
>
> Created /etc/puppet/extdata/settings.yaml:
> ---
> testkey: testval
>
> Calling with:
> $test_var = extlookup('testkey', '---', 'settings.yaml')
> notice("TEST VAR=$test_var")
>
> And $test_var is always '---'. Replacing settings.yaml with a bogus file
> name also returns '---', which tells me that the file isn't being found.
> What am I missing here? Quite possibly a lot given the really bad docs.
>
> What is 'precedence' for? Not documented.
>
> Doug.
>
>
>
Actually, when I run the puppetmaster in debug mode on the server, I see:

debug: Automatically imported testmodule::test01 from testmodule/test01 into
prod2
debug: extlookup/yaml: looking for key=testkey with default=---
debug: extlookup/yaml: Looking for data in /etc/puppet/extdata
debug: extlookup/yaml: Looking for data in
/etc/puppet/extdata/settings.yaml.yaml
debug: extlookup/yaml: Looking for data in
/etc/puppet/extdata/environment_prod2.yaml
debug: extlookup/yaml: Looking for data in /etc/puppet/extdata/common.yaml
notice: Scope(Class[Testmodule::Test01]): TEST VAR=---
debug: File[/tmp/y]: Adding default for backup

 so, it's looking in the right place for the right key it just
doesn't get it...

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Extlookup() again.

2011-08-03 Thread Douglas Garstang
On Wed, Aug 3, 2011 at 4:15 PM, Aaron Grewell wrote:

> Precedence is for having it look in multiple places.  I've got node-level,
> site-level, and default YAML files for example.
>
> On Wed, Aug 3, 2011 at 3:50 PM, Douglas Garstang 
> wrote:
>
>> Can't get the extlookup() that supports yaml to work.
>>
>> I did this...
>>
>> On server:
>> mv /usr/lib/ruby/site_ruby/1.8/puppet/parser/functions/extlookup.rb
>> /usr/lib/ruby/site_ruby/1.8/puppet/parser/functions/extlookup.rb.orig
>> Replaced /usr/lib/ruby/site_ruby/1.8/puppet/parser/functions/extlookup.rb
>> with puppet-extlookup/lib/puppet/parser/functions/extlookup.rb
>> mkdir /usr/lib/ruby/site_ruby/1.8/puppet/util/extlookup/
>> Added puppet-extlookup/lib/puppet/util/extlookup.rb to
>> /usr/lib/ruby/site_ruby/1.8/puppet/util
>> Added puppet-extlookup/lib/puppet/util/extlookup/csv_parser.rb to
>> /usr/lib/ruby/site_ruby/1.8/puppet/util/extlookup
>> Added puppet-extlookup/lib/puppet/util/extlookup/yaml_parser.rb to
>> /usr/lib/ruby/site_ruby/1.8/puppet/util/extlookup
>> Added puppet-extlookup/lib/puppet/util/extlookup/puppet_parser.rb to
>> /usr/lib/ruby/site_ruby/1.8/puppet/util/extlookup
>>
>> Created /etc/puppet/extlookup.yaml:
>> ---
>> :parser: YAML
>> :precedence:
>> - environment_%{environment}
>> - common
>> :yaml:
>>   :datadir: /etc/puppet/extdata
>>
>> Created /etc/puppet/extdata/settings.yaml:
>> ---
>> testkey: testval
>>
>> Calling with:
>> $test_var = extlookup('testkey', '---', 'settings.yaml')
>> notice("TEST VAR=$test_var")
>>
>> And $test_var is always '---'. Replacing settings.yaml with a bogus file
>> name also returns '---', which tells me that the file isn't being found.
>> What am I missing here? Quite possibly a lot given the really bad docs.
>>
>> What is 'precedence' for? Not documented.
>>
>> Doug.
>>
>>
>>
Thanks Aaron. Seems you've had some experience with this, so..

I'm a little confused about how it loads complex data. With a very simple
YAML file like this:

---
testkey:
- Doug
- Bob
- Bill

calling $test_var = extlookup('testkey', '---', 'settings') gives me a
string 'DougBobBill', which isn't what I expected to see. Actually, now that
I think about it, I'm not sure what I'm supposed to see.

Also, if I had this:

---
testkey1:
  testkey2:
- Doug

how do I access the key testkey2?

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Hiera

2011-08-03 Thread Douglas Garstang
Uhm, use it. I stopped for now as every time I tried to load a key on the
command line I got errors, but I realised that there wasn't even a puppet
code example, just a ruby one. Is this even designed to be used inside
puppet?

Doug.

On Wed, Aug 3, 2011 at 4:16 PM, Scott Smith  wrote:

> Looks pretty straight forward to me. What are you trying to do?
>
> On Wed, Aug 3, 2011 at 1:29 PM, Douglas Garstang 
> wrote:
>
>> Anyone using? The docs are really bad.
>>
>> Doug
>>
>>  --
>> 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
>> puppet-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/puppet-users?hl=en.
>>
>
>  --
> 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
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>



-- 
Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garst...@gmail.com
Cell: +1-805-340-5627

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Hiera

2011-08-03 Thread Douglas Garstang
On Wed, Aug 3, 2011 at 4:22 PM, Scott Smith  wrote:

> https://github.com/ripienaar/hiera-puppet
>
> Check the "Puppet" section in the heira README
>
>
>
>
Are you referring to this?

'It also includes a Puppet function that works like extlookup() but uses the
Hiera backends.'.

I _may_ need a little more than that to get going...

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Extlookup() again.

2011-08-03 Thread Douglas Garstang
On Wed, Aug 3, 2011 at 4:25 PM, Aaron Grewell wrote:

> Example Config:
> ---
> :parser: YAML
> :precedence:
> - %{environment}/nodes/%{fqdn}
> - %{environment}/nodes/cluster_%{cluster}
> - %{environment}/nodes/site_%{site}
> - %{environment}/nodes/default
> :yaml:
>:datadir: /usr/share/puppet/environments
>
> Example call:
> $default_packages = extlookup('linux_default_packages')
>
> Given an environment called 'testing', cluster called 'cluster1', site
> called 'site1' and a node called localhost.localdomain it will look for
> variable 'linux_default_packages' in:
>
> /usr/share/puppet/environments/testing/localhost.localdomain.yaml
> /usr/share/puppet/environments/testing/cluster_cluster1.yaml
> /usr/share/puppet/environments/testing/site_site1.yaml
> /usr/share/puppet/environments/testing/default.yaml
>
> In that order, which means you can set this at the default level, then
> override at any lower level you like.  Make sense?
>
>
>
Aaron, makes sense. I wasn't so interested in the defaulting behaviour,
because you can do the same thing with extlookup itself with something like
this:

$ssh_idle_timeout = extlookup("SshIdleTimeout", extlookup("SshIdleTimeout",
extlookup("SshIdleTimeout", "" ,"settings/nodes/_global"),
"settings/nodes/${domain}"), "settings/nodes/${fqdn}")

In fact, I haven't had a chance to think fully though it yet, but I think
this implementation of extlookup actually removes functionality. By chaining
extlookup() calls together like I have above you can determine what lookup
order you want to use whenver you want, rather than having to rely on a
centrally configured file.

But... I was much more interested in what I thought was the possibility of
storing complex YAML data and retrieving it with puppet. What does
$linux_default_packages end up looking like? Is it a string? If it's a
string, how do you parse it?

I dunno... seems like all you can store in the yaml files is key/value
pairs, which means it's no better than using a CSV file. No?

Doug

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Hiera

2011-08-03 Thread Douglas Garstang
So, I'll ask this question...

With hiera, can you retrieve complex multi level YAML data at any level and
return it in it's base format, as a string, array etc? If not, it's no
better than csv.

Doug.

On Wed, Aug 3, 2011 at 4:30 PM, Scott Smith  wrote:

> Check the example directory, probably what you're looking for
>
> https://github.com/ripienaar/hiera-puppet/tree/master/example
>
> On Wed, Aug 3, 2011 at 4:26 PM, Douglas Garstang 
> wrote:
>
>> On Wed, Aug 3, 2011 at 4:22 PM, Scott Smith  wrote:
>>
>>> https://github.com/ripienaar/hiera-puppet
>>>
>>> Check the "Puppet" section in the heira README
>>>
>>>
>>>
>>>
>> Are you referring to this?
>>
>> 'It also includes a Puppet function that works like extlookup() but uses
>> the Hiera backends.'.
>>
>> I _may_ need a little more than that to get going...
>>
>> Doug.
>>
>> --
>> 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
>> puppet-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/puppet-users?hl=en.
>>
>
>  --
> 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
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>



-- 
Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garst...@gmail.com
Cell: +1-805-340-5627

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Extlookup() again.

2011-08-03 Thread Douglas Garstang
Ok, so am I getting 'DougBobBill' when I use $test_var =
extlookup('testkey', '---', 'settings') on this file?

---
testkey:
- Doug
- Bob
- Bill

Doug

On Wed, Aug 3, 2011 at 4:34 PM, Aaron Grewell wrote:

> It's an array, which can then be exploded into a whole set of package
> resources with a single entry:
> package {$default_packages:}
>
> On Wed, Aug 3, 2011 at 4:31 PM, Douglas Garstang 
> wrote:
>
>> On Wed, Aug 3, 2011 at 4:25 PM, Aaron Grewell wrote:
>>
>>> Example Config:
>>> ---
>>> :parser: YAML
>>> :precedence:
>>> - %{environment}/nodes/%{fqdn}
>>> - %{environment}/nodes/cluster_%{cluster}
>>> - %{environment}/nodes/site_%{site}
>>> - %{environment}/nodes/default
>>> :yaml:
>>>:datadir: /usr/share/puppet/environments
>>>
>>> Example call:
>>> $default_packages = extlookup('linux_default_packages')
>>>
>>> Given an environment called 'testing', cluster called 'cluster1', site
>>> called 'site1' and a node called localhost.localdomain it will look for
>>> variable 'linux_default_packages' in:
>>>
>>> /usr/share/puppet/environments/testing/localhost.localdomain.yaml
>>> /usr/share/puppet/environments/testing/cluster_cluster1.yaml
>>> /usr/share/puppet/environments/testing/site_site1.yaml
>>> /usr/share/puppet/environments/testing/default.yaml
>>>
>>> In that order, which means you can set this at the default level, then
>>> override at any lower level you like.  Make sense?
>>>
>>>
>>>
>> Aaron, makes sense. I wasn't so interested in the defaulting behaviour,
>> because you can do the same thing with extlookup itself with something like
>> this:
>>
>> $ssh_idle_timeout = extlookup("SshIdleTimeout",
>> extlookup("SshIdleTimeout", extlookup("SshIdleTimeout", ""
>> ,"settings/nodes/_global"), "settings/nodes/${domain}"),
>> "settings/nodes/${fqdn}")
>>
>> In fact, I haven't had a chance to think fully though it yet, but I think
>> this implementation of extlookup actually removes functionality. By chaining
>> extlookup() calls together like I have above you can determine what lookup
>> order you want to use whenver you want, rather than having to rely on a
>> centrally configured file.
>>
>> But... I was much more interested in what I thought was the possibility of
>> storing complex YAML data and retrieving it with puppet. What does
>> $linux_default_packages end up looking like? Is it a string? If it's a
>> string, how do you parse it?
>>
>> I dunno... seems like all you can store in the yaml files is key/value
>> pairs, which means it's no better than using a CSV file. No?
>>
>> Doug
>>
>>
>>  --
>> 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
>> puppet-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/puppet-users?hl=en.
>>
>
>  --
> 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
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>



-- 
Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garst...@gmail.com
Cell: +1-805-340-5627

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Extlookup() again.

2011-08-03 Thread Douglas Garstang
My own post? y?

On Wed, Aug 3, 2011 at 4:40 PM, Scott Smith  wrote:

> http://groups.google.com/group/puppet-users/msg/6432a6dd539b542f
>
>
> On Wed, Aug 3, 2011 at 4:37 PM, Douglas Garstang 
> wrote:
>
>> Ok, so am I getting 'DougBobBill' when I use $test_var =
>> extlookup('testkey', '---', 'settings') on this file?
>>
>> ---
>> testkey:
>> - Doug
>> - Bob
>> - Bill
>>
>> Doug
>>
>> On Wed, Aug 3, 2011 at 4:34 PM, Aaron Grewell wrote:
>>
>>> It's an array, which can then be exploded into a whole set of package
>>> resources with a single entry:
>>> package {$default_packages:}
>>>
>>> On Wed, Aug 3, 2011 at 4:31 PM, Douglas Garstang <
>>> doug.garst...@gmail.com> wrote:
>>>
>>>> On Wed, Aug 3, 2011 at 4:25 PM, Aaron Grewell 
>>>> wrote:
>>>>
>>>>> Example Config:
>>>>> ---
>>>>> :parser: YAML
>>>>> :precedence:
>>>>> - %{environment}/nodes/%{fqdn}
>>>>> - %{environment}/nodes/cluster_%{cluster}
>>>>> - %{environment}/nodes/site_%{site}
>>>>> - %{environment}/nodes/default
>>>>> :yaml:
>>>>>:datadir: /usr/share/puppet/environments
>>>>>
>>>>> Example call:
>>>>> $default_packages = extlookup('linux_default_packages')
>>>>>
>>>>> Given an environment called 'testing', cluster called 'cluster1', site
>>>>> called 'site1' and a node called localhost.localdomain it will look for
>>>>> variable 'linux_default_packages' in:
>>>>>
>>>>> /usr/share/puppet/environments/testing/localhost.localdomain.yaml
>>>>> /usr/share/puppet/environments/testing/cluster_cluster1.yaml
>>>>> /usr/share/puppet/environments/testing/site_site1.yaml
>>>>> /usr/share/puppet/environments/testing/default.yaml
>>>>>
>>>>> In that order, which means you can set this at the default level, then
>>>>> override at any lower level you like.  Make sense?
>>>>>
>>>>>
>>>>>
>>>> Aaron, makes sense. I wasn't so interested in the defaulting behaviour,
>>>> because you can do the same thing with extlookup itself with something like
>>>> this:
>>>>
>>>> $ssh_idle_timeout = extlookup("SshIdleTimeout",
>>>> extlookup("SshIdleTimeout", extlookup("SshIdleTimeout", ""
>>>> ,"settings/nodes/_global"), "settings/nodes/${domain}"),
>>>> "settings/nodes/${fqdn}")
>>>>
>>>> In fact, I haven't had a chance to think fully though it yet, but I
>>>> think this implementation of extlookup actually removes functionality. By
>>>> chaining extlookup() calls together like I have above you can determine 
>>>> what
>>>> lookup order you want to use whenver you want, rather than having to rely 
>>>> on
>>>> a centrally configured file.
>>>>
>>>> But... I was much more interested in what I thought was the possibility
>>>> of storing complex YAML data and retrieving it with puppet. What does
>>>> $linux_default_packages end up looking like? Is it a string? If it's a
>>>> string, how do you parse it?
>>>>
>>>> I dunno... seems like all you can store in the yaml files is key/value
>>>> pairs, which means it's no better than using a CSV file. No?
>>>>
>>>> Doug
>>>>
>>>>
>>>>  --
>>>> 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
>>>> puppet-users+unsubscr...@googlegroups.com.
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/puppet-users?hl=en.
>>>>
>>>
>>>  --
>>> 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
>>> puppet-users+unsubscr...@googlegroups.com.
>>> For mo

Re: [Puppet Users] Hiera

2011-08-03 Thread Douglas Garstang
Ah that makes sense so i'll give that a try but ... how do I
access a key that's deep down in the data structure? Not possible?

On Wed, Aug 3, 2011 at 4:46 PM, Aaron Grewell wrote:

> Yes.  You're probably being confused by Puppet's default behavior, which is
> to concatenate arrays & hashes together into a string representation when
> you're printing it.
>
>
> On Wed, Aug 3, 2011 at 4:34 PM, Douglas Garstang 
> wrote:
>
>> So, I'll ask this question...
>>
>> With hiera, can you retrieve complex multi level YAML data at any level
>> and return it in it's base format, as a string, array etc? If not, it's no
>> better than csv.
>>
>> Doug.
>>
>> On Wed, Aug 3, 2011 at 4:30 PM, Scott Smith  wrote:
>>
>>> Check the example directory, probably what you're looking for
>>>
>>> https://github.com/ripienaar/hiera-puppet/tree/master/example
>>>
>>> On Wed, Aug 3, 2011 at 4:26 PM, Douglas Garstang <
>>> doug.garst...@gmail.com> wrote:
>>>
>>>> On Wed, Aug 3, 2011 at 4:22 PM, Scott Smith  wrote:
>>>>
>>>>> https://github.com/ripienaar/hiera-puppet
>>>>>
>>>>> Check the "Puppet" section in the heira README
>>>>>
>>>>>
>>>>>
>>>>>
>>>> Are you referring to this?
>>>>
>>>> 'It also includes a Puppet function that works like extlookup() but
>>>> uses the Hiera backends.'.
>>>>
>>>> I _may_ need a little more than that to get going...
>>>>
>>>> Doug.
>>>>
>>>> --
>>>> 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
>>>> puppet-users+unsubscr...@googlegroups.com.
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/puppet-users?hl=en.
>>>>
>>>
>>>  --
>>> 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
>>> puppet-users+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/puppet-users?hl=en.
>>>
>>
>>
>>
>> --
>> Regards,
>>
>> Douglas Garstang
>> http://www.linkedin.com/in/garstang
>> Email: doug.garst...@gmail.com
>> Cell: +1-805-340-5627
>>
>>  --
>> 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
>> puppet-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/puppet-users?hl=en.
>>
>
>  --
> 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
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>



-- 
Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garst...@gmail.com
Cell: +1-805-340-5627

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Hiera

2011-08-03 Thread Douglas Garstang
Aaron,

I'm not sure you understood my question. I was asking how I could do that
with extlookup. Your saying that this should work?

$test_var = extlookup('testkey1[testkey2]', '---', 'settings')

Doug.

On Wed, Aug 3, 2011 at 4:53 PM, Aaron Grewell wrote:

> variable[key][subkey][subsubkey]
>
> You've really got to read the language guide, it explains the use of arrays
> and hashes pretty well:
> http://docs.puppetlabs.com/guides/language_guide.html
>
>
> On Wed, Aug 3, 2011 at 4:49 PM, Douglas Garstang 
> wrote:
>
>> Ah that makes sense so i'll give that a try but ... how do
>> I access a key that's deep down in the data structure? Not possible?
>>
>> On Wed, Aug 3, 2011 at 4:46 PM, Aaron Grewell wrote:
>>
>>> Yes.  You're probably being confused by Puppet's default behavior, which
>>> is to concatenate arrays & hashes together into a string representation when
>>> you're printing it.
>>>
>>>
>>> On Wed, Aug 3, 2011 at 4:34 PM, Douglas Garstang <
>>> doug.garst...@gmail.com> wrote:
>>>
>>>> So, I'll ask this question...
>>>>
>>>> With hiera, can you retrieve complex multi level YAML data at any level
>>>> and return it in it's base format, as a string, array etc? If not, it's no
>>>> better than csv.
>>>>
>>>> Doug.
>>>>
>>>> On Wed, Aug 3, 2011 at 4:30 PM, Scott Smith  wrote:
>>>>
>>>>> Check the example directory, probably what you're looking for
>>>>>
>>>>> https://github.com/ripienaar/hiera-puppet/tree/master/example
>>>>>
>>>>> On Wed, Aug 3, 2011 at 4:26 PM, Douglas Garstang <
>>>>> doug.garst...@gmail.com> wrote:
>>>>>
>>>>>> On Wed, Aug 3, 2011 at 4:22 PM, Scott Smith  wrote:
>>>>>>
>>>>>>> https://github.com/ripienaar/hiera-puppet
>>>>>>>
>>>>>>> Check the "Puppet" section in the heira README
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> Are you referring to this?
>>>>>>
>>>>>> 'It also includes a Puppet function that works like extlookup() but
>>>>>> uses the Hiera backends.'.
>>>>>>
>>>>>> I _may_ need a little more than that to get going...
>>>>>>
>>>>>> Doug.
>>>>>>
>>>>>> --
>>>>>> 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
>>>>>> puppet-users+unsubscr...@googlegroups.com.
>>>>>> For more options, visit this group at
>>>>>> http://groups.google.com/group/puppet-users?hl=en.
>>>>>>
>>>>>
>>>>>  --
>>>>> 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
>>>>> puppet-users+unsubscr...@googlegroups.com.
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/puppet-users?hl=en.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Regards,
>>>>
>>>> Douglas Garstang
>>>> http://www.linkedin.com/in/garstang
>>>> Email: doug.garst...@gmail.com
>>>> Cell: +1-805-340-5627
>>>>
>>>>  --
>>>> 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
>>>> puppet-users+unsubscr...@googlegroups.com.
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/puppet-users?hl=en.
>>>>
>>>
>>>  --
>>> You received this message because you are subscribed to the Google Groups
>>> "Puppet Users" group.
>>> To post to th

Re: [Puppet Users] Hiera

2011-08-03 Thread Douglas Garstang
No luck with that either.

On Wed, Aug 3, 2011 at 5:51 PM, Aaron Grewell wrote:

> No,  pull the whole hash and break it down afterwards.
> On Aug 3, 2011 5:15 PM, "Douglas Garstang" 
> wrote:
> > Aaron,
> >
> > I'm not sure you understood my question. I was asking how I could do that
> > with extlookup. Your saying that this should work?
> >
> > $test_var = extlookup('testkey1[testkey2]', '---', 'settings')
> >
> > Doug.
> >
> > On Wed, Aug 3, 2011 at 4:53 PM, Aaron Grewell  >wrote:
> >
> >> variable[key][subkey][subsubkey]
> >>
> >> You've really got to read the language guide, it explains the use of
> arrays
> >> and hashes pretty well:
> >> http://docs.puppetlabs.com/guides/language_guide.html
> >>
> >>
> >> On Wed, Aug 3, 2011 at 4:49 PM, Douglas Garstang <
> doug.garst...@gmail.com>wrote:
> >>
> >>> Ah that makes sense so i'll give that a try but ... how
> do
> >>> I access a key that's deep down in the data structure? Not possible?
> >>>
> >>> On Wed, Aug 3, 2011 at 4:46 PM, Aaron Grewell  >wrote:
> >>>
> >>>> Yes. You're probably being confused by Puppet's default behavior,
> which
> >>>> is to concatenate arrays & hashes together into a string
> representation when
> >>>> you're printing it.
> >>>>
> >>>>
> >>>> On Wed, Aug 3, 2011 at 4:34 PM, Douglas Garstang <
> >>>> doug.garst...@gmail.com> wrote:
> >>>>
> >>>>> So, I'll ask this question...
> >>>>>
> >>>>> With hiera, can you retrieve complex multi level YAML data at any
> level
> >>>>> and return it in it's base format, as a string, array etc? If not,
> it's no
> >>>>> better than csv.
> >>>>>
> >>>>> Doug.
> >>>>>
> >>>>> On Wed, Aug 3, 2011 at 4:30 PM, Scott Smith  wrote:
> >>>>>
> >>>>>> Check the example directory, probably what you're looking for
> >>>>>>
> >>>>>> https://github.com/ripienaar/hiera-puppet/tree/master/example
> >>>>>>
> >>>>>> On Wed, Aug 3, 2011 at 4:26 PM, Douglas Garstang <
> >>>>>> doug.garst...@gmail.com> wrote:
> >>>>>>
> >>>>>>> On Wed, Aug 3, 2011 at 4:22 PM, Scott Smith 
> wrote:
> >>>>>>>
> >>>>>>>> https://github.com/ripienaar/hiera-puppet
> >>>>>>>>
> >>>>>>>> Check the "Puppet" section in the heira README
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>> Are you referring to this?
> >>>>>>>
> >>>>>>> 'It also includes a Puppet function that works like extlookup() but
> >>>>>>> uses the Hiera backends.'.
> >>>>>>>
> >>>>>>> I _may_ need a little more than that to get going...
> >>>>>>>
> >>>>>>> Doug.
> >>>>>>>
> >>>>>>> --
> >>>>>>> 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
> >>>>>>> puppet-users+unsubscr...@googlegroups.com.
> >>>>>>> For more options, visit this group at
> >>>>>>> http://groups.google.com/group/puppet-users?hl=en.
> >>>>>>>
> >>>>>>
> >>>>>> --
> >>>>>> 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
> >>>>>> puppet-users+unsubscr...@googlegroups.com.
> >>>>>> For more options, visit this group at
> >>>>>

Re: [Puppet Users] Hiera

2011-08-03 Thread Douglas Garstang
Well, this is weird...

If I have this yaml file:

---
customer:
given:   Dorothy
family:  Gale

and this puppet code:

$t = extlookup("customer", '---', 'settings')
notice("$t['given']")

then the value displayed is:
givenDorothyfamilyGale['given']

which is pretty crappy. However, if I put the same thing in a template:

<%= t['given'] %>

and when the template runs, I get 'Dorothy', which is correct. So... what
should I be doing here? Should I just load up the entire thing into puppet
and use ruby magic inside templates to get the values I need? Why can't
puppet even print these values out? How do I access them in the puppet? The
language guide says I can do this...

Doug.


On Wed, Aug 3, 2011 at 6:00 PM, Douglas Garstang wrote:

> No luck with that either.
>
>
> On Wed, Aug 3, 2011 at 5:51 PM, Aaron Grewell wrote:
>
>> No,  pull the whole hash and break it down afterwards.
>> On Aug 3, 2011 5:15 PM, "Douglas Garstang" 
>> wrote:
>> > Aaron,
>> >
>> > I'm not sure you understood my question. I was asking how I could do
>> that
>> > with extlookup. Your saying that this should work?
>> >
>> > $test_var = extlookup('testkey1[testkey2]', '---', 'settings')
>> >
>> > Doug.
>> >
>> > On Wed, Aug 3, 2011 at 4:53 PM, Aaron Grewell > >wrote:
>> >
>> >> variable[key][subkey][subsubkey]
>> >>
>> >> You've really got to read the language guide, it explains the use of
>> arrays
>> >> and hashes pretty well:
>> >> http://docs.puppetlabs.com/guides/language_guide.html
>> >>
>> >>
>> >> On Wed, Aug 3, 2011 at 4:49 PM, Douglas Garstang <
>> doug.garst...@gmail.com>wrote:
>> >>
>> >>> Ah that makes sense so i'll give that a try but ...
>> how do
>> >>> I access a key that's deep down in the data structure? Not possible?
>> >>>
>> >>> On Wed, Aug 3, 2011 at 4:46 PM, Aaron Grewell <
>> aaron.grew...@gmail.com>wrote:
>> >>>
>> >>>> Yes. You're probably being confused by Puppet's default behavior,
>> which
>> >>>> is to concatenate arrays & hashes together into a string
>> representation when
>> >>>> you're printing it.
>> >>>>
>> >>>>
>> >>>> On Wed, Aug 3, 2011 at 4:34 PM, Douglas Garstang <
>> >>>> doug.garst...@gmail.com> wrote:
>> >>>>
>> >>>>> So, I'll ask this question...
>> >>>>>
>> >>>>> With hiera, can you retrieve complex multi level YAML data at any
>> level
>> >>>>> and return it in it's base format, as a string, array etc? If not,
>> it's no
>> >>>>> better than csv.
>> >>>>>
>> >>>>> Doug.
>> >>>>>
>> >>>>> On Wed, Aug 3, 2011 at 4:30 PM, Scott Smith 
>> wrote:
>> >>>>>
>> >>>>>> Check the example directory, probably what you're looking for
>> >>>>>>
>> >>>>>> https://github.com/ripienaar/hiera-puppet/tree/master/example
>> >>>>>>
>> >>>>>> On Wed, Aug 3, 2011 at 4:26 PM, Douglas Garstang <
>> >>>>>> doug.garst...@gmail.com> wrote:
>> >>>>>>
>> >>>>>>> On Wed, Aug 3, 2011 at 4:22 PM, Scott Smith 
>> wrote:
>> >>>>>>>
>> >>>>>>>> https://github.com/ripienaar/hiera-puppet
>> >>>>>>>>
>> >>>>>>>> Check the "Puppet" section in the heira README
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>> Are you referring to this?
>> >>>>>>>
>> >>>>>>> 'It also includes a Puppet function that works like extlookup()
>> but
>> >>>>>>> uses the Hiera backends.'.
>> >>>>>>>
>> >>>>>>> I _may_ need a little more than that to get going...
>> >>>>>>>
>> >>>>>>> Doug.
>> >>>>

Re: [Puppet Users] Hiera

2011-08-03 Thread Douglas Garstang
Crap.

Should be:

 notice($t['given'])

I need a vacation...


On Wed, Aug 3, 2011 at 6:09 PM, Douglas Garstang wrote:

> Well, this is weird...
>
> If I have this yaml file:
>
> ---
> customer:
> given:   Dorothy
> family:  Gale
>
> and this puppet code:
>
> $t = extlookup("customer", '---', 'settings')
> notice("$t['given']")
>
> then the value displayed is:
> givenDorothyfamilyGale['given']
>
> which is pretty crappy. However, if I put the same thing in a template:
>
> <%= t['given'] %>
>
> and when the template runs, I get 'Dorothy', which is correct. So... what
> should I be doing here? Should I just load up the entire thing into puppet
> and use ruby magic inside templates to get the values I need? Why can't
> puppet even print these values out? How do I access them in the puppet? The
> language guide says I can do this...
>
> Doug.
>
>
> On Wed, Aug 3, 2011 at 6:00 PM, Douglas Garstang 
> wrote:
>
>> No luck with that either.
>>
>>
>> On Wed, Aug 3, 2011 at 5:51 PM, Aaron Grewell wrote:
>>
>>> No,  pull the whole hash and break it down afterwards.
>>> On Aug 3, 2011 5:15 PM, "Douglas Garstang" 
>>> wrote:
>>> > Aaron,
>>> >
>>> > I'm not sure you understood my question. I was asking how I could do
>>> that
>>> > with extlookup. Your saying that this should work?
>>> >
>>> > $test_var = extlookup('testkey1[testkey2]', '---', 'settings')
>>> >
>>> > Doug.
>>> >
>>> > On Wed, Aug 3, 2011 at 4:53 PM, Aaron Grewell >> >wrote:
>>> >
>>> >> variable[key][subkey][subsubkey]
>>> >>
>>> >> You've really got to read the language guide, it explains the use of
>>> arrays
>>> >> and hashes pretty well:
>>> >> http://docs.puppetlabs.com/guides/language_guide.html
>>> >>
>>> >>
>>> >> On Wed, Aug 3, 2011 at 4:49 PM, Douglas Garstang <
>>> doug.garst...@gmail.com>wrote:
>>> >>
>>> >>> Ah that makes sense so i'll give that a try but ...
>>> how do
>>> >>> I access a key that's deep down in the data structure? Not possible?
>>> >>>
>>> >>> On Wed, Aug 3, 2011 at 4:46 PM, Aaron Grewell <
>>> aaron.grew...@gmail.com>wrote:
>>> >>>
>>> >>>> Yes. You're probably being confused by Puppet's default behavior,
>>> which
>>> >>>> is to concatenate arrays & hashes together into a string
>>> representation when
>>> >>>> you're printing it.
>>> >>>>
>>> >>>>
>>> >>>> On Wed, Aug 3, 2011 at 4:34 PM, Douglas Garstang <
>>> >>>> doug.garst...@gmail.com> wrote:
>>> >>>>
>>> >>>>> So, I'll ask this question...
>>> >>>>>
>>> >>>>> With hiera, can you retrieve complex multi level YAML data at any
>>> level
>>> >>>>> and return it in it's base format, as a string, array etc? If not,
>>> it's no
>>> >>>>> better than csv.
>>> >>>>>
>>> >>>>> Doug.
>>> >>>>>
>>> >>>>> On Wed, Aug 3, 2011 at 4:30 PM, Scott Smith 
>>> wrote:
>>> >>>>>
>>> >>>>>> Check the example directory, probably what you're looking for
>>> >>>>>>
>>> >>>>>> https://github.com/ripienaar/hiera-puppet/tree/master/example
>>> >>>>>>
>>> >>>>>> On Wed, Aug 3, 2011 at 4:26 PM, Douglas Garstang <
>>> >>>>>> doug.garst...@gmail.com> wrote:
>>> >>>>>>
>>> >>>>>>> On Wed, Aug 3, 2011 at 4:22 PM, Scott Smith 
>>> wrote:
>>> >>>>>>>
>>> >>>>>>>> https://github.com/ripienaar/hiera-puppet
>>> >>>>>>>>
>>> >>>>>>>> Check the "Puppet" section in the heira README
>>> >>>>>>>>
>>> >>>>>>>>
>>> >>>&

[Puppet Users] Hash Interpolation inside double quotes?

2011-08-08 Thread Douglas Garstang
I've got this:

file {
'/opt/sugarsync/tomcat/tomcat-home/current':
ensure => "tomcat-$config['tomcat_version_server']";

where $config['tomcat_version_server'] was set with extlookup (the yaml
one), by loading:

---
tomcat_config:
  tomcat_version_server: 6.0.20-1
  tomcat_version_libs: 1.0-1

Inside those double quotes, where variable interpolation is supposed to
occur, I'm actually getting:

tomcat-tomcat_version_libs1.0-1tomcat_version_server6.0.20-1['tomcat_version_server']

Not '6.0.20-1'. How can I interpolate a hash inside a string? Is this a bug?

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Hash Interpolation inside double quotes?

2011-08-08 Thread Douglas Garstang
Hmmm I tried that, with:

file {
'/opt/sugarsync/tomcat/tomcat-home/current':
ensure => inline_template("tomcat-<%=
$config['tomcat_version_server'] %>");
}

and that results in:

Aug  8 11:51:03 hpma01p1 puppet-master[18712]: compile error (erb):1: no
. floating literal anymore; put 0 before dot _erbout = '';
_erbout.concat "tomcat-"; _erbout.concat((
tomcat_version_libs1.0-1tomcat_version_server6.0.20-1['tomcat_version_server']
).to_s); _erbout
  ^ (erb):1: syntax error _erbout = ''; _erbout.concat
"tomcat-"; _erbout.concat((
tomcat_version_libs1.0-1tomcat_version_server6.0.20-1['tomcat_version_server']
).to_s); _erbout
   ^ (erb):1: syntax error _erbout = ''; _erbout.concat
"tomcat-"; _erbout.concat((
tomcat_version_libs1.0-1tomcat_version_server6.0.20-1['tomcat_version_server']
).to_s); _erbout
   ^ (erb):1: no . floating
literal anymore; put 0 before dot _erbout = ''; _erbout.concat "tomcat-";
_erbout.concat(( tomcat_versi



On Mon, Aug 8, 2011 at 11:22 AM, Brian Gallew  wrote:

> String interpolation in the Puppet DSL is strictly variable->string, and
> does not handle arrays.  For what you want, use
> inline_template("tomcat-<%= $config['tomcat_version_server'] %>")
>
>
> On Aug 8, 2011, at 11:19 AM, Douglas Garstang wrote:
>
> > I've got this:
> >
> > file {
> > '/opt/sugarsync/tomcat/tomcat-home/current':
> > ensure => "tomcat-$config['tomcat_version_server']";
> >
> > where $config['tomcat_version_server'] was set with extlookup (the yaml
> one), by loading:
> >
> > ---
> > tomcat_config:
> >   tomcat_version_server: 6.0.20-1
> >   tomcat_version_libs: 1.0-1
> >
> > Inside those double quotes, where variable interpolation is supposed to
> occur, I'm actually getting:
> >
> >
> tomcat-tomcat_version_libs1.0-1tomcat_version_server6.0.20-1['tomcat_version_server']
> >
> > Not '6.0.20-1'. How can I interpolate a hash inside a string? Is this a
> bug?
> >
> > Doug.
> >
> > --
> > 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
> puppet-users+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
> --
> 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
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
>


-- 
Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garst...@gmail.com
Cell: +1-805-340-5627

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Hash Interpolation inside double quotes?

2011-08-08 Thread Douglas Garstang
Thanks. That did it. Ugly...

On Mon, Aug 8, 2011 at 12:47 PM, vagn scott  wrote:

> On 08/08/2011 02:52 PM, Douglas Garstang wrote:
>
>>
>>file {
>>'/opt/sugarsync/tomcat/tomcat-**home/current':
>>ensure => inline_template("tomcat-<%= $config['tomcat_version_
>> **server'] %>");
>>}
>>
>>
> Try without the dollar sign:
>
>
>  file {
>'/opt/sugarsync/tomcat/tomcat-**home/current':
>ensure => inline_template("tomcat-<%=
> config['tomcat_version_server'**] %>");
>}
>
> --
> 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 puppet-users+unsubscribe@**
> googlegroups.com .
> For more options, visit this group at http://groups.google.com/**
> group/puppet-users?hl=en<http://groups.google.com/group/puppet-users?hl=en>
> .
>
>


-- 
Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garst...@gmail.com
Cell: +1-805-340-5627

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Hash Interpolation inside double quotes?

2011-08-08 Thread Douglas Garstang
I wasn't trying to use double quotes inside a double quoted string.

On Mon, Aug 8, 2011 at 1:01 PM, Scott Smith  wrote:

> Works the same as it does in Bourne shell. If you want to use double quotes
> inside a double-quoted string, you have to escape them. Or use single
> quotes.
>
> On Mon, Aug 8, 2011 at 12:58 PM, Douglas Garstang  > wrote:
>
>> Thanks. That did it. Ugly...
>>
>>
>> On Mon, Aug 8, 2011 at 12:47 PM, vagn scott  wrote:
>>
>>> On 08/08/2011 02:52 PM, Douglas Garstang wrote:
>>>
>>>>
>>>>file {
>>>>'/opt/sugarsync/tomcat/tomcat-**home/current':
>>>>ensure => inline_template("tomcat-<%=
>>>> $config['tomcat_version_**server'] %>");
>>>>}
>>>>
>>>>
>>> Try without the dollar sign:
>>>
>>>
>>>  file {
>>>'/opt/sugarsync/tomcat/tomcat-**home/current':
>>>ensure => inline_template("tomcat-<%=
>>> config['tomcat_version_server'**] %>");
>>>}
>>>
>>> --
>>> 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 puppet-users+unsubscribe@*
>>> *googlegroups.com .
>>> For more options, visit this group at http://groups.google.com/**
>>> group/puppet-users?hl=en<http://groups.google.com/group/puppet-users?hl=en>
>>> .
>>>
>>>
>>
>>
>> --
>> Regards,
>>
>> Douglas Garstang
>> http://www.linkedin.com/in/garstang
>> Email: doug.garst...@gmail.com
>> Cell: +1-805-340-5627
>>
>>  --
>> 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
>> puppet-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/puppet-users?hl=en.
>>
>
>  --
> 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
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>



-- 
Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garst...@gmail.com
Cell: +1-805-340-5627

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Hash Interpolation inside double quotes?

2011-08-08 Thread Douglas Garstang
But, I would like to replace:

file {
"${tomcat_home_dir}/current":
ensure => inline_template("tomcat-<%=
config['tomcat_version_server'] %>");
}

with:

file {
"$config['tomcat_home_dir']/current":
ensure => inline_template("tomcat-<%=
config['tomcat_version_server'] %>");
}

... and I don't think that will work. Obviously, I can't use an inline
template here...

Doug.

On Mon, Aug 8, 2011 at 1:11 PM, Scott Smith  wrote:

> D'oh, looks like I need to refresh my vision prescription :(
>
>
> On Mon, Aug 8, 2011 at 1:09 PM, Douglas Garstang 
> wrote:
>
>> I wasn't trying to use double quotes inside a double quoted string.
>>
>>
>> On Mon, Aug 8, 2011 at 1:01 PM, Scott Smith  wrote:
>>
>>> Works the same as it does in Bourne shell. If you want to use double
>>> quotes inside a double-quoted string, you have to escape them. Or use single
>>> quotes.
>>>
>>> On Mon, Aug 8, 2011 at 12:58 PM, Douglas Garstang <
>>> doug.garst...@gmail.com> wrote:
>>>
>>>> Thanks. That did it. Ugly...
>>>>
>>>>
>>>> On Mon, Aug 8, 2011 at 12:47 PM, vagn scott wrote:
>>>>
>>>>> On 08/08/2011 02:52 PM, Douglas Garstang wrote:
>>>>>
>>>>>>
>>>>>>file {
>>>>>>'/opt/sugarsync/tomcat/tomcat-**home/current':
>>>>>>ensure => inline_template("tomcat-<%=
>>>>>> $config['tomcat_version_**server'] %>");
>>>>>>}
>>>>>>
>>>>>>
>>>>> Try without the dollar sign:
>>>>>
>>>>>
>>>>>  file {
>>>>>'/opt/sugarsync/tomcat/tomcat-**home/current':
>>>>>ensure => inline_template("tomcat-<%=
>>>>> config['tomcat_version_server'**] %>");
>>>>>}
>>>>>
>>>>> --
>>>>> 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
>>>>> puppet-users+unsubscribe@**googlegroups.com
>>>>> .
>>>>> For more options, visit this group at http://groups.google.com/**
>>>>> group/puppet-users?hl=en<http://groups.google.com/group/puppet-users?hl=en>
>>>>> .
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Regards,
>>>>
>>>> Douglas Garstang
>>>> http://www.linkedin.com/in/garstang
>>>> Email: doug.garst...@gmail.com
>>>> Cell: +1-805-340-5627
>>>>
>>>>  --
>>>> 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
>>>> puppet-users+unsubscr...@googlegroups.com.
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/puppet-users?hl=en.
>>>>
>>>
>>>  --
>>> 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
>>> puppet-users+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/puppet-users?hl=en.
>>>
>>
>>
>>
>> --
>> Regards,
>>
>> Douglas Garstang
>> http://www.linkedin.com/in/garstang
>> Email: doug.garst...@gmail.com
>> Cell: +1-805-340-5627
>>
>>  --
>> 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
>> puppet-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/puppet-users?hl=en.
>>
>
>  --
> 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
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>



-- 
Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garst...@gmail.com
Cell: +1-805-340-5627

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Hash Interpolation inside double quotes?

2011-08-08 Thread Douglas Garstang
Seems to work...

Thanks.

I got this:

file {
"${config['tomcat_home_dir']}/current":
ensure => "tomcat-${config['tomcat_version_server']}",
require => Package['ss-tomcat-server'];
}

Slightly cleaner than the inline template approach (which didn't work for
the name anyway).

Doug.

On Mon, Aug 8, 2011 at 2:25 PM, Stefan Schulte <
stefan.schu...@taunusstein.net> wrote:

> On Mon, Aug 08, 2011 at 11:19:36AM -0700, Douglas Garstang wrote:
> > I've got this:
> >
> > file {
> > '/opt/sugarsync/tomcat/tomcat-home/current':
> > ensure => "tomcat-$config['tomcat_version_server']";
> >
> > where $config['tomcat_version_server'] was set with extlookup (the yaml
> > one), by loading:
> >
> > ---
> > tomcat_config:
> >   tomcat_version_server: 6.0.20-1
> >   tomcat_version_libs: 1.0-1
> >
> > Inside those double quotes, where variable interpolation is supposed to
> > occur, I'm actually getting:
> >
> >
> tomcat-tomcat_version_libs1.0-1tomcat_version_server6.0.20-1['tomcat_version_server']
> >
> > Not '6.0.20-1'. How can I interpolate a hash inside a string? Is this a
> bug?
> >
> > Doug.
> >
> IIRC it should read "tomcat-${config['tomcat_version_server']}" (notice
> the curling braces). Otherwise puppet will print the hash first (and
> concats all keys and values) and then just put ['tomcat_version_server']
> after it.
>
> Does the above suggestion work?
>
> -Stefan
>



-- 
Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garst...@gmail.com
Cell: +1-805-340-5627

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Return a value from a definition?

2011-08-08 Thread Douglas Garstang
All,

I have this:

#
# External configuration data.
#
$config = extlookup("platform_config",
  extlookup("platform_config",
  extlookup("platform_config",
  extlookup("platform_config",
  "Unknown",
  "config/${ss_fac}/${ss_env}/${ss_clu}/${fqdn}/platform"),
  "config/${ss_fac}/${ss_env}/${ss_clu}/platform"),
  "config/${ss_fac}/${ss_env}/platform"),
  "config/${ss_fac}/platform")


... which is kinda ugly. Is there a way to wrap this up in a defintion and
return the value from the definition? As far as I know, definitions can't
return values.

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Enabling yum-repo on fly?

2011-08-15 Thread Douglas Garstang
You could do it with an Exec{} that enables the repo, another Exec{} that
does a yum clean (but requires the first Exec{}), a Package{} that requires
the first two Exec{}'s, and then a final Exec{} that disables the repo
again, and depends on everything else happening first. Ick

On Mon, Aug 15, 2011 at 11:17 AM, Sans  wrote:

> Dear all,
>
> Is there any way to enable a particular yum-repo (like: yum --
> enablerepo=), which is disabled as default, for a
> particular package installation? For our system, we need to "dag" for
> particular two packages but keeping it always enabled, clashes with
> other packages, which we don't want to install for dag at all. What's
> the option(s) I have to do that? Cheers!!
>
> --
> 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
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
>


-- 
Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garst...@gmail.com
Cell: +1-805-340-5627

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Dependency Cycle Weirdness

2011-08-17 Thread Douglas Garstang
If I have:

class service::common {
file {
'/etc/foo':
ensure => directory;

'/etc/init.d/ss-functions':
content => template('service/etc/init.d/ss-functions.erb'),
require => File['/etc/foo'],
}
}

class platform::common {
include service::common
File {
require => Class['service::common']
}
}

then puppet is telling me:
Aug 17 09:47:01 test01 puppet-agent[14530]: Could not apply complete
catalog: Found 1 dependency cycle: (File[/etc/foo] => Class[Service::Common]
=> File[/etc/foo]) Try the '--graph' option and opening the resulting '.dot'
file in OmniGraffle or GraphViz

I don't get it. How does /etc/foo depend on Service::Common? I mean, it's IN
that class... is that why it depends on it? Debugging these is awful...

Doug,

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Dependency Cycle Weirdness

2011-08-17 Thread Douglas Garstang
Oh. I didn't realise that. Thought it was darn Thanks.

On Wed, Aug 17, 2011 at 10:52 AM, Scott Smith  wrote:

> Don't think you need to include if there is a require
> On Aug 17, 2011 9:50 AM, "Douglas Garstang" 
> wrote:
> > If I have:
> >
> > class service::common {
> > file {
> > '/etc/foo':
> > ensure => directory;
> >
> > '/etc/init.d/ss-functions':
> > content => template('service/etc/init.d/ss-functions.erb'),
> > require => File['/etc/foo'],
> > }
> > }
> >
> > class platform::common {
> > include service::common
> > File {
> > require => Class['service::common']
> > }
> > }
> >
> > then puppet is telling me:
> > Aug 17 09:47:01 test01 puppet-agent[14530]: Could not apply complete
> > catalog: Found 1 dependency cycle: (File[/etc/foo] =>
> Class[Service::Common]
> > => File[/etc/foo]) Try the '--graph' option and opening the resulting
> '.dot'
> > file in OmniGraffle or GraphViz
> >
> > I don't get it. How does /etc/foo depend on Service::Common? I mean, it's
> IN
> > that class... is that why it depends on it? Debugging these is awful...
> >
> > Doug,
> >
> > --
> > 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
> puppet-users+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
> >
>
> --
> 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
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>



-- 
Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garst...@gmail.com
Cell: +1-805-340-5627

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Dependency Cycle Weirdness

2011-08-17 Thread Douglas Garstang
Actually, no, I think you DO need it.

On Wed, Aug 17, 2011 at 11:30 AM, Douglas Garstang
wrote:

> Oh. I didn't realise that. Thought it was darn Thanks.
>
>
> On Wed, Aug 17, 2011 at 10:52 AM, Scott Smith  wrote:
>
>> Don't think you need to include if there is a require
>> On Aug 17, 2011 9:50 AM, "Douglas Garstang" 
>> wrote:
>> > If I have:
>> >
>> > class service::common {
>> > file {
>> > '/etc/foo':
>> > ensure => directory;
>> >
>> > '/etc/init.d/ss-functions':
>> > content => template('service/etc/init.d/ss-functions.erb'),
>> > require => File['/etc/foo'],
>> > }
>> > }
>> >
>> > class platform::common {
>> > include service::common
>> > File {
>> > require => Class['service::common']
>> > }
>> > }
>> >
>> > then puppet is telling me:
>> > Aug 17 09:47:01 test01 puppet-agent[14530]: Could not apply complete
>> > catalog: Found 1 dependency cycle: (File[/etc/foo] =>
>> Class[Service::Common]
>> > => File[/etc/foo]) Try the '--graph' option and opening the resulting
>> '.dot'
>> > file in OmniGraffle or GraphViz
>> >
>> > I don't get it. How does /etc/foo depend on Service::Common? I mean,
>> it's IN
>> > that class... is that why it depends on it? Debugging these is awful...
>> >
>> > Doug,
>> >
>> > --
>> > 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
>> puppet-users+unsubscr...@googlegroups.com.
>> > For more options, visit this group at
>> http://groups.google.com/group/puppet-users?hl=en.
>> >
>>
>> --
>> 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
>> puppet-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/puppet-users?hl=en.
>>
>
>
>
> --
> Regards,
>
> Douglas Garstang
> http://www.linkedin.com/in/garstang
> Email: doug.garst...@gmail.com
> Cell: +1-805-340-5627
>
>


-- 
Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garst...@gmail.com
Cell: +1-805-340-5627

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Difference between include and require

2011-08-23 Thread Douglas Garstang
Can someone please succinctly explain to me the difference between include
and require?

The documentation implies that simply putting 'require ' at the top
of a different class automatically means that  is fully implemented
as a dependency. However, it doesn't seem to work that way. Also, I'm not
seeing a situation where the use of include seems to be automatically
resolving dependancies. This is puppet 0.25.5.

Doug

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Difference between include and require

2011-08-23 Thread Douglas Garstang
Yes... that's what I had

On Tue, Aug 23, 2011 at 10:53 AM, David Kavanagh wrote:

> It seems there's a problem including a class multiple times. By
> stating that one class requires another, you formalize the dependency,
> but don't actually have an include. What you do then is to include the
> class in your main implementation which uses that class. That way, if
> you have several classes that depend on one other class, it is
> included once at the top level, but used many places (where it is
> required).
> Is that as clear as I think it is?
>
> David
>
> On Tue, Aug 23, 2011 at 1:51 PM, Douglas Garstang
>  wrote:
> > Can someone please succinctly explain to me the difference between
> include
> > and require?
> > The documentation implies that simply putting 'require ' at the
> top
> > of a different class automatically means that  is fully
> implemented
> > as a dependency. However, it doesn't seem to work that way. Also, I'm not
> > seeing a situation where the use of include seems to be automatically
> > resolving dependancies. This is puppet 0.25.5.
> > Doug
> >
> > --
> > 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
> > puppet-users+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> > http://groups.google.com/group/puppet-users?hl=en.
> >
>
> --
> 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
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
>


-- 
Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garst...@gmail.com
Cell: +1-805-340-5627

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Upgrading 0.25.4

2011-08-24 Thread Douglas Garstang
All,

Can someone give me some ideas as to, or point me to where I can find
documentation on the issues I may have upgrading puppet from 0.25.4 to the
latest?

Also, the server is using passenger, and I know there's a whole lot of magic
voodoo that has to happen to make sure that the version numbers of all the
bits are compatible.

Doug

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Release tarball spec file

2011-08-24 Thread Douglas Garstang
I know this is a crazy request, but I was kind of wondering why it was so
hard for Puppet Labs to maintain the RPM spec file that comes contained in
the release tarball, so that modifications weren't required to actually get
it to build. Crazy huh?

For example, the SPEC file contains this...

Version:2.7.2
Release:0.2.rc1%{?dist}

but the release is 2.7.3. Also 'rc1' is hard coded in several places, and so
forth.

Doug

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] External Data Question

2011-08-25 Thread Douglas Garstang
All, I am not sure if I am approaching this in the right manner, but if I
have the following yaml file, and I am using extlookup() to grab the data:

---
erased_config:
  instances:
- { id: 0, metrics_port: 2, host_name: hsync00, mount_point: /,
assign_new_users: false }
- { id: 1, metrics_port: 20001, host_name: hsync01, mount_point: /,
assign_new_users: false }

Is there a way I can get each of those id lines into a separate file without
having to iterate in the module?

Doug

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Complex YAML Data in External Nodes

2011-08-26 Thread Douglas Garstang
Can I do this in an external node?

parameters:
  foo:
- { id: 0, Name: Doug }

And access it with:

notice ("DATA=$foo[0]['Name']")

?

Doug

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Complex YAML Data in External Nodes

2011-08-26 Thread Douglas Garstang
I must be asking hard questions.

On Fri, Aug 26, 2011 at 10:04 AM, Douglas Garstang
wrote:

> Can I do this in an external node?
>
> parameters:
>   foo:
> - { id: 0, Name: Doug }
>
> And access it with:
>
> notice ("DATA=$foo[0]['Name']")
>
> ?
>
> Doug
>



-- 
Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garst...@gmail.com
Cell: +1-805-340-5627

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Module Plugin Documentation

2011-08-31 Thread Douglas Garstang
Anyone,

I've read this doc several times:

http://docs.puppetlabs.com/guides/plugins_in_modules.html

As a whole, it really doesn't make sense. It seems pretty obvious it was
written by someone with deep knowledge of the subject, but there is little
context for someone like me. Is there better documentation somewhere?

Doug

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: Module Plugin Documentation

2011-09-01 Thread Douglas Garstang
For example, the very first sentence on the page starts with:

"Learn how to distribute custom facts and types"

How about a definition of what a custom fact and type are? Good
documentation generally doesn't assume that the reader knows all the
terminology being used without first defining or describing it in some
fashion.

Doug

On Thu, Sep 1, 2011 at 6:21 AM, jcbollinger wrote:

>
>
> On Aug 31, 7:40 pm, Douglas Garstang  wrote:
> > Anyone,
> >
> > I've read this doc several times:
> >
> > http://docs.puppetlabs.com/guides/plugins_in_modules.html
> >
> > As a whole, it really doesn't make sense. It seems pretty obvious it was
> > written by someone with deep knowledge of the subject, but there is
> little
> > context for someone like me. Is there better documentation somewhere?
>
>
> I am not aware of better documentation of the topics covered by that
> guide, but I don't personally see a need for any, either.  Perhaps you
> are looking for information outside its rather limited scope?  In
> particular, that document is not about *writing* custom types /
> providers / facts / functions (there are different docs for that); it
> is only about how to deploy their Ruby code once it is written.
>
> If you have specific questions that the doc doesn't answer for you,
> then this is a fine place to pose them.  You could also consider
> filing a ticket against the documentation.  It is unlikely, however,
> that such a general complaint as the one above will elicit much help.
>
>
> John
>
> --
> 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
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
>


-- 
Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garst...@gmail.com
Cell: +1-805-340-5627

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Updating /etc/puppet ?

2011-09-01 Thread Douglas Garstang
I have a real-world, best practices, procedural question.

How do you manage the he puppet master, under /etc/puppet, where multiple
people may be editing files? The /etc/puppet directory is a working copy,
and each user has read access to files created by other users. However, if
one person adds a module directory to svn, the lock files that are created
by svn are owned by that person, and the next person that comes along can't
do svn updates etc. Similarly I can't write to files created by a different
user.

Yes, sure, the 'right way' to do this may be to have all the files owned by
the puppet user, and users don't edit files directly in /etc/puppet, and a
script is responsible for performing the svn update, but we're not there
yet.

Ideas?

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Updating /etc/puppet ?

2011-09-01 Thread Douglas Garstang
Was that in reply to my original post, or a subsequent reply? You did see
where I said /etc/puppet was a working copy, right?

Doug.

On Thu, Sep 1, 2011 at 1:09 PM, Scott Smith  wrote:

> http://projects.puppetlabs.com/projects/1/wiki/Puppet_Version_Control
>
> On Thu, Sep 1, 2011 at 11:47 AM, Douglas Garstang  > wrote:
>
>> I have a real-world, best practices, procedural question.
>>
>> How do you manage the he puppet master, under /etc/puppet, where multiple
>> people may be editing files? The /etc/puppet directory is a working copy,
>> and each user has read access to files created by other users. However, if
>> one person adds a module directory to svn, the lock files that are created
>> by svn are owned by that person, and the next person that comes along can't
>> do svn updates etc. Similarly I can't write to files created by a different
>> user.
>>
>> Yes, sure, the 'right way' to do this may be to have all the files owned
>> by the puppet user, and users don't edit files directly in /etc/puppet, and
>> a script is responsible for performing the svn update, but we're not there
>> yet.
>>
>> Ideas?
>>
>> Doug.
>>
>>  --
>> 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
>> puppet-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/puppet-users?hl=en.
>>
>
>  --
> 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
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>



-- 
Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garst...@gmail.com
Cell: +1-805-340-5627

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Updating /etc/puppet ?

2011-09-01 Thread Douglas Garstang
On Thu, Sep 1, 2011 at 1:35 PM, Steven VanDevender wrote:

> Douglas Garstang writes:
>  > Was that in reply to my original post, or a subsequent reply? You did
> see
>  > where I said /etc/puppet was a working copy, right?
>
> It sounds like you need to get to the point where no one does their
> edits under /etc/puppet on the puppetmaster, because you're obviously
> running into the problems that result when people edit there rather than
> in local working copies.  Once you actually start using the features of
> a distributed version control system in the way it's intended to work,
> you won't have those problems.
>
>
>

That's exactly what I told them. There's best practices, and then there's
current reality.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Updating /etc/puppet ?

2011-09-01 Thread Douglas Garstang
On Thu, Sep 1, 2011 at 1:35 PM, Steven VanDevender wrote:

> Douglas Garstang writes:
>  > Was that in reply to my original post, or a subsequent reply? You did
> see
>  > where I said /etc/puppet was a working copy, right?
>
> It sounds like you need to get to the point where no one does their
> edits under /etc/puppet on the puppetmaster, because you're obviously
> running into the problems that result when people edit there rather than
> in local working copies.  Once you actually start using the features of
> a distributed version control system in the way it's intended to work,
> you won't have those problems.
>
>
Editing files locally under /etc/puppet as an individual user is not
mutually exclusive with editing files in a distributed working copy owned by
the same user.

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Custom Facts

2011-09-01 Thread Douglas Garstang
So, after reading this doc:

http://projects.puppetlabs.com/projects/1/wiki/Adding_Facts

it's not readily apparent to me how I can create facts that are derived from
variables defined at the node level in puppet, rather than at the O/S level
on the client. I want to be able to set a variable that defines a server
type in the node, and access that. Anyone?

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Custom Facts

2011-09-01 Thread Douglas Garstang
On Thu, Sep 1, 2011 at 4:31 PM, Aaron Grewell wrote:

> You can't.  The whole purpose of facts is to allow Puppet to make decisions
> based on client data.  Variables=server, facts=client.
>
>
Seriously??? I can edit mcollective's server.cfg file and change the
factsource from facter to yaml, and then have puppet populate facts.yaml,
which I think is actually easier and more manageable, but someone here has
already gone and used custom facts, which means I have to use facter as the
_only_ fact source. That's pretty lame.

So, if I am stuck with this, how would I set a class of server for a
particular node? Would I need to have puppet push out a text file containing
the server class to the client, and then write a custom fact that reads the
file from the client's OS? That seems like a much more complicated approach
than setting 'server_class = web_server' in the node on the puppet master,
and then having puppet put that in facts.yaml.

Doug

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Custom Facts

2011-09-01 Thread Douglas Garstang
On Thu, Sep 1, 2011 at 4:56 PM, Aaron Grewell wrote:

> Create a variable for server_class in your node definition.
>
>
>
And then?

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Custom Facts

2011-09-01 Thread Douglas Garstang
On Thu, Sep 1, 2011 at 4:58 PM, Aaron Grewell wrote:

> And then assign classes based on that.  Standard if logic or case statement
> as you prefer.
>
> On Thu, Sep 1, 2011 at 4:57 PM, Douglas Garstang 
> wrote:
>
>> On Thu, Sep 1, 2011 at 4:56 PM, Aaron Grewell wrote:
>>
>>> Create a variable for server_class in your node definition.
>>>
>>>
>>>
>> And then?
>>
>>
>> This isn't for logic within puppet manifests. In this particular scenario,
it's for setting a server class on each node so that I can use mcollective
against servers matching that class. For example, if I wanted to stop apache
on the web servers, I can call mc-service httpd restart -F
"hostclass=webserver" etc.

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Custom Facts

2011-09-01 Thread Douglas Garstang
On Thu, Sep 1, 2011 at 5:05 PM, Aaron Grewell wrote:

> Ah.  I don't know how mcollective works so I'm not sure how to address
> that.  If there's a YAML data file involved then you could push it with
> Puppet...
>
>
>
Yes, mcollective can read a YAML file, which by default is
/etc/mcollective/facts.yaml. However, if I go down that path, it can't read
custom facts. If I use custom facts, I can't find a way to set a variable in
a node, and then access it in the custom fact.

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Custom Facts

2011-09-01 Thread Douglas Garstang
Tried that once before... I forget why but it didn't work so well.

On Thu, Sep 1, 2011 at 5:17 PM, Aaron Grewell wrote:

> This is just me Googling wildly into the air but are you using this
> approach?
>
>
> http://projects.puppetlabs.com/projects/mcollective-plugins/wiki/FactsFacterYAML
>
> If I'm reading the code correctly (somewhat questionable, my Ruby-foo is
> weak) it should return all top-scope variables and facts.
>
> On Thu, Sep 1, 2011 at 5:13 PM, Douglas Garstang 
> wrote:
>
>> On Thu, Sep 1, 2011 at 5:05 PM, Aaron Grewell wrote:
>>
>>> Ah.  I don't know how mcollective works so I'm not sure how to address
>>> that.  If there's a YAML data file involved then you could push it with
>>> Puppet...
>>>
>>>
>>>
>> Yes, mcollective can read a YAML file, which by default is
>> /etc/mcollective/facts.yaml. However, if I go down that path, it can't read
>> custom facts. If I use custom facts, I can't find a way to set a variable in
>> a node, and then access it in the custom fact.
>>
>> Doug.
>>
>>
>> --
>> 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
>> puppet-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/puppet-users?hl=en.
>>
>
>  --
> 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
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>



-- 
Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garst...@gmail.com
Cell: +1-805-340-5627

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Custom Facts

2011-09-01 Thread Douglas Garstang
Thanks Nigel, but there's no mention of classes.txt on that page.

On Thu, Sep 1, 2011 at 5:16 PM, Nigel Kersten  wrote:

>
>
> On Thu, Sep 1, 2011 at 5:02 PM, Douglas Garstang 
> wrote:
>
>> On Thu, Sep 1, 2011 at 4:58 PM, Aaron Grewell wrote:
>>
>>> And then assign classes based on that.  Standard if logic or case
>>> statement as you prefer.
>>>
>>> On Thu, Sep 1, 2011 at 4:57 PM, Douglas Garstang <
>>> doug.garst...@gmail.com> wrote:
>>>
>>>> On Thu, Sep 1, 2011 at 4:56 PM, Aaron Grewell 
>>>> wrote:
>>>>
>>>>> Create a variable for server_class in your node definition.
>>>>>
>>>>>
>>>>>
>>>> And then?
>>>>
>>>>
>>>> This isn't for logic within puppet manifests. In this particular
>> scenario, it's for setting a server class on each node so that I can use
>> mcollective against servers matching that class. For example, if I wanted to
>> stop apache on the web servers, I can call mc-service httpd restart -F
>> "hostclass=webserver" etc.
>>
>>
> http://docs.puppetlabs.com/mcollective/reference/ui/filters.html
>
> $ mco rpc --help . . . Host Filters -W, --with FILTER Combined classes and
> facts filter -F, --wf, --with-fact fact=val Match hosts with a certain
> fact -C, --wc, --with-class CLASS Match hosts with a certain config
> management class -A, --wa, --with-agent AGENT Match hosts with a certain
> agent
> -I, --wi, --with-identity IDENT Match hosts with a certain configured
> identity
>
>
>
> You want to match a class, not a fact.
>
> MCollective can match based on Puppet classes already by reading
> classes.txt which contains all the classes from the latest catalog.
>
>
>  --
> 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
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>



-- 
Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garst...@gmail.com
Cell: +1-805-340-5627

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Custom Facts

2011-09-01 Thread Douglas Garstang
Nigel,

Are you referring to the 'Class Filters' section on
http://docs.puppetlabs.com/mcollective/reference/integration/puppet.html ?

If so, that's not really the same thing. Classes.txt lists classes included
on a server. That's not what I am looking for. Life isn't always as simple
as assuming that all machines within a certain functional group include the
same class. You'd think so, but hey, I work for a startup, so not everything
is engineered that well.

All I want to be able to do is set a variable on a per node basis that
defines a functional grouping, ie a class of server, and query that with
mcollective. Should not be difficult to do.

Doug.

On Thu, Sep 1, 2011 at 5:37 PM, Douglas Garstang wrote:

> Thanks Nigel, but there's no mention of classes.txt on that page.
>
>
> On Thu, Sep 1, 2011 at 5:16 PM, Nigel Kersten wrote:
>
>>
>>
>> On Thu, Sep 1, 2011 at 5:02 PM, Douglas Garstang > > wrote:
>>
>>> On Thu, Sep 1, 2011 at 4:58 PM, Aaron Grewell 
>>> wrote:
>>>
>>>> And then assign classes based on that.  Standard if logic or case
>>>> statement as you prefer.
>>>>
>>>> On Thu, Sep 1, 2011 at 4:57 PM, Douglas Garstang <
>>>> doug.garst...@gmail.com> wrote:
>>>>
>>>>> On Thu, Sep 1, 2011 at 4:56 PM, Aaron Grewell >>>> > wrote:
>>>>>
>>>>>> Create a variable for server_class in your node definition.
>>>>>>
>>>>>>
>>>>>>
>>>>> And then?
>>>>>
>>>>>
>>>>> This isn't for logic within puppet manifests. In this particular
>>> scenario, it's for setting a server class on each node so that I can use
>>> mcollective against servers matching that class. For example, if I wanted to
>>> stop apache on the web servers, I can call mc-service httpd restart -F
>>> "hostclass=webserver" etc.
>>>
>>>
>> http://docs.puppetlabs.com/mcollective/reference/ui/filters.html
>>
>> $ mco rpc --help . . . Host Filters -W, --with FILTER Combined classes
>> and facts filter -F, --wf, --with-fact fact=val Match hosts with a
>> certain fact -C, --wc, --with-class CLASS Match hosts with a certain
>> config management class -A, --wa, --with-agent AGENT Match hosts with a
>> certain agent
>> -I, --wi, --with-identity IDENT Match hosts with a certain configured
>> identity
>>
>>
>>
>> You want to match a class, not a fact.
>>
>> MCollective can match based on Puppet classes already by reading
>> classes.txt which contains all the classes from the latest catalog.
>>
>>
>>  --
>> 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
>> puppet-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/puppet-users?hl=en.
>>
>
>
>
> --
> Regards,
>
> Douglas Garstang
> http://www.linkedin.com/in/garstang
> Email: doug.garst...@gmail.com
> Cell: +1-805-340-5627
>
>


-- 
Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garst...@gmail.com
Cell: +1-805-340-5627

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Custom Facts

2011-09-01 Thread Douglas Garstang
I really appreciate your reply, but I've inherited a mess that isn't easy to
fix, and the most appropriate solution for right now isn't always the "best"
solution. When the boss says "GET IT DONE", you don't have time to refactor
someone elses mess and do it the right way. I try and make my questions as
specific as possible so that I can get options that are as specific to the
problem at hand as possible.

On Thu, Sep 1, 2011 at 6:14 PM, Nigel Kersten  wrote:

>
>
> On Thu, Sep 1, 2011 at 5:40 PM, Douglas Garstang 
> wrote:
>
>> Nigel,
>>
>> Are you referring to the 'Class Filters' section on
>> http://docs.puppetlabs.com/mcollective/reference/integration/puppet.html?
>>
>> If so, that's not really the same thing. Classes.txt lists classes
>> included on a server. That's not what I am looking for. Life isn't always as
>> simple as assuming that all machines within a certain functional group
>> include the same class. You'd think so, but hey, I work for a startup, so
>> not everything is engineered that well.
>>
>
> That's not an immense amount of engineering and if your functional
> groups don't actually map well to classes, that's a sign of a problem that
> you should be resolving as it's almost certainly causing wasted effort.
>
>
>>
>> All I want to be able to do is set a variable on a per node basis that
>> defines a functional grouping, ie a class of server, and query that with
>> mcollective. Should not be difficult to do.
>>
>
> There are many hoops you could jump through to achieve this like making a
> file that your node parameters get pushed to in a template, and then make
> facts that query that file...
>
> but honestly, work with the system and not against it. Make some functional
> classes that correspond to the node parameters you're talking about, and
> include them.
>
> I can't remember off the top of my head what happens with completely empty
> classes, they may not actually get written out to classes.txt, but I'd test
> that first. If that fails, stick some dummy resources in, but your best bet
> is to start making functional classes mapping to the subset of nodes you
> want to pick out, and organize your existing classes by function where
> appropriate.
>
>
>
>
>> Doug.
>>
>>
>> On Thu, Sep 1, 2011 at 5:37 PM, Douglas Garstang > > wrote:
>>
>>> Thanks Nigel, but there's no mention of classes.txt on that page.
>>>
>>>
>>> On Thu, Sep 1, 2011 at 5:16 PM, Nigel Kersten wrote:
>>>
>>>>
>>>>
>>>> On Thu, Sep 1, 2011 at 5:02 PM, Douglas Garstang <
>>>> doug.garst...@gmail.com> wrote:
>>>>
>>>>> On Thu, Sep 1, 2011 at 4:58 PM, Aaron Grewell >>>> > wrote:
>>>>>
>>>>>> And then assign classes based on that.  Standard if logic or case
>>>>>> statement as you prefer.
>>>>>>
>>>>>> On Thu, Sep 1, 2011 at 4:57 PM, Douglas Garstang <
>>>>>> doug.garst...@gmail.com> wrote:
>>>>>>
>>>>>>> On Thu, Sep 1, 2011 at 4:56 PM, Aaron Grewell <
>>>>>>> aaron.grew...@gmail.com> wrote:
>>>>>>>
>>>>>>>> Create a variable for server_class in your node definition.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> And then?
>>>>>>>
>>>>>>>
>>>>>>> This isn't for logic within puppet manifests. In this particular
>>>>> scenario, it's for setting a server class on each node so that I can use
>>>>> mcollective against servers matching that class. For example, if I wanted 
>>>>> to
>>>>> stop apache on the web servers, I can call mc-service httpd restart -F
>>>>> "hostclass=webserver" etc.
>>>>>
>>>>>
>>>> http://docs.puppetlabs.com/mcollective/reference/ui/filters.html
>>>>
>>>> $ mco rpc --help . . . Host Filters -W, --with FILTER Combined classes
>>>> and facts filter -F, --wf, --with-fact fact=val Match hosts with a
>>>> certain fact -C, --wc, --with-class CLASS Match hosts with a certain
>>>> config management class -A, --wa, --with-agent AGENT Match hosts with a
>>>> certain agent
>>>> -I, --wi, --with-identity IDENT Match hosts with a certain configured
>>>

Re: [Puppet Users] Custom Facts

2011-09-02 Thread Douglas Garstang
On Thu, Sep 1, 2011 at 10:30 PM, Matt Moor  wrote:

> On 2/09/11 3:03 PM, Douglas Garstang wrote:
>
>> I really appreciate your reply, but I've inherited a mess that isn't easy
>> to fix, and the most appropriate solution for right now isn't always the
>> "best" solution. When the boss says "GET IT DONE", you don't have time to
>> refactor someone elses mess and do it the right way. I try and make my
>> questions as specific as possible so that I can get options that are as
>> specific to the problem at hand as possible.
>>
>
> Class is an unbelievably overloaded term, but I'm gathering you mean it in
> the context of identifying a group of machines, and will assume so for the
> purposes of this post. I've hacked around this problem a couple of ways in
> the past:
>
> - Derive the class from the FQDN
>
> Previous organisations have had FQDN structures like
> sitename-app-01.staging.**mycompany.net<http://sitename-app-01.staging.mycompany.net>,
> and I've just written a simple fact to extract the class from that; e.g.
> staging-app. I don't really recommend this approach, as it can be brittle,
> it overloads DNS, and it's not very granular. But it worked.
>
> - Use a "helper" file
>
> If you've got the node classification available on the puppetmaster (e.g.
> node foo { $class=abc }), I've used a template to write a file with the
> class details out somewhere useful like /etc/mycompany/machine_class.
>
> This guy seems to have taken this idea and run with it:
> http://nuknad.com/2011/02/11/**self-classifying-puppet-nodes/<http://nuknad.com/2011/02/11/self-classifying-puppet-nodes/>
>
> If I was wanting to do this the "right" way, I'd be looking at hooking
> mcollective up to an external node classifier in some way - that way both
> Puppet and MCollective are referencing the same source of "truth". No tips
> on how to actually to do this - it's just where I'd start looking.
>
> Cheers,
>
>
Hi Matt. :)

Unfortunately, using the FQDN to determine the class of server here isn't
feasible. The DNS namespace is pretty flat. As for the helper file option, I
can add a variable to the node definition, which is what I was hoping to do.
I can then template the value, and write it to a file on the target.
However, at this point, using a custom fact to retrieve the value from the
local O/S seems a bit heavy handed. Maybe that's what I'll have to end up
using.

At the end of the day, this all seems to be a limitation with mcollective.
It can only read facts from one source, either facter or a yaml file. I
believe facter is the current source, and people have written scripts that
rely on that. I can write a custom fact, but then the issue becomes that
I don't know if it's possible for a custom fact written in ruby and dropped
into $module/lib/puppet can access variables defined in the node.

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Custom Facts

2011-09-02 Thread Douglas Garstang
On Fri, Sep 2, 2011 at 11:26 AM, R.I.Pienaar  wrote:

>
>
> - Original Message -
> >
> > At the end of the day, this all seems to be a limitation with
> > mcollective. It can only read facts from one source, either facter
> > or a yaml file. I believe facter is the current source, and people
> > have written scripts that rely on that. I can write a custom fact,
> > but then the issue becomes that I don't know if it's possible
> > for a custom fact written in ruby and dropped into
> > $module/lib/puppet can access variables defined in the node.
> >
>
> using the yaml file built by a template method that was linked to
> any variables you set at the node level, top scope or in the class
> that creates the yaml file is put in the yaml file.
>
> Therefore you can use these files in mcollective filters, so if you
> just set variables in the node to do whatever you want they will show
> up in the yaml file and be usable.
>
> As the wiki says:
>
> "plus it lets you get any in-scope variables (for example, parameters from
> your external node classifier) available as mcollective filters for free."
>
>
> http://projects.puppetlabs.com/projects/mcollective-plugins/wiki/FactsFacterYAML
>
> Mcollective thus gets a combination of facts, variables etc all in one
> place.  You can even create many yaml files and it will read the lot for
> you, one local the node, one by puppet, maybe even with facter -y etc.
>
> and if all this fails, you can trivially write your own fact source that
> does whatever you want.
>
> --
>

So, I think I had used this approach once before. But, now after
implementing that, yes, facts.yaml seems to have all the facter variables as
well as variables defined in the node, which is generally what I want.

However, running mc-inventory shows no facts, and doing something like this:

mc-service puppet status -F "hosttype=proxy"

where hosttype=proxy does appear in the yaml file, returns no data. I have
set the factsource to yaml in mcollective's server.cfg and restarted it.

Douglas.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Sourcing node variables

2011-09-02 Thread Douglas Garstang
So... a general question.

When sourcing node variables, what is the better approach...

a) In each module included by the node, use something like extlookup to get
the variables you need, as you need them, OR
b) Have your external node script gather and dump _all_ the variables the
the node may need for all functions it may peform.

Option b) seems less preferable to me personally. We have this God awful
perl script right now that templates all of our production values, and
option b) would essentially still involve having a complicated external node
script doing a lot of similar things. The whole point of puppet is to do
away with custom scripts doing application specific things. One advantage of
this approach is that it to see all the variables for a node, simply running
the external node script with the host name will yield all that information
quickly and easily.

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Custom Facts

2011-09-02 Thread Douglas Garstang
On Fri, Sep 2, 2011 at 12:06 PM, Douglas Garstang
wrote:

>
> On Fri, Sep 2, 2011 at 11:26 AM, R.I.Pienaar  wrote:
>
>>
>>
>> - Original Message -
>> >
>> > At the end of the day, this all seems to be a limitation with
>> > mcollective. It can only read facts from one source, either facter
>> > or a yaml file. I believe facter is the current source, and people
>> > have written scripts that rely on that. I can write a custom fact,
>> > but then the issue becomes that I don't know if it's possible
>> > for a custom fact written in ruby and dropped into
>> > $module/lib/puppet can access variables defined in the node.
>> >
>>
>> using the yaml file built by a template method that was linked to
>> any variables you set at the node level, top scope or in the class
>> that creates the yaml file is put in the yaml file.
>>
>> Therefore you can use these files in mcollective filters, so if you
>> just set variables in the node to do whatever you want they will show
>> up in the yaml file and be usable.
>>
>> As the wiki says:
>>
>> "plus it lets you get any in-scope variables (for example, parameters from
>> your external node classifier) available as mcollective filters for free."
>>
>>
>> http://projects.puppetlabs.com/projects/mcollective-plugins/wiki/FactsFacterYAML
>>
>> Mcollective thus gets a combination of facts, variables etc all in one
>> place.  You can even create many yaml files and it will read the lot for
>> you, one local the node, one by puppet, maybe even with facter -y etc.
>>
>> and if all this fails, you can trivially write your own fact source that
>> does whatever you want.
>>
>> --
>>
>
> So, I think I had used this approach once before. But, now after
> implementing that, yes, facts.yaml seems to have all the facter variables as
> well as variables defined in the node, which is generally what I want.
>
> However, running mc-inventory shows no facts, and doing something like
> this:
>
> mc-service puppet status -F "hosttype=proxy"
>
> where hosttype=proxy does appear in the yaml file, returns no data. I have
> set the factsource to yaml in mcollective's server.cfg and restarted it.
>
> Douglas.
>
>

Eh. Now it's working. Weird.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] parsing yaml reports with python

2011-09-04 Thread Douglas Garstang
I had the same problem. How did you handle the embedded Ruby objects? No
solutions. It's a shame that puppet is so Ruby-centric. :( Doug.

On Fri, Sep 2, 2011 at 5:57 AM, nottings  wrote:

> Does anyone have any idea how to work around the following error?
>
> yaml.constructor.ConstructorError: expected a mapping node, but found
> scalar
>  in "/etc/puppet/reports/albacore/201108292003.yaml", line 3, column
> 5
>
> i've created classes to handle all the mapping node data (99% of the
> puppet report), but a few lines have this scalar node data that I have
> no idea how to handle/convert.  Here are the classes for the mapping
> nodes:
>
> class PuppetReport(yaml.YAMLObject):
>  yaml_tag = u'!ruby/object:Puppet::Transaction::Report'
>  def __init__(self, data):
>self.host = data["host"]
>self.logs = PuppetLog(data["logs"])
>self.metrics = PuppetMetrics(data["metrics"])
>self.time = data["time"]
>self.external_times = ruby_sym(data["external_times"])
>self.resource_statuses =
> PuppetResourceStatus(data["resource_statuses"])
>  def __repr__(self):
>return "(host=%r, logs=%r, metrics=%r, time=%r)" % (self.host,
> self.logs, self.metrics, self.time)
>
> class ruby_sym(yaml.YAMLObject):
>  yaml_tag = u'!ruby/sym'
>  def __init__(self):
>self.attr = attr
>  def __repr__(self):
>return "(attr=%r)" % (self.attr)
>
> class PuppetLog(yaml.YAMLObject):
>  yaml_tag = u'!ruby/object:Puppet::Util::Log'
>  def __init__(self, log):
>self.source = log["source"]
>self.message = log["message"]
>self.tags = log["tags"]
>self.time = log["time"]
>  def __repr__(self):
>return "(source=%r, message=%r, tags=%r, time=%r)" % (self.source,
> self.message, self.tags, self.time)
>
> class PuppetMetrics(yaml.YAMLObject):
>  def __init__(self, metric):
> self.time = submetric(metric["time"])
> self.resources = submetric(metric["resource"])
> self.changes = submetric(metric["changes"])
> self.events = submetric(metric["events"])
>  def __repr__(self):
>return "(time=%r, resource=%r, changes=%r, events=%r)" %
> (self.time, self.resource, self.changes, self.events)
>
> class submetric(yaml.YAMLObject):
>  yaml_tag = u'!ruby/object:Puppet::Util::Metric'
>  def __init__(self, submetric):
>self.label = submetric["label"]
>self.name = submetric["name"]
>self.values = submetric["values"]
>  def __repr__(self):
>return "(label=%r, name=%r, values=%r)" % (self.label, self.name,
> self.values)
>
> class PuppetResourceStatus(yaml.YAMLObject):
>  yaml_tag = u'!ruby/object:Puppet::Resource::Status'
>  def __init__(self, resource_status):
>self.evaluation_time = resource_status["evaluation_time"]
>self.events = resource_status["events"]
>self.file = resource_status["file"]
>self.line = resource_status["line"]
>self.resource = resource_status["resource"]
>self.source_description = resource_status["source_description"]
>self.tags = resource_status["tags"]
>self.time = resource_status["time"]
>self.version = resource_status["version"]
>  def __repr__(self):
>return "(evaluation=%r, events=%r, file=%r, line=%r, resource=%r,
> source_description=%r, tags=%r, time=%r, version=%r)" %
> (self.evaluation, self.events, self.file, self.line, self.resource,
> self.source_description, self.tags, self.time, self.version)
>
>
> --
> 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
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
>


-- 
Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garst...@gmail.com
Cell: +1-805-340-5627

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] The require function

2011-09-06 Thread Douglas Garstang
The puppet documentation at
http://docs.puppetlabs.com/references/stable/function.html says for
the require function, that:

"Evaluate one or more classes, adding the required class as a dependency."

This implies that any resources in the required class are
automatically added as a dependancy. I'm NOT seeing this behaviour.
How is it supposed to work?

Doug

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: The require function

2011-09-06 Thread Douglas Garstang
On Tue, Sep 6, 2011 at 11:52 AM, Douglas Garstang
 wrote:
> The puppet documentation at
> http://docs.puppetlabs.com/references/stable/function.html says for
> the require function, that:
>
> "Evaluate one or more classes, adding the required class as a dependency."
>
> This implies that any resources in the required class are
> automatically added as a dependancy. I'm NOT seeing this behaviour.
> How is it supposed to work?
>
> Doug
>

Actually, more specifically, I have this:

class platform::common {
file {
'/etc/somedir':
ensure => directory;
}

class webapp::common {
require "platform::common"
file {
"/etc/somedir/configfile":
# stuff here.
}
}

When puppet runs, it's trying to apply the file
/etc/somedir/configfile _before_ /etc/somedir. This seems to
contradict the behaviour the documentation describes.

Doug.



-- 
Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garst...@gmail.com
Cell: +1-805-340-5627

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: The require function

2011-09-06 Thread Douglas Garstang
On Tue, Sep 6, 2011 at 1:19 PM, R.I.Pienaar  wrote:
>
>
> - Original Message -
>>
>>
>> That's a feature in newish versions, right?
>
> no, it's been there for ages and ages.
>
> --
> 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 
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/puppet-users?hl=en.
>
>

Well this is all awfully confusing. The documentation pretty clearly
says that using the require function automatically adds that class as
a dependancy. If so, why would I need to explicitly add require => to
resources? If I had to do that, I'd use include instead. Can someone
at Puppet Labs maybe chime in here.?

Douglas.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: The require function

2011-09-07 Thread Douglas Garstang
On Wed, Sep 7, 2011 at 3:03 AM, R.I.Pienaar  wrote:
>
>
> - Original Message -
>> On Sep 6, 8:54 pm, "R.I.Pienaar"  wrote:
>> > - Original Message -
>> >
>> > files auto require their parents, it's not even needed to do
>> > the require => or require()
>> >
>> >
>> Could you please explain what exactly does it mean? Cheers!!
>
> Given 2 file resources:
>
> file{"/foo": ensure => directory}
> file{"/foo/bar": content => "hello world"}
>

Actually, that's not true. I have seen numerous situations where
puppet tries to create /foo/bar before /foo, and then complains that
/foo does not exist. And, please don't get all pissy at me for having
a different view of this than you.

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: The require function

2011-09-07 Thread Douglas Garstang
On Wed, Sep 7, 2011 at 2:27 PM, Nigel Kersten  wrote:
> On Wed, Sep 7, 2011 at 2:25 PM, Douglas Garstang 
> wrote:
>>
>> Actually, that's not true. I have seen numerous situations where
>> puppet tries to create /foo/bar before /foo, and then complains that
>> /foo does not exist. And, please don't get all pissy at me for having
>> a different view of this than you.
>
> You've seen this with your own resources where the parent is a directory and
> the child is a file?
> Please bug report, as it's been a very long time since that autorequire was
> put in (0.24.x ? 0.25.x?), and I haven't seen a reported bug since then.

Totally... Although in this particular instance, the server is
2.7.3, and the client is 0.25.5...

Doug

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: The require function

2011-09-07 Thread Douglas Garstang
On Wed, Sep 7, 2011 at 3:12 PM, Nigel Kersten  wrote:
>
>
> On Wed, Sep 7, 2011 at 2:35 PM, Douglas Garstang 
> wrote:
>>
>> On Wed, Sep 7, 2011 at 2:27 PM, Nigel Kersten 
>> wrote:
>> > On Wed, Sep 7, 2011 at 2:25 PM, Douglas Garstang
>> > 
>> > wrote:
>> >>
>> >> Actually, that's not true. I have seen numerous situations where
>> >> puppet tries to create /foo/bar before /foo, and then complains that
>> >> /foo does not exist. And, please don't get all pissy at me for having
>> >> a different view of this than you.
>> >
>> > You've seen this with your own resources where the parent is a directory
>> > and
>> > the child is a file?
>> > Please bug report, as it's been a very long time since that autorequire
>> > was
>> > put in (0.24.x ? 0.25.x?), and I haven't seen a reported bug since then.
>>
>> Totally... Although in this particular instance, the server is
>> 2.7.3, and the client is 0.25.5...
>>
>
> ok. Bug report ?

We'l see. To be honest, motivation is rather low right now because I
was just kicked off the mcollective mailing list by Mr Pienaar for
asking a question not in a manner to his liking.

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: The require function

2011-09-07 Thread Douglas Garstang
On Wed, Sep 7, 2011 at 3:37 PM, Adam Gibbins  wrote:
>
> On 7 September 2011 23:22, Douglas Garstang  wrote:
>>
>> We'l see. To be honest, motivation is rather low right now because I
>> was just kicked off the mcollective mailing list by Mr Pienaar for
>> asking a question not in a manner to his liking.
>>
>
> I'll be honest, hoping you get kicked off this list also.  Your attitude is
> absolutely appalling, I'm incredibly surprised and have huge respect to the
> people that have attempted to help you - you certainly didn't deserve it.
>
> You really need to reassess how you approach mailing lists for help, some
> respect for the people helping and developing the free open source software
> you're using would be a good start.

Thank you for your guidance. I totally agree with you, as attempting
to defend myself would only result in more attacks.

Doug.

-- 
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 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



  1   2   3   4   5   6   7   >