[Puppet Users] what's the syntax for converting the yaml of facts into a hash table?

2013-04-13 Thread Larry Fast
Hope I'm not being too thick about this but I'm having trouble creating a 
Hash from my server's Facts.

I've tried the following: 
  facts = File.read( "#{puppetdir}/yaml/facts/#{certname}.yaml" )

  factH = YAML.load( facts )   # fails
  factH = YAML.load( facts ).to_hash   # fails

It looks like the facts file is a yaml of a Puppet::Node::Facts but I can't 
figure out how to access it's contents.

What's the proper syntax for extracting the Facts into a hash?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] facter doesn't load from /ect/facter/facts.d

2013-04-13 Thread Dan White
On the linked page !  First two sub-headings are “Versions” and “Compatibility” 

On Apr 13, 2013, at 5:46 PM, Larry Fast wrote:

> Thanks Dan,
> I shall hunt down the elusive pixie dust!  BTW, do you know where to look for 
> a compatibility tree between stdlib and puppet version?
> Cheers,
> Larry

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] facter doesn't load from /ect/facter/facts.d

2013-04-13 Thread Larry Fast
Thanks Dan,
I shall hunt down the elusive pixie dust!  BTW, do you know where to look
for a compatibility tree between stdlib and puppet version?
Cheers,
Larry


On Sat, Apr 13, 2013 at 2:38 PM, Dan White  wrote:

> I can speak directly on this !
>
> You want http://forge.puppetlabs.com/puppetlabs/stdlib/3.2.0
>
> This has the /etc/facter/facts.d/* Magic Pixie Dust in it.
>
> I just went thru a brief panic attack when I updated to Facter 1.7 and
> puppetlabs-stdlib 4.0.2 !
> The changelog says "Remove facter_dot_d for compatibility with external
> facts” and I had to do some rapid searching and verifying that stuff put
> into /etc/facter/facts.d/* still worked.  Short answer: They do !
>
> As far as details on stdlib, here you go:
>
>
> https://puppetlabs.com/blog/module-of-the-week-puppetlabsstdlib-puppet-labs-standard-library/
>
>
> https://puppetlabs.com/blog/module-of-the-week-puppetlabs-stdlib-puppet-labs-standard-library-part-2/
>
>
> https://puppetlabs.com/blog/module-of-the-week-puppetlabsstdlib-puppetlabs-standard-library-part-3/
>
> I find it very useful.  Hope you do as well.
>
> On Apr 13, 2013, at 5:27 PM, Larry Fast wrote:
>
> > > From that page: "External facts are only available in Facter 1.7 and
> later."
> > > I expect you need to either upgrade or install the stdlib module.
> > Thanks for that.  I knew I missed something.  ... but tell me more about
> the stdlib option.  I'm a bit leery of depending on the first RC of facter
> 1.7.  Do you know that stdlib has some answer to this problem or was it
> just a speculation?
> > Thanks,
> > Larry
> >
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "Puppet Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to puppet-users+unsubscr...@googlegroups.com.
> > To post to this group, send email to puppet-users@googlegroups.com.
> > Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> > For more options, visit https://groups.google.com/groups/opt_out.
> >
> >
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Puppet Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/puppet-users/dsqLBBFpwGE/unsubscribe?hl=en
> .
> To unsubscribe from this group and all its topics, send an email to
> puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] facter doesn't load from /ect/facter/facts.d

2013-04-13 Thread Dan White
I can speak directly on this !

You want http://forge.puppetlabs.com/puppetlabs/stdlib/3.2.0

This has the /etc/facter/facts.d/* Magic Pixie Dust in it.

I just went thru a brief panic attack when I updated to Facter 1.7 and 
puppetlabs-stdlib 4.0.2 !
The changelog says "Remove facter_dot_d for compatibility with external facts” 
and I had to do some rapid searching and verifying that stuff put into 
/etc/facter/facts.d/* still worked.  Short answer: They do !

As far as details on stdlib, here you go:

https://puppetlabs.com/blog/module-of-the-week-puppetlabsstdlib-puppet-labs-standard-library/

https://puppetlabs.com/blog/module-of-the-week-puppetlabs-stdlib-puppet-labs-standard-library-part-2/

https://puppetlabs.com/blog/module-of-the-week-puppetlabsstdlib-puppetlabs-standard-library-part-3/

I find it very useful.  Hope you do as well.

On Apr 13, 2013, at 5:27 PM, Larry Fast wrote:

> > From that page: "External facts are only available in Facter 1.7 and later."
> > I expect you need to either upgrade or install the stdlib module.
> Thanks for that.  I knew I missed something.  ... but tell me more about the 
> stdlib option.  I'm a bit leery of depending on the first RC of facter 1.7.  
> Do you know that stdlib has some answer to this problem or was it just a 
> speculation?
> Thanks,
> Larry
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] facter doesn't load from /ect/facter/facts.d

2013-04-13 Thread Larry Fast
> From that page: "External facts are only available in Facter 1.7 and 
later."
> I expect you need to either upgrade or install the stdlib module.
Thanks for that.  I knew I missed something.  ... but tell me more about 
the stdlib option.  I'm a bit leery of depending on the first RC of facter 
1.7.  Do you know that stdlib has some answer to this problem or was it 
just a speculation?
Thanks,
Larry

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] run/exec a script from puppet dashboard on multiple servers?

2013-04-13 Thread shpongle man
hey,

is there a way to run/exec a script on multiple servers manually from the 
puppet dashboard?
i have several servers running my java application and i need the ability 
to start them all or stop them all manually from the dashboard .


thanks
or

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Conditional based on whether package is part of the manifest

2013-04-13 Thread Martin Rio
1. class myssl {
2.* ... code that puts certificate files in place *
3.
4.* if package https is installed {*
5.  class {'apache::mod::ssl': }<- enables Apache's mod_ssl
6. }
7. }

In the module above, I'm setting up SSL certificates on a server, and I'd 
like to to enable Apache's mod_ssl *only if* the manifest requires the 
Apache package elsewhere. This is optional because some manifests may use 
another web server. Is there a way to express a conditional in line 4 that 
will test whether the httpd package is part of the manifest?

Thanks and in advance, and sorry for the newbie questions!

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Re: Understanding how Puppet SSL works !

2013-04-13 Thread Peter Meier
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

> Thanks for the reply. It turns out "puppet cert clean" is not good
> enough, one has to restart either puppetmaster or the httpd service
> (I am running puppetmaster behind apache) to clean it up from
> memory.

Yes, this is a long outstanding bug in apache. you will find various
reports about apache not rereading the clr.

~pete

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.13 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlFpeTUACgkQbwltcAfKi3+gdgCgsVdRAUjrIVFt/knJYPvPmN6H
2wsAn2QiqFPflEYNPPomG72CInoquNgR
=EZZs
-END PGP SIGNATURE-

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Question on Variable Scope

2013-04-13 Thread Peter Meier
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

> Is there a way to export a $variable from a node so it can be read
> when the node processes one of its inherited modules? Is there
> something I can put in the inherited node like import $variable 
> before the included modules execute?
> 
> FYI running puppet 2.6.16

This one of the parts where node inheritance is really nasty and I
wouldn't use it. I would try to do it with classes, like:

class basenode::core {
  $snmp_server = "10.0.0.10"
  include snmpd
}

node 'myserver.domain.com' {
  $snmp_password = "mypassword"
  inherits basenode::core
}

Also I would try to do that with parametrized classes:

class basenode::core($snmp_password) {
  class{'snmpd':
server   => '10.0.0.10',
password => $snmp_password
  }
}

node 'myserver.domain.com' {
  class{'basenode::core':
snmp_password => "mypassword"
  }
}

you might also want to look into hiera, which can give you additional
options on how to structure that.

~pete
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.13 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlFpeMcACgkQbwltcAfKi38m6QCfVVDG4FyZKyWjOb7JELuw8Gvf
IPQAoJGkEpdXBbTqzgGKWeaCkSPFXYFi
=KpJb
-END PGP SIGNATURE-

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] facter doesn't load from /ect/facter/facts.d

2013-04-13 Thread Keith Burdis
>From that page: "External facts are only available in Facter 1.7 and later."

I expect you need to either upgrade or install the stdlib module.

  - Keith
On 13 Apr 2013 15:18, "Larry Fast"  wrote:

> I'm trying to load custom facts via /etc/facter/facts.d/*  according to
> instructions on
> http://docs.puppetlabs.com/guides/custom_facts.html#structured-data-facts
>
> I must have missed a setting somewhere because I get nothing.  The first
> clue may be that /etc/facter didn't exist. I had to create it manually.
>
> Is there a setting or search path I need to create?
>
> Details:
>
> puppet 3.0.1
> facter 1.6.14-1.el6
> centos 6
>
> I created 4 files in /etc/facter/facts.d:   y1.yaml, t1.txt, j1.json and
> r1.rb
> Each file has it's appropriate format yaml, text, json, ruby.
> facter --debug says nothing about these files
> running puppet agent the facts from these files do not appear
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] facter doesn't load from /ect/facter/facts.d

2013-04-13 Thread Peter Meier
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

> Is there a setting or search path I need to create?
> 
> Details:
> 
> puppet 3.0.1 facter 1.6.14-1.el6


I don't think this is supported in facter 1.6. One used to have the
stdlib module for it until facter 1.7 should be released, which will
provide that.

But maybe I'm wrong.

~pete
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.13 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlFpd30ACgkQbwltcAfKi3921wCgqqmxl7eAybhAtl4Z7AKs0k5c
q2cAn3ynRWqJLoqxYFFY8YoSKPPjm8uG
=RMny
-END PGP SIGNATURE-

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Windows Puppet waits for , then warns "Facter::Util::Resolution.exec with a shell built-in is deprecated"

2013-04-13 Thread Paul Tötterman
Hi,

How do I fix/disable this warning?
>

It seems like you've added some extra facter facts? They seem to be 
implemented incorrectly. Remove the problematic one.

Cheers,
Paul 

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] facter doesn't load from /ect/facter/facts.d

2013-04-13 Thread Larry Fast
I'm trying to load custom facts via /etc/facter/facts.d/*  according to 
instructions on 
http://docs.puppetlabs.com/guides/custom_facts.html#structured-data-facts

I must have missed a setting somewhere because I get nothing.  The first 
clue may be that /etc/facter didn't exist. I had to create it manually.

Is there a setting or search path I need to create?

Details:

puppet 3.0.1
facter 1.6.14-1.el6
centos 6

I created 4 files in /etc/facter/facts.d:   y1.yaml, t1.txt, j1.json and 
r1.rb
Each file has it's appropriate format yaml, text, json, ruby.
facter --debug says nothing about these files
running puppet agent the facts from these files do not appear

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] push puppet agent from dashboard

2013-04-13 Thread Francesco
Excuse me When I add node from the dashboard is there any possibility to 
push puppet-agent to the client ??
Thank you in advance!!!
Francesco

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.