Re: [Puppet Users] Custom Facts

2012-08-08 Thread Yaniv Fine
In general . I am trying to parse a variable i have in a file in few of my
servers and add it as a fact i can than use in a module .
This specific file that reside in few of my servers have looks like value :
var .inside the rb file i do facter.add .and add the value to a fact .there
is no reson to run the rb file on all of my servers
On Aug 9, 2012 12:56 AM, "jcbollinger"  wrote:

>
>
> On Wednesday, August 8, 2012 10:06:27 AM UTC-5, Yaniv Fine wrote:
>>
>> what is i put the rb file in another dir bellow the module dir .
>> any way i can control what node will load it ?
>>
>
> I don't know, but I think it unlikely that you could get some nodes to run
> it but not others.
>
> What are you trying to accomplish?  There is probably a better way.
>
>
> John
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/puppet-users/-/3A2dy5yllEsJ.
> 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.



Re: [Puppet Users] Using ENC with existing node definitions

2012-08-08 Thread Ryan Coleman
On Wed, Aug 8, 2012 at 6:18 PM, Foster Rilindo  wrote:
> I currently have puppet configured to use node definitions in 
> /etc/puppet/manifests/node.pp. At the time, most of the machines are physical 
> hosts.
>
> Now I need to start putting puppet on virtual guests. Ideally, I want to use 
> an ENC for those guests, but I don't want to using the physical hosts with 
> the ENC (yet).
>
> Is it possible to use ENC along existing node definitions? And if so, what is 
> the best way to go about implementing it?

Absolutely. The caveats to be aware of are better explained in our
docs than anything I could write. :-)

If you've got any questions on what you find there, let us know.

http://docs.puppetlabs.com/guides/external_nodes.html#how-merging-works

-- 
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] Using ENC with existing node definitions

2012-08-08 Thread Foster Rilindo
I currently have puppet configured to use node definitions in 
/etc/puppet/manifests/node.pp. At the time, most of the machines are physical 
hosts.

Now I need to start putting puppet on virtual guests. Ideally, I want to use an 
ENC for those guests, but I don't want to using the physical hosts with the ENC 
(yet).

Is it possible to use ENC along existing node definitions? And if so, what is 
the best way to go about implementing it?

 - Rilindo

-- 
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] Switching agent to another environment does not work

2012-08-08 Thread Peter Brown
Just in case you didn't know that command will only apply the
environment for that run.
It won't switch the node to the environment permanently, you need to
set environment in puppet.conf to do that.

On 9 August 2012 02:18, Ryan Coleman  wrote:
> On Wed, Aug 8, 2012 at 8:45 AM, Bernd Adamowicz
>  wrote:
>> Tried to attach one of my agents to another environment with a command like 
>> this:
>>
>> puppet agent --verbose --debug --server my.puppet.master --environment 
>> my_new_env --no-daemonize
>>
>> But it still receives the old catalog of the old environment. No errors or 
>> warnings in log files both on master and agent. So I can't provide more 
>> information. Agent and master are on version 2.6.12.
>>
>> Any ideas?
>
> What does the configuration look like in puppet.conf for the
> my_new_env environment?
>
>>
>> Thanks
>> Bernd
>>
>> --
>> 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.
>>
>
>
>
> --
> Ryan Coleman | about.me/ryc
> Modules & Forge @ Puppet Labs
>
> --
> 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.



Re: [Puppet Users] Re: Tag Negation

2012-08-08 Thread Peter Brown
I don't think the tag system was designed to be used like that.
Have you checked all the docs?

On 9 August 2012 01:19, Douglas Garstang  wrote:
> Anyone? Anyone?
>
> Sent from my iPhone
>
> On Aug 7, 2012, at 4:47 PM, Douglas Garstang  wrote:
>
>> All,
>>
>> Is there a way to run puppet and specify to apply resources NOT
>> containing a tag?
>>
>> ie, negating something like this?
>>
>> puppetd --tags solaris
>>
>> The use case for this is to put a tag in our application code so that
>> when running puppet we know changes made there will NOT be enacted.
>> The only way I can see to do it is to do the opposite put a tag
>> indicating it isn't our code everywher else and run puppetd WITH the
>> tag, which isn't as maintainable.
>>
>> 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.



Re: [Puppet Users] Help with puppet variables

2012-08-08 Thread Ashley Penney
Hi,

Good news!  You sound like someone who would benefit greatly from
Hiera.   Hiera is part of Puppet 3 (you have to do a little bit more
work with Puppet 2.7) and provides a way of providing different bits
of data, via variables, for different hosts.  If you take a look at
http://puppetlabs.com/blog/first-look-installing-and-using-hiera/ this
should cover a good introduction to setting up and integrating hiera
into your environment.

We use Hiera ourselves to do things like set 'base' variables that
apply by default unless your host overrides them, which should
hopefully be similar enough to what you want to do.  Good luck!

Thanks,

On Wed, Aug 8, 2012 at 3:34 PM, thiago  wrote:
> Hi,
>
> I'm a beginner on Puppet and i have one priority on my configuration. I
> have a lot of hosts and each one need different variables. Is it
> possible to configure a specific environment of these variables for each
> host?
>
> --
> Thiago Silveira Alexandre
> LPI I Certified
>
> --
> 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] Re: cert issues, puppet agent applying configs, problems oh my!

2012-08-08 Thread Zippy Zeppoli
I resolved the dnsdomain name issues by adding a FQDN (which dnsdomainname 
requires).
I was under the impression puppet doesn't require a FQDN when using the 
hosts file, but I guess I'm wrong based on the behavior.

Here is the output once this is fixed, (it still doesn't create the pidfile)

http://pastie.org/4414723

On Wednesday, July 18, 2012 2:21:50 PM UTC-7, Zippy Zeppoli wrote:
>
> So I'm new to puppet and I'm having a bear of a time just getting a test 
> server going.
> I installed puppet and the puppet client via yum on CentOS on AWS, so that 
> saved me some time.
> I followed a few various blog posts about getting everything set up and 
> applying a file, etc.
>
> Now I am trying to install a module (puppetlabs/apache) and it's failing 
> miserably for me.
> I installed the module on the puppetmaster, and then tried running a test 
> command to pull down the configs:
>
> # puppet agent --verbose --test
> dnsdomainname: Unknown host
> dnsdomainname: Unknown host
> notice: Ignoring --listen on onetime run
> dnsdomainname: Unknown host
> dnsdomainname: Unknown host
> info: Caching catalog for ip-10*
> info: Applying configuration version '1342645763'
> info: FileBucket adding {md5}e92bea7e9d70a9ecdc61edd7c0a2f59a
> info: /File[/etc/httpd/conf.d/README]: Filebucketed 
> /etc/httpd/conf.d/README to puppet with sum e92bea7e9d70a9ecdc61edd7c0a2f59a
> notice: /File[/etc/httpd/conf.d/README]/ensure: removed
> info: /File[httpd_vdir]: Scheduling refresh of Service[httpd]
> info: FileBucket adding {md5}2674ddafcede67ed823db6e09c8c8985
> info: /File[/etc/httpd/conf.d/authz_ldap.conf]: Filebucketed 
> /etc/httpd/conf.d/authz_ldap.conf to puppet with sum 
> 2674ddafcede67ed823db6e09c8c8985
> notice: /File[/etc/httpd/conf.d/authz_ldap.conf]/ensure: removed
> info: /File[httpd_vdir]: Scheduling refresh of Service[httpd]
> info: FileBucket adding {md5}98bb7dc6a56eba83a0f9713eec2d85ba
> info: /File[/etc/httpd/conf.d/perl.conf]: Filebucketed 
> /etc/httpd/conf.d/perl.conf to puppet with sum 
> 98bb7dc6a56eba83a0f9713eec2d85ba
> notice: /File[/etc/httpd/conf.d/perl.conf]/ensure: removed
> info: /File[httpd_vdir]: Scheduling refresh of Service[httpd]
> info: FileBucket adding {md5}8b0da169a5f7963b6bf28f9d8de7785f
> info: /File[/etc/httpd/conf.d/proxy_ajp.conf]: Filebucketed 
> /etc/httpd/conf.d/proxy_ajp.conf to puppet with sum 
> 8b0da169a5f7963b6bf28f9d8de7785f
> notice: /File[/etc/httpd/conf.d/proxy_ajp.conf]/ensure: removed
> info: /File[httpd_vdir]: Scheduling refresh of Service[httpd]
> info: FileBucket adding {md5}547f3a175849ad68a7a1a6d65df1afd5
> info: /File[/etc/httpd/conf.d/python.conf]: Filebucketed 
> /etc/httpd/conf.d/python.conf to puppet with sum 
> 547f3a175849ad68a7a1a6d65df1afd5
> notice: /File[/etc/httpd/conf.d/python.conf]/ensure: removed
> info: /File[httpd_vdir]: Scheduling refresh of Service[httpd]
> info: FileBucket adding {md5}17c85a1796be14bdac36d34f25b955b0
> info: /File[/etc/httpd/conf.d/ssl.conf]: Filebucketed 
> /etc/httpd/conf.d/ssl.conf to puppet with sum 
> 17c85a1796be14bdac36d34f25b955b0
> notice: /File[/etc/httpd/conf.d/ssl.conf]/ensure: removed
> info: /File[httpd_vdir]: Scheduling refresh of Service[httpd]
> info: FileBucket adding {md5}d1e9d20dbcec6fe4237204f214284e95
> info: /File[/etc/httpd/conf.d/webalizer.conf]: Filebucketed 
> /etc/httpd/conf.d/webalizer.conf to puppet with sum 
> d1e9d20dbcec6fe4237204f214284e95
> notice: /File[/etc/httpd/conf.d/webalizer.conf]/ensure: removed
> info: /File[httpd_vdir]: Scheduling refresh of Service[httpd]
> info: FileBucket adding {md5}98540d3009ecc6435d8770c24a71258a
> info: /File[/etc/httpd/conf.d/welcome.conf]: Filebucketed 
> /etc/httpd/conf.d/welcome.conf to puppet with sum 
> 98540d3009ecc6435d8770c24a71258a
> notice: /File[/etc/httpd/conf.d/welcome.conf]/ensure: removed
> info: /File[httpd_vdir]: Scheduling refresh of Service[httpd]
> notice: /Stage[main]/Apache/Service[httpd]/enable: enable changed 'false' 
> to 'true'
> notice: /Stage[main]/Apache/Service[httpd]: Triggered 'refresh' from 8 
> events
> notice: Finished catalog run in 2.06 seconds
>
>
>
> Looks good right? Until I try to run it for real:
>
> [root@ip-10-*~]# puppet agent --verbose 
> dnsdomainname: Unknown host
> dnsdomainname: Unknown host
> Could not prepare for execution: Could not create PID file: 
> /var/run/puppet/agent.pid
>
> I also tried forcing it down from the master to no avail:
> # puppetrun --host pclient
> Triggering pclient
> Host pclient failed: hostname was not match with the server certificate
> pclient finished with exit code 2
> Failed: pclient
>
>
> Then I tried:
> # puppetd --verbose --no-daemonize --onetime
> dnsdomainname: Unknown host
> dnsdomainname: Unknown host
> notice: Ignoring --listen on onetime run
> dnsdomainname: Unknown host
> dnsdomainname: Unknown host
> info: Caching catalog for ip-*
> info: Applying configuration version '1342645763'
> notice: Finished catalog run in 0.40 seconds
>
>
> Looks good no? Nope. Nothing happe

[Puppet Users] Help with puppet variables

2012-08-08 Thread thiago
Hi,

I'm a beginner on Puppet and i have one priority on my configuration. I
have a lot of hosts and each one need different variables. Is it
possible to configure a specific environment of these variables for each
host?

-- 
Thiago Silveira Alexandre
LPI I Certified

-- 
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] Symbolic Link directory of files

2012-08-08 Thread Allen
Is there a way to symbolically link files from one directory into another 
inside of Puppet? I did this:

"/opt/openerp/server/openerp/addons/":
owner => "openerp",
group => "admin",
links => "manage",
ensure => directory,
recurse => true,
mode => 775, 
target => "/opt/openerp/web/addons/",
require => Vcsrepo["/opt/openerp/server", "/opt/openerp/web"];

But it seems it actually copies them over instead of symbolically linking 
them. What I usuallly do, when I do it by hand is just run this command: 
"ln -s /opt/openerp/web/addons/*" while inside of the 
/opt/openerp/server/openerp/addons/ folder. Also, is there a way I can do 
this to multiple directories? I need to link from another couple of places 
into this directory and these are all from repositories so I'd rather 
symbolically link them so in case they get updated, we can have them 
already updated inside of the system inside of that folder.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/gYGzBlA-9GUJ.
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] Announce: Facter 1.6.11 Available

2012-08-08 Thread Moses Mendoza
Facter 1.6.11 is a maintenance release candidate in the 1.6.x
branch with bug fixes.

It includes contributions from Andrew Parker, Matthaus Litteken,
Dominic Cleal, Andrew Elwell, Michael Stahnke.

Downloads are available at:
 * Source: https://downloads.puppetlabs.com/facter/facter-1.6.11.tar.gz

RPMs are available at  https://yum.puppetlabs.com/el or /fedora

Debs are available at https://apt.puppetlabs.com

Mac package is available at
https://downloads.puppetlabs.com/mac/facter-1.6.11.dmg

See the Verifying Puppet Download section at:
 
http://projects.puppetlabs.com/projects/puppet/wiki/Downloading_Puppet#Verifying+Puppet+Downloads

Please report feedback via the Puppet Labs Redmine site, using a
affected version of 1.6.11:
 http://projects.puppetlabs.com/projects/facter/

Release Notes at: https://projects.puppetlabs.com/projects/facter/wiki/Wiki

Facter 1.6.11 Highlights
==

(#15687) Selinux: Test for policyvers before reading it

Previously facter would read /#{selinux_mount_point}/policyvers
without first
verifying it existed, which would spew stderr to the console if it did not
exist. This commit makes the default value for the fact "unknown"
and only uses
a different value if policyvers exists. This also includes an updated test
which fails using the previous fact definition.

(#15049) Return only one selinuxfs path as string from mounts

The block that parses /proc/self/mountinfo to find a selinuxfs
filesystem would
return results as an array.  On Ruby 1.8, interpolating this into
a string for
File.exists? when one result was returned worked, while on Ruby 1.9 it
interpolated as ["/sys/fs/selinux"]/enforce so later failed.

This changes the block to return the single result string rather
than an array.

This also fixes #11531 where multiple selinuxfs filesystems could
be mounted,
as it returns only the first mountpoint.

The /proc file was changed from /proc/self/mountinfo to
/proc/self/mounts for
compatibility with Linux 2.6.25 and older.

Facter 1.6.11 Changelog
===

Andrew Parker (1)
e9e084f (Maint) Update CONTRIBUTING.md to match Puppet
Matthaus Litteken (1)
841b99a (#15687) Selinux: Test for policyvers before reading it
Dominic Cleal (1)
10aa3aa (#15049) Return only one selinuxfs path as string from mounts
Andrew Elwell (1)
f7f90e4 Update version nos to match Facter development
Michael Stahnke (1)
ab87a2c Modify facter spec to work with Ruby 1.9

-- 
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] Problem with puppet-agent

2012-08-08 Thread Denmat
This sounds like a risky process to me. 
Wiping out your certs sounds like a hammer. 

Not sure how you are provisioning your nodes but even ssh call to the master 
during the provisioning to remove the cert (if it exists) would be preferable.

Maybe you could look at alternatives, like generating a uuid for your cert 
names and then removing those hosts that haven't checked in after a determined 
period (using puppet cert --clean). Check google for more info (I'm currently 
in transit).

Cheers,
Den


On 09/08/2012, at 1:51, mfons  wrote:

> On client:
> [root@xxx ~]# cat /etc/redhat-release
> Red Hat Enterprise Linux Server release 5.7 (Tikanga)
> [root@xxx ~]# rpm -qa|grep puppet
> puppet-2.6.12-1.el5
> 
> On server:
> [root@server ~]# cat /etc/redhat-release
> Red Hat Enterprise Linux Server release 5.7 (Tikanga)
> [root@server ~]# rpm -qa|grep puppet
> puppet-server-2.6.12-1.el5
> puppet-2.6.12-1.el5
> [root@server ~]#
> 
> Puppet agent runs on client every 30 minutes, as usual.
> Sometimes, it fails with messages:
> Aug  8 17:30:04 xxx puppet-agent[10416]: Creating a new SSL key for
> xxx.domain.com
> Aug  8 17:30:04 xxx puppet-agent[10416]: Creating a new SSL
> certificate request for xxx.domain.com
> Aug  8 17:30:04 xxx puppet-agent[10416]: Certificate Request
> fingerprint (md5): 51:BA:28:EA:61:2B:1C:3B:42:64:48:9E:26:0F:28:F9
> Aug  8 17:30:05 xxx puppet-agent[10416]: Could not request
> certificate: Error 400 on SERVER: Could not find certificate request
> for xxx2.domain.com
> 
> We have autosign configured in puppetmaster, because we need to run
> puppet client on nodes totally unattended (we might provision a new or
> existing node at anytime)
> The problem is that sometimes when a client runs puppetagent, it fails
> requesting a certificate that does not own.
> For exemple: client xxx.domain.com generates a new certificate, that
> request to sign by the puppetmaster and then it fails because it does
> not find the request of a certificate for xxx2.domain.com.
> 
> Maybe, next time, when puppetagent runs again, it success, or it fails
> again, there is not a rule.
> 
> We have a script on server and client that deletes client certificates
> stored in /var/lib/puppet.. that runs every hour. We need this
> because we can provision a node with same hostname at anytime and if
> there was an old certificate on server with the same name it will
> fail. This is because we have autosign set to yes in puppetmaster.
> 
> -- 
> 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.



Re: [Puppet Users] Re: Scope Confusion!

2012-08-08 Thread Douglas Garstang
On Wed, Aug 8, 2012 at 6:25 AM, jcbollinger  wrote:
>
>
> On Tuesday, August 7, 2012 1:25:32 PM UTC-5, Douglas wrote:
>>
>> As usual, I'm confused about scope in puppet. This puppet 2.7.1.
>>
>> In my classes below, the bottom class, company::web::content, requires
>> the file resource '/usr/local/company'. However, that resource is
>> defined two includes back in the class company::common. I always
>> thought this wasn't supposed to work, and that you could only access
>> the immediate scope, not the scope of stuff beyond this. It does work
>> however. Is it supposed to. Why?
>
>
> Yes, it is supposed to.  All classes and resources have global scope once
> they are declared.  The 'include' function does not introduce classes and
> their resources into the current, innermost scope -- it doesn't need to do
> so, and couldn't even if it wanted to do.  Instead, 'include' ensures that
> the specified class has been parsed and added to the catalog, which, as I
> said, puts them into the global scope.
>
> The model pretty much has to work that way, because the physical resources
> of the target node all have global scope, too.
>
> It is useful and appropriate for classes and definitions to 'include' (or
> 'require') the classes on which they rely, provided that those classes are
> not parametrized (Puppet <= 2.7.x).  Aside from it's plain aggregation
> function, that way it's a lot easier to make classes independent of the
> order in which they are declared, plus it has documentary value.  Classes
> that 'include' all the classes on which they directly rely are more robust.
>
> However, there is no requirement for a class to 'include' its dependencies.
> If a class does not do so, then it simply relies on those dependencies to
> have been declared by some other class that was parsed before it.  Users of
> parametrized classes rely heavily on this, because parametrized classes can
> be declared only once, but they may need to be referenced by many other
> classes.
>

Ok, so to put it another way, your saying that once a class is
included, it's scope becomes global and can be used anywhere else, no
matter the relationship between the class where it was included, and
the class that's trying to access 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] Custom Facts

2012-08-08 Thread jcbollinger


On Wednesday, August 8, 2012 10:06:27 AM UTC-5, Yaniv Fine wrote:
>
> what is i put the rb file in another dir bellow the module dir . 
> any way i can control what node will load it ?
>

I don't know, but I think it unlikely that you could get some nodes to run 
it but not others.

What are you trying to accomplish?  There is probably a better way.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/3A2dy5yllEsJ.
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: setting different values to same variables

2012-08-08 Thread jcbollinger


On Wednesday, August 8, 2012 10:43:13 AM UTC-5, Oren Marmor wrote:
>
> John, Axel, thanks for your comments
> defining default variable in module top-scope is exactly what i did but 
> like you said, its not very pretty.
> i'll look at hiera, any ideas when its supposed to be released in puppet3?
>


Puppet 3 (which is not yet released) will include hiera from the very 
beginning.  It is pretty deeply integrated with class parametrization.  In 
the mean time, lots of people use hiera with Puppet 2.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/XmFSnTLxe0gJ.
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: Problem with puppet-agent

2012-08-08 Thread jcbollinger


On Wednesday, August 8, 2012 10:51:31 AM UTC-5, mfons wrote:
>
> On client: 
> [root@xxx ~]# cat /etc/redhat-release 
> Red Hat Enterprise Linux Server release 5.7 (Tikanga) 
> [root@xxx ~]# rpm -qa|grep puppet 
> puppet-2.6.12-1.el5 
>
> On server: 
> [root@server ~]# cat /etc/redhat-release 
> Red Hat Enterprise Linux Server release 5.7 (Tikanga) 
> [root@server ~]# rpm -qa|grep puppet 
> puppet-server-2.6.12-1.el5 
> puppet-2.6.12-1.el5 
> [root@server ~]# 
>
> Puppet agent runs on client every 30 minutes, as usual. 
> Sometimes, it fails with messages: 
> Aug  8 17:30:04 xxx puppet-agent[10416]: Creating a new SSL key for 
> xxx.domain.com 
> Aug  8 17:30:04 xxx puppet-agent[10416]: Creating a new SSL 
> certificate request for xxx.domain.com 
> Aug  8 17:30:04 xxx puppet-agent[10416]: Certificate Request 
> fingerprint (md5): 51:BA:28:EA:61:2B:1C:3B:42:64:48:9E:26:0F:28:F9 
> Aug  8 17:30:05 xxx puppet-agent[10416]: Could not request 
> certificate: Error 400 on SERVER: Could not find certificate request 
> for xxx2.domain.com 
>
> We have autosign configured in puppetmaster, because we need to run 
> puppet client on nodes totally unattended (we might provision a new or 
> existing node at anytime) 
> The problem is that sometimes when a client runs puppetagent, it fails 
> requesting a certificate that does not own. 
> For exemple: client xxx.domain.com generates a new certificate, that 
> request to sign by the puppetmaster and then it fails because it does 
> not find the request of a certificate for xxx2.domain.com. 
>
> Maybe, next time, when puppetagent runs again, it success, or it fails 
> again, there is not a rule. 
>
> We have a script on server and client that deletes client certificates 
> stored in /var/lib/puppet.. that runs every hour. We need this 
> because we can provision a node with same hostname at anytime and if 
> there was an old certificate on server with the same name it will 
> fail. This is because we have autosign set to yes in puppetmaster. 
>
>  
Those certificate removal scripts sound awfully suspicious.  My first guess 
would be that occasionally the client-side script happens to trigger after 
the client has created its CSR but before it gets the signed certificate 
back from the master.  I would expect trouble to arise also when clients' 
certificates are removed from the master before they are removed from the 
client, so that the client attempts to use a certificate that the master no 
longer recognizes.

Why do you need to be so aggressive about deleting certificates?  
Certificates should never need to be deleted from clients except possibly 
as part of a complete rebuild.  Client certificates only need to be deleted 
from the master when you provision a new machine.  The latter should be 
incorporated into your provisioning process.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/O3rdHJmX8Z4J.
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] "tidy" is not :)

2012-08-08 Thread Dan White
Valid questions, Stuart, but I get the same behavior if I set age to zero.

I do a "chmod -vR a+rw" to the directory named in the resource, and it still 
misbehaves.

I tried cleaning it out by hand, then putting things back in to be removed 
(tidy age still zero).
All the new objects are owned by root.

Run puppet, and tidy removes the files and leaves the directories.

I think it is time to file a Bug.

I will do it in the morning unless I get an answer between now and then.

Thanks for responding.

- Stuart Cracraft  wrote:
> 
> What are the ownerships of the unremoved directories?
> 
> Also, were the directories themselves not at least a week old?
> 
> Perhaps a bug is lurking.
> 
> If I am the Puppet pattern-applicator and I remove the files first, the 
> directory file is updated and will fail the age test if that calculation is 
> not done before the file removes in that directory.
> 
> I don't know if the pattern-applicator is prone to that. 
> 
> You might want to run a simple
> bare-bones test to check it or perhaps the designers can speak to that point. 
> 
> --Stuart
> 
> Via Apple iPhone 4S on the AT&T Wireless Network
> 
> 
> On Aug 8, 2012, at 6:40 AM, Dan White  wrote:
> 
> > In a node, for a test, I have:
> > 
> > tidy { '/opt/home/users/george':
> >age => "1w",
> >recurse => true,
> >rmdirs => true,
> > }
> > 
> > and when I ran it, it cleaned out all the files under "george", but not the 
> > directories.
> > There are two directories, one with today's date on it (I expect that one 
> > to stay) and another with a June date on it.  Why is that one still there ?

“Sometimes I think the surest sign that intelligent life exists elsewhere in 
the universe is that none of it has tried to contact us.”
Bill Waterson (Calvin & Hobbes)

-- 
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] "tidy" is not :)

2012-08-08 Thread Stuart Cracraft

What are the ownerships of the unremoved directories?

Also, were the directories themselves not at least a week old?

Perhaps a bug is lurking.

If I am the Puppet pattern-applicator and I remove the files first, the 
directory file is updated and will fail the age test if that calculation is not 
done before the file removes in that directory.

I don't know if the pattern-applicator is prone to that. 

You might want to run a simple
bare-bones test to check it or perhaps the designers can speak to that point. 

--Stuart

Via Apple iPhone 4S on the AT&T Wireless Network


On Aug 8, 2012, at 6:40 AM, Dan White  wrote:

> In a node, for a test, I have:
> 
> tidy { '/opt/home/users/george':
>age => "1w",
>recurse => true,
>rmdirs => true,
> }
> 
> and when I ran it, it cleaned out all the files under "george", but not the 
> directories.
> There are two directories, one with today's date on it (I expect that one to 
> stay) and another with a June date on it.  Why is that one still there ?
> 
> “Sometimes I think the surest sign that intelligent life exists elsewhere in 
> the universe is that none of it has tried to contact us.”
> Bill Waterson (Calvin & Hobbes)
> 
> -- 
> 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.



Re: [Puppet Users] Re: A few questions about setting up Custom Facts

2012-08-08 Thread Dan White
- Tim Mooney  wrote:
> In regard to: Re: [Puppet Users] Re: A few questions about setting up...:
> 
> > I want to use puppetlabs-stdlib and /etc/facter/facts.d to create a set
> > of local facts.  Some of these facts come in variable quantities.  I
> > would like to stack these up into a delimited string.  I can deal with
> > that.
> >
> > On thing about your responses that puzzles me is the repeated mention of
> > facts going from the agent to the master.  What is that about, please ?
> > I am looking at facts local to the agent.  My understanding is that all
> > the "Magic Behind the Curtains" about puppet happens on the agent.
> 
> That part is at least partially incorrect.
> 
> Catalog compilation happens on the master.  This means that the master
> has to know all the facts for each client, so that it can correctly build
> the catalog.  The client gathers the facts and ships them to the master,
> so the master can build a catalog and ship the final result back to the
> client for application.
> 
> Note also that this means that all functions run on the master too.
> 
> See:
> 
>   http://docs.puppetlabs.com/learning/agent_master_basic.html
> 
> though I've actually seen better diagrams of the communication, that's
> the one I'm finding right now.
> 
> Tim

Ah! Enlightenment !

Many thanks, Tim, for the clarification.

It looks like I can still create custom facts using /etc/facter/facts.d that 
are, say, a comma delimited string of multiple values.  Anything that wants to 
use these custom facts would be aware of this and would be built to handle it.

Thanks to all on the list for en-clue-ing this relatively clueless one.

While I am occasionally clueless, I strive never to seem clue-proof.

“Sometimes I think the surest sign that intelligent life exists elsewhere in 
the universe is that none of it has tried to contact us.”
Bill Waterson (Calvin & Hobbes)

-- 
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 Master Forbidding Access to Cert Revocation List

2012-08-08 Thread kp-v
Hey folks;

I am having issues retrieving the catalog from my master. It seems to be an 
issue with the ACLs for the /certificate_revocation_list/ca, however it 
still produces an error when I set the ACLs to allow everything! I am 
almost certain it has something to do with my non-default installation. 
Puppet gurus please assit me. Any and all advice would be helpful. P.S. I 
have not had issues with Passenger up until I changed the installation root 
except excessively long (400 sec) SSL sessions for initial runs.

I am running an agent/master configuration with passenger (CentOS 6.2). I 
installed puppet from source and my file structure looks like this:

/opt/puppet

   - /opt/puppet/etc
   - /opt/puppet/etc/puppet
   - /opt/puppet/usr
   - /opt/puppet/usr/bin
  - /opt/puppet/usr/sbin
  - /opt/puppet/usr/share
   - /opt/puppet/var
   - /opt/puppet/var/ssl
   
My master is able to receive and complete the certificate handshake 
process. On an agent, after having received confirmation that the 
handshake completed, it attempts to find /certificate_revocation_list/ca 
but fails. It produces this error (full trace):
 /usr/lib/ruby/site_ruby/1.8/puppet/indirector/rest.rb:56:in `deserialize'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/rest.rb:75:in `find'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:188:in `find'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector.rb:50:in `find'
/usr/lib/ruby/site_ruby/1.8/puppet/ssl/host.rb:230:in `ssl_store'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http_pool.rb:56:in `cert_setup'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http_pool.rb:98:in 
`http_instance'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/rest.rb:71:in `network'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/rest.rb:75:in `find'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:188:in `find'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector.rb:50:in `find'
/usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:240:in 
`retrieve_new_catalog'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:403:in `thinmark'
/usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:402:in `thinmark'
/usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:239:in 
`retrieve_new_catalog'
/usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:86:in `retrieve_catalog'
/usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:111:in 
`retrieve_and_apply_catalog'
/usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:150:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:39:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/agent/locker.rb:21:in `lock'
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:39:in `run'
/usr/lib/ruby/1.8/sync.rb:230:in `synchronize'
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:39:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:103:in `with_client'
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:37:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:172:in `call'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:172:in `controlled_run'
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:35:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:114:in `onetime'
/usr/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:88:in `run_command'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:305:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:420:in `hook'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:305:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:411:in `exit_on_fail'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:305:in `run'
/usr/sbin/puppetd:4
err: Could not retrieve catalog from remote server: Error 403 on SERVER: 
Forbidden request: hostname.fqdn.int (NNN.NNN.NNN.NNN) access to 
/certificate_revocation_list/ca [find] at line 0
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run

The syslog on the master produces this error:
Aug  8 10:10:16 eng-puppet-vm2 puppet-master[15352]: Forbidden request: 
hostname.fqdn.int (NNN.NNN.NNN.NNN) access to 
/certificate_revocation_list/ca [find] at line 0

Here is a look at my configurations:
auth.conf

path /facts
method find,search
auth yes
allow hostname.fqdn.int

path ~ ^/catalog/([^/]+)$
method find
allow $1

path /certificate_revocation_list/ca
method find
allow *

path /report
method save
allow *.fqdn.int
allow NNN.NNN.NNN.NNN/16

path /file
allow *

path /certificate/ca
auth no
method find
allow *

path /certificate/
auth no
method find
allow *

path /certificate_request
auth no
method find, save
allow *

path /
auth any


puppet.conf  

[main]
server = hostname.fqdn.int
logdir = /var/log/puppet
puppetdlog = /var/log/puppet/puppet.log
rundir = /var/run/puppet
#ssldir = $vardir/ssl:/etc/puppet/ssl
modulepath = /opt/puppet/etc/puppet/modules:/usr/share/puppet/modules
runinterval=900
[master]
ssldir = /opt/puppet/var/ssl
facts_terminus = yaml
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY
[agent]
cla

Re: [Puppet Users] Re: A few questions about setting up Custom Facts

2012-08-08 Thread Tim Mooney

In regard to: Re: [Puppet Users] Re: A few questions about setting up...:


I want to use puppetlabs-stdlib and /etc/facter/facts.d to create a set
of local facts.  Some of these facts come in variable quantities.  I
would like to stack these up into a delimited string.  I can deal with
that.

On thing about your responses that puzzles me is the repeated mention of
facts going from the agent to the master.  What is that about, please ?
I am looking at facts local to the agent.  My understanding is that all
the "Magic Behind the Curtains" about puppet happens on the agent.


That part is at least partially incorrect.

Catalog compilation happens on the master.  This means that the master
has to know all the facts for each client, so that it can correctly build
the catalog.  The client gathers the facts and ships them to the master,
so the master can build a catalog and ship the final result back to the
client for application.

Note also that this means that all functions run on the master too.

See:

http://docs.puppetlabs.com/learning/agent_master_basic.html

though I've actually seen better diagrams of the communication, that's
the one I'm finding right now.

Tim
--
Tim Mooney tim.moo...@ndsu.edu
Enterprise Computing & Infrastructure  701-231-1076 (Voice)
Room 242-J6, IACC Building 701-231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164

--
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: Accessing a fileserver file from a custom function

2012-08-08 Thread j4m3s
Fantastic thank you Nan, I'll give this a try tonight.  It should be easy 
to modify yours to do what I need, thank you for sharing it :)

On Tuesday, August 7, 2012 10:52:42 PM UTC+1, Nan Liu wrote:
>
> On Tue, Aug 7, 2012 at 11:13 AM, Krzysztof Wilczynski 
> > wrote: 
> > Hi James, 
> > 
> > [...] 
> >> How could I acheive this please?  I'd rather not hard-code the full 
> path as this would be brittle - how can I "resolve" the puppet:/// url to 
> the actual file location please? 
> > 
> > Using "puppet:///" and "file:///" in a way similar to what the File type 
> offers from within a custom function is actually not that straight-forward, 
> sadly. There is a lot of code which deals with resolving these URLs that 
> deals with SSL certificates (since you can request an artifact from 
> different Puppet Master), etc. I found it not that easy to work with 
> outside of the File type, but perhaps somebody was more successful than I 
> was (?) :-) 
>
> Here's a function that loads a files in puppet module path which you 
> can alter to suit your needs: 
> https://gist.github.com/3289446 
>
> This uses the same path as templates so instead of puppet:///, just 
> module_file(module_name/file_name), and you can look at the template 
> function for some ideas as well. 
>
> Nan 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/gWjFE5nJ5o8J.
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 installation on Debian Wheezy

2012-08-08 Thread Juan Sierra Pons
Hi

Yesterday I had the same problem. I solved it using this link:

http://docs.puppetlabs.com/dashboard/manual/1.2/bootstrapping.html#installing-dependencies

Install the RubyGems package system with the script provided.

Hope it helps.

Best regards
On Aug 8, 2012 5:59 PM, "Deimos Fr"  wrote:

> Hi,
>
> I've got an issue on installing Puppet Dashboard on Debian wheezy. When I
> launch the db:migrate, I've got an error :
>
>> > rake RAILS_ENV=production db:migrate --trace
>> NOTE: Gem.source_index is deprecated, use Specification. It will be
>> removed on or after 2011-11-01.
>> Gem.source_index called from
>> /usr/share/puppet-dashboard/vendor/rails/railties/lib/rails/gem_dependency.rb:21.
>> NOTE: Gem::SourceIndex#initialize is deprecated with no replacement. It
>> will be removed on or after 2011-11-01.
>> Gem::SourceIndex#initialize called from
>> /usr/share/puppet-dashboard/vendor/rails/railties/lib/rails/vendor_gem_source_index.rb:100.
>> NOTE: Gem::SourceIndex#add_spec is deprecated, use
>> Specification.add_spec. It will be removed on or after 2011-11-01.
>> Gem::SourceIndex#add_spec called from
>> /usr/lib/ruby/1.9.1/rubygems/source_index.rb:91.
>> NOTE: Gem::SourceIndex#add_spec is deprecated, use
>> Specification.add_spec. It will be removed on or after 2011-11-01.
>> Gem::SourceIndex#add_spec called from
>> /usr/lib/ruby/1.9.1/rubygems/source_index.rb:91.
>> NOTE: Gem::SourceIndex#add_spec is deprecated, use
>> Specification.add_spec. It will be removed on or after 2011-11-01.
>> Gem::SourceIndex#add_spec called from
>> /usr/lib/ruby/1.9.1/rubygems/source_index.rb:91.
>> NOTE: Gem::SourceIndex#add_spec is deprecated, use
>> Specification.add_spec. It will be removed on or after 2011-11-01.
>> Gem::SourceIndex#add_spec called from
>> /usr/lib/ruby/1.9.1/rubygems/source_index.rb:91.
>> NOTE: Gem::SourceIndex#add_spec is deprecated, use
>> Specification.add_spec. It will be removed on or after 2011-11-01.
>> Gem::SourceIndex#add_spec called from
>> /usr/lib/ruby/1.9.1/rubygems/source_index.rb:91.
>> NOTE: Gem::SourceIndex#add_spec is deprecated, use
>> Specification.add_spec. It will be removed on or after 2011-11-01.
>> Gem::SourceIndex#add_spec called from
>> /usr/lib/ruby/1.9.1/rubygems/source_index.rb:91.
>> NOTE: Gem::SourceIndex#add_spec is deprecated, use
>> Specification.add_spec. It will be removed on or after 2011-11-01.
>> Gem::SourceIndex#add_spec called from
>> /usr/lib/ruby/1.9.1/rubygems/source_index.rb:91.
>> NOTE: Gem::SourceIndex#add_spec is deprecated, use
>> Specification.add_spec. It will be removed on or after 2011-11-01.
>> Gem::SourceIndex#add_spec called from
>> /usr/lib/ruby/1.9.1/rubygems/source_index.rb:91.
>> NOTE: Gem::SourceIndex#add_spec is deprecated, use
>> Specification.add_spec. It will be removed on or after 2011-11-01.
>> Gem::SourceIndex#add_spec called from
>> /usr/lib/ruby/1.9.1/rubygems/source_index.rb:91.
>> NOTE: Gem::SourceIndex#add_spec is deprecated, use
>> Specification.add_spec. It will be removed on or after 2011-11-01.
>> Gem::SourceIndex#add_spec called from
>> /usr/lib/ruby/1.9.1/rubygems/source_index.rb:91.
>> NOTE: Gem::SourceIndex#add_spec is deprecated, use
>> Specification.add_spec. It will be removed on or after 2011-11-01.
>> Gem::SourceIndex#add_spec called from
>> /usr/lib/ruby/1.9.1/rubygems/source_index.rb:91.
>> NOTE: Gem::SourceIndex#add_spec is deprecated, use
>> Specification.add_spec. It will be removed on or after 2011-11-01.
>> Gem::SourceIndex#add_spec called from
>> /usr/lib/ruby/1.9.1/rubygems/source_index.rb:91.
>> NOTE: Gem::SourceIndex#add_spec is deprecated, use
>> Specification.add_spec. It will be removed on or after 2011-11-01.
>> Gem::SourceIndex#add_spec called from
>> /usr/lib/ruby/1.9.1/rubygems/source_index.rb:91.
>> NOTE: Gem::SourceIndex#add_spec is deprecated, use
>> Specification.add_spec. It will be removed on or after 2011-11-01.
>> Gem::SourceIndex#add_spec called from
>> /usr/lib/ruby/1.9.1/rubygems/source_index.rb:91.
>> NOTE: Gem::SourceIndex#add_spec is deprecated, use
>> Specification.add_spec. It will be removed on or after 2011-11-01.
>> Gem::SourceIndex#add_spec called from
>> /usr/lib/ruby/1.9.1/rubygems/source_index.rb:91.
>> NOTE: Gem::SourceIndex#add_spec is deprecated, use
>> Specification.add_spec. It will be removed on or after 2011-11-01.
>> Gem::SourceIndex#add_spec called from
>> /usr/lib/ruby/1.9.1/rubygems/source_index.rb:91.
>> NOTE: Gem::SourceIndex#add_spec is deprecated, use
>> Specification.add_spec. It will be removed on or after 2011-11-01.
>> Gem::SourceIndex#add_spec called from
>> /usr/lib/ruby/1.9.1/rubygems/source_index.rb:91.
>> NOTE: Gem::SourceIndex#add_spec is deprecated, use
>> Specification.add_spec. It will be removed on or after 2011-11-01.
>> Gem::SourceIndex#add_spec called from
>> /usr/lib/ruby/1.9.1/rubygems/source_index.rb:91.
>> rake aborted!
>> cannot load such file -- ftools
>> /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
>> /usr/lib/ruby/1

Re: [Puppet Users] Re: postgres plugin puppetdb

2012-08-08 Thread Chris Price
Thanks JM.  Your config files look good and the existence of all of those 
tables in your puppetdb database certainly makes it look as though puppetdb 
is communicating with postgres properly.  Since increasing the heap size 
seems to have gotten you past the issues for now, my next guess is that it 
is some combination of catalog size and number of concurrent agent 
requests, and perhaps number of cores on your machine.  We would love to 
investigate further, so if you are willing to share a postgres dump with us 
that would be fantastic!

I'll e-mail you off-list to follow up on that.  I'd also be interested in 
seeing the output of 'cat /proc/cpuinfo'.

Thanks!
Chris

On Wednesday, August 8, 2012 1:08:09 AM UTC-7, A_SAAS wrote:
>
> Hi,
>
> The configuration files are attached.
>
> Here is the postgres login:
> [root@puppetmaster]:/data/local/postgresql/dumps #  psql -h localhost 
> puppetdb puppetdb
> psql (8.4.12)
> SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256)
> Type "help" for help.
>
> puppetdb=> \l
>   List of databases
>Name|  Owner   | Encoding  | Collation | Ctype |   Access privileges
>
> ---+--+---+---+---+---
>  postgres  | postgres | SQL_ASCII | C | C |
>  puppetdb  | puppetdb | SQL_ASCII | C | C |
>  template0 | postgres | SQL_ASCII | C | C | =c/postgres
>   : 
> postgres=CTc/postgres
>  template1 | postgres | SQL_ASCII | C | C | =c/postgres
>   : 
> postgres=CTc/postgres
> (4 rows)
> puppetdb=> \d
>   List of relations
>  Schema |  Name   | Type  |  Owner
> +-+---+--
>  public | catalog_resources   | table | puppetdb
>  public | catalogs| table | puppetdb
>  public | certname_catalogs   | table | puppetdb
>  public | certname_facts  | table | puppetdb
>  public | certname_facts_metadata | table | puppetdb
>  public | certnames   | table | puppetdb
>  public | classes | table | puppetdb
>  public | edges   | table | puppetdb
>  public | resource_params | table | puppetdb
>  public | schema_migrations   | table | puppetdb
>  public | tags| table | puppetdb
>
>
> And by the way I changed the JVM max heap at 256M and since then no issue. 
> Regarding the postgres dump file, I'll be willing to give it to you so 
> contact me in private to get the URL or let me know where I can put it as 
> long as nobody could access it publicly.
>
>
> Regards,
> JM
>
>
>
>
> On Tue, Aug 7, 2012 at 6:59 PM, Chris Price 
> > wrote:
>
>> JM,
>>
>> Hmm... so, those versions of Java seem fine--those are probably the ones 
>> we've done the most testing with.
>>
>> So, the error message that you sent indicates that the JVM is running out 
>> of RAM.  This could possibly indicate that you are still using the embedded 
>> database instead of postgres--the embedded database uses a lot of RAM.  Can 
>> we see what your database.ini file looks like?  In fact, perhaps we can 
>> take a look at all of the files in your /etc/puppetdb/conf.d directory?
>>
>> You could also connect directly to your postgres database using psql or 
>> pgadmin, and check to see if the puppetdb tables exist and contain data.
>>
>> The only other possibility that I can think of would be if one or more of 
>> your nodes has an extremely large catalog, and that the puppetdb JVM 
>> instance doesn't have enough memory to process the catalog.  If that's the 
>> case, we can try increasing your JVM max heap space in 
>> /etc/default/puppetdb... but we would be really interested in collecting 
>> some data from you about what that catalog looks like (for our own testing 
>> and debugging purposes) if it turns out that that is the culprit. 
>>
>> Thanks!
>> Chris
>>
>>
On Wednesday, August 8, 2012 1:08:09 AM UTC-7, A_SAAS wrote:
>
> Hi,
>
> The configuration files are attached.
>
> Here is the postgres login:
> [root@puppetmaster]:/data/local/postgresql/dumps #  psql -h localhost 
> puppetdb puppetdb
> psql (8.4.12)
> SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256)
> Type "help" for help.
>
> puppetdb=> \l
>   List of databases
>Name|  Owner   | Encoding  | Collation | Ctype |   Access privileges
>
> ---+--+---+---+---+---
>  postgres  | postgres | SQL_ASCII | C | C |
>  puppetdb  | puppetdb | SQL_ASCII | C | C |
>  template0 | postgres | SQL_ASCII | C | C | =c/postgres
>   : 
> postgres=CTc/postgres
>  template1 | postgres | SQL_ASCII | C | C | =c/postgres
>   : 
> postgres=CTc

RE: [Puppet Users] Re: Passing parameters for a class in Dashboard

2012-08-08 Thread Kenneth Lo
As I said parameters created by dashboard is on top scope.

You can check out puppet’s doc regarding scoping.

Assuming you don’t what to rely on their dynamic lookup (which is what they 
recommended since the feature is retiring) In your module you can reference 
global variable directly with the :: prefix.


--KL

From: Rakesh K [mailto:rkath...@gmail.com]
Sent: Wednesday, August 08, 2012 1:52 AM
To: puppet-users@googlegroups.com
Cc: Kenneth Lo
Subject: Re: [Puppet Users] Re: Passing parameters for a class in Dashboard


Ok.. I understand ... I can simply include the class and assign it to my node.. 
but how will dashboard know which parameters refers to which class?

There could be a parameter like "ensure => present" and it could have been used 
in multiple classes that I have included, how will these things be taken care 
of?

On Tuesday, August 7, 2012 12:08:09 AM UTC+5:30, Kenneth Lo wrote:
In dashboard parameters are assigned via group.

So basically you just create a group, assign some parameters there, include 
some nodes and your class in it.

Parameters created via dashboard group are at the global top scope I believe.

--KL

From: Rakesh K 
Reply-To: "puppet...@googlegroups.com" 
Date: Mon, 6 Aug 2012 05:50:37 -0700
To: "puppet...@googlegroups.com" 
Subject: [Puppet Users] Re: Passing parameters for a class in Dashboard




Or in other words , how do I make sure that following config is applied to my 
node through dashboard

class base1 {

  package { ["rsync", "xinetd"]: ensure => present }
  service { "xinetd": ensure => running }

  include rsyncd
  $password = generate("/usr/bin/pwgen", 8, 1)

  user { "dba":
  ensure => present,
  comment => "DB user",
  gid => "dba",
  shell => "/bin/false",
  require => Group["dba"],
  }

  group { "dba":
  ensure => present,
  }

  file { "/backup-mysql":
ensure => directory,
mode => 0775,
owner => "dba",
group => "dba",
  }

  file { "/home/dba/rsyncd.secret":
content => "backup:${password}",
replace => no,
mode => 0460,
owner=> "root",
group => "dba",
require => User['dba'],
  }

  rsyncd::export { "backup":
path => "/backup-mysql",
chroot => true,
readonly => true,
uid => "dba",
gid => "dba",
users => "backup",
secrets => "/home/dba/rsyncd.secret",
allow => "192.168.0.0/24",
require => [File["/backup-mysql"], File["/home/dba/rsyncd.secret"]],
  }

}

node 'pclient1.example.com' {
include base1
}





On Monday, August 6, 2012 2:44:00 PM UTC+5:30, Rakesh K wrote:
Hi,

I have recently installed puppet and components including dashboard on my 
server. I am new to puppet and what I am trying to achieve here is passing 
parameters via dashboard

What I can see right now is under Add Class in dashboard, I can only pass the 
class names. Whereas when I can include classes via nodes.pp I can also pass 
parameters.

How can do this from dashboard,

eg. if I want to achieve the following from dashboard how will I be able to do 
it

/etc/puppet/manifests/nodes.pp
class baseclass {
class { 'mysql': }
class { 'mysql::server':
#config_hash => { 'root_password' => 'mypass' }
}
mysql::db { 'mydb':
user => 'myuser',
password => 'mypass',
host => 'localhost',
grant=> ['all'],
}
}

node 'pclient1.example.com' {
include baseclass
}


And this is how my site.pp looks like

[root@pmast1 ~]# cat /etc/puppet/manifests/site.pp
import 'nodes.pp'
$puppetserver = 'pmast1.example.com'
filebucket { "main":
server => "puppet",
path => false,
}
File { backup => "main" }

Please suggest.
--
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/hqByM-qJEegJ.
To post to this group, send email to puppe...@googlegroups.com.
To unsubscribe from this group, send email to puppet-user...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.
This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the email by you is prohibited.

No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2176 / Virus Database: 2437/5183 - Release Date: 08/07/12
This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the email by you is prohibited.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us

Re: [Puppet Users] exec executes remote command but the actual script not run

2012-08-08 Thread Peter Bukowinski
On Aug 8, 2012, at 5:40 AM, duckegg01 wrote:

> Hi 
> 
> I have wriiten a class to deploy a tra file and extract on a remote puppet 
> client. The tar file gets copied across fine and it seems to puppet the thet 
> tar extraction suceeds, but when I check the client I dont see the extracted 
> files
> 
> exec { "Deploy Code":
> command => "/bin/tar -xvf /var/tmp/deploy.tar",
> onlyif => [
> "/usr/bin/test -d /var/tmp/test/"#just 
> testing this
>   ]
> }

I see two possible issues. First, you either need to give the exec resource a 
working directory via the 'cwd' parameter, or you need to use tar's -C option 
to specify where to extract the files. Without either of these, files will 
extract into the home of whichever user is running puppet. So either add this 
parameter:

cwd => '/var/tmp/,

or use this as your tar command ( -- # note that I skipped the verbose switch 
since it's not interactive):

/bin/tar -xf /var/tmp/deploy.tar -C /var/tmp

Another possible issue: If you want /var/tmp/deploy.tar to extract to 
/var/tmp/test, then you need to leave off the 'onlyif' parameter. Currently, 
the exec will only run if /var/tmp/test already exists.

One last thing. If you haven't done so already, set up a dependency between the 
file resource that copies the tar file to the node and the exec resource that 
extracts it -- either via a notify parameter in the file resource or a require 
parameter in the exec resource. 

--
Peter Bukowinski

-- 
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] Switching agent to another environment does not work

2012-08-08 Thread Ryan Coleman
On Wed, Aug 8, 2012 at 8:45 AM, Bernd Adamowicz
 wrote:
> Tried to attach one of my agents to another environment with a command like 
> this:
>
> puppet agent --verbose --debug --server my.puppet.master --environment 
> my_new_env --no-daemonize
>
> But it still receives the old catalog of the old environment. No errors or 
> warnings in log files both on master and agent. So I can't provide more 
> information. Agent and master are on version 2.6.12.
>
> Any ideas?

What does the configuration look like in puppet.conf for the
my_new_env environment?

>
> Thanks
> Bernd
>
> --
> 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.
>



-- 
Ryan Coleman | about.me/ryc
Modules & Forge @ Puppet Labs

-- 
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: Issues with installing some modules !!!

2012-08-08 Thread Ryan Coleman
On Tue, Aug 7, 2012 at 10:44 PM, Rakesh K  wrote:
>
> Actually I have tried fresh install of the module multiple times after
> clearing all traces of the mysql package on the client but still getting the
> same result.

Ok. Have you tried using the released Forge module instead of the
GitHub code in development?
http://forge.puppetlabs.com/puppetlabs/mysql

>
> I am using the same nodes.pp as above as the password is not set at all,
> I hv not tried using the old_password parameter at all.

If your machine already has a mysql server with a password set, you'll
need to supply that in the config_hash like you mentioned earlier
(config_hash => { 'root_password' => 'mypass' }). You can test that
your password is correct by logging into the mysql server directly
(something like 'mysql -u root -P').

If you're trying to change the mysql password with Puppet, you'll need
to do what Nan suggested for the config_hash paramater.
class { 'mysql::server':
  config_hash => {
root_password => 'mypass',
old_root_password => 'oldpass',
  }
}

If this is still not working after those declarations, could you
include the full output of your agent run in --debug mode (puppet
agent -t --debug)? Any relevant messages from your master would be
useful as well.

>
> Please suggest.

Let's figure this out before we move onto the Dashboard. :-)

-- 
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 exec script generate exit 0 but script not run

2012-08-08 Thread duckegg01
Hi 

I have a simple class wriited to deploy a tar file and and extract on a 
puppet client;

The copy of the tar file works fine, the dashboard logs indicate a 
successfull run but the tar file has not been extracted, 

exec { "Deploy Code":
command => "/bin/tar -xvf /var/tmp/deploy.tar",
onlyif => [
"/usr/bin/test -d /var/tmp/tes"   #just a 
dummy test 
  ]
}


The output from the run 

Exec[Deploy Code] 
(/etc/puppetlabs/puppet/modules/deploy/manifests/init.pp:16)
  
Property Message  returns executed successfully

The file is never extracted on the puppet client 



-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/4sDDHvm6QdYJ.
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 installation on Debian Wheezy

2012-08-08 Thread Deimos Fr
Hi,

I've got an issue on installing Puppet Dashboard on Debian wheezy. When I 
launch the db:migrate, I've got an error :

> > rake RAILS_ENV=production db:migrate --trace  
> NOTE: Gem.source_index is deprecated, use Specification. It will be 
> removed on or after 2011-11-01.
> Gem.source_index called from 
> /usr/share/puppet-dashboard/vendor/rails/railties/lib/rails/gem_dependency.rb:21.
> NOTE: Gem::SourceIndex#initialize is deprecated with no replacement. It 
> will be removed on or after 2011-11-01.
> Gem::SourceIndex#initialize called from 
> /usr/share/puppet-dashboard/vendor/rails/railties/lib/rails/vendor_gem_source_index.rb:100.
> NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. 
> It will be removed on or after 2011-11-01.
> Gem::SourceIndex#add_spec called from 
> /usr/lib/ruby/1.9.1/rubygems/source_index.rb:91.
> NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. 
> It will be removed on or after 2011-11-01.
> Gem::SourceIndex#add_spec called from 
> /usr/lib/ruby/1.9.1/rubygems/source_index.rb:91.
> NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. 
> It will be removed on or after 2011-11-01.
> Gem::SourceIndex#add_spec called from 
> /usr/lib/ruby/1.9.1/rubygems/source_index.rb:91.
> NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. 
> It will be removed on or after 2011-11-01.
> Gem::SourceIndex#add_spec called from 
> /usr/lib/ruby/1.9.1/rubygems/source_index.rb:91.
> NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. 
> It will be removed on or after 2011-11-01.
> Gem::SourceIndex#add_spec called from 
> /usr/lib/ruby/1.9.1/rubygems/source_index.rb:91.
> NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. 
> It will be removed on or after 2011-11-01.
> Gem::SourceIndex#add_spec called from 
> /usr/lib/ruby/1.9.1/rubygems/source_index.rb:91.
> NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. 
> It will be removed on or after 2011-11-01.
> Gem::SourceIndex#add_spec called from 
> /usr/lib/ruby/1.9.1/rubygems/source_index.rb:91.
> NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. 
> It will be removed on or after 2011-11-01.
> Gem::SourceIndex#add_spec called from 
> /usr/lib/ruby/1.9.1/rubygems/source_index.rb:91.
> NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. 
> It will be removed on or after 2011-11-01.
> Gem::SourceIndex#add_spec called from 
> /usr/lib/ruby/1.9.1/rubygems/source_index.rb:91.
> NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. 
> It will be removed on or after 2011-11-01.
> Gem::SourceIndex#add_spec called from 
> /usr/lib/ruby/1.9.1/rubygems/source_index.rb:91.
> NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. 
> It will be removed on or after 2011-11-01.
> Gem::SourceIndex#add_spec called from 
> /usr/lib/ruby/1.9.1/rubygems/source_index.rb:91.
> NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. 
> It will be removed on or after 2011-11-01.
> Gem::SourceIndex#add_spec called from 
> /usr/lib/ruby/1.9.1/rubygems/source_index.rb:91.
> NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. 
> It will be removed on or after 2011-11-01.
> Gem::SourceIndex#add_spec called from 
> /usr/lib/ruby/1.9.1/rubygems/source_index.rb:91.
> NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. 
> It will be removed on or after 2011-11-01.
> Gem::SourceIndex#add_spec called from 
> /usr/lib/ruby/1.9.1/rubygems/source_index.rb:91.
> NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. 
> It will be removed on or after 2011-11-01.
> Gem::SourceIndex#add_spec called from 
> /usr/lib/ruby/1.9.1/rubygems/source_index.rb:91.
> NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. 
> It will be removed on or after 2011-11-01.
> Gem::SourceIndex#add_spec called from 
> /usr/lib/ruby/1.9.1/rubygems/source_index.rb:91.
> NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. 
> It will be removed on or after 2011-11-01.
> Gem::SourceIndex#add_spec called from 
> /usr/lib/ruby/1.9.1/rubygems/source_index.rb:91.
> NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. 
> It will be removed on or after 2011-11-01.
> Gem::SourceIndex#add_spec called from 
> /usr/lib/ruby/1.9.1/rubygems/source_index.rb:91.
> rake aborted!
> cannot load such file -- ftools
> /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
> /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
> /usr/share/puppet-dashboard/vendor/rails/activesupport/lib/active_support/dependencies.rb:182:in
>  
> `block in require'
> /usr/share/puppet-dashboard/vendor/rails/activesupport/lib/active_support/dependencies.rb:547:in
>  
> `new_constants_in'
> /usr/share/puppet-dashboard/vendor/ra

[Puppet Users] Problem with puppet-agent

2012-08-08 Thread mfons
On client:
[root@xxx ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.7 (Tikanga)
[root@xxx ~]# rpm -qa|grep puppet
puppet-2.6.12-1.el5

On server:
[root@server ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.7 (Tikanga)
[root@server ~]# rpm -qa|grep puppet
puppet-server-2.6.12-1.el5
puppet-2.6.12-1.el5
[root@server ~]#

Puppet agent runs on client every 30 minutes, as usual.
Sometimes, it fails with messages:
Aug  8 17:30:04 xxx puppet-agent[10416]: Creating a new SSL key for
xxx.domain.com
Aug  8 17:30:04 xxx puppet-agent[10416]: Creating a new SSL
certificate request for xxx.domain.com
Aug  8 17:30:04 xxx puppet-agent[10416]: Certificate Request
fingerprint (md5): 51:BA:28:EA:61:2B:1C:3B:42:64:48:9E:26:0F:28:F9
Aug  8 17:30:05 xxx puppet-agent[10416]: Could not request
certificate: Error 400 on SERVER: Could not find certificate request
for xxx2.domain.com

We have autosign configured in puppetmaster, because we need to run
puppet client on nodes totally unattended (we might provision a new or
existing node at anytime)
The problem is that sometimes when a client runs puppetagent, it fails
requesting a certificate that does not own.
For exemple: client xxx.domain.com generates a new certificate, that
request to sign by the puppetmaster and then it fails because it does
not find the request of a certificate for xxx2.domain.com.

Maybe, next time, when puppetagent runs again, it success, or it fails
again, there is not a rule.

We have a script on server and client that deletes client certificates
stored in /var/lib/puppet.. that runs every hour. We need this
because we can provision a node with same hostname at anytime and if
there was an old certificate on server with the same name it will
fail. This is because we have autosign set to yes in puppetmaster.

-- 
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] exec executes remote command but the actual script not run

2012-08-08 Thread duckegg01
Hi 

I have wriiten a class to deploy a tra file and extract on a remote puppet 
client. The tar file gets copied across fine and it seems to puppet the 
thet tar extraction suceeds, but when I check the client I dont see the 
extracted files

exec { "Deploy Code":
command => "/bin/tar -xvf /var/tmp/deploy.tar",
onlyif => [
"/usr/bin/test -d /var/tmp/test/"#just 
testing this
  ]
}

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/r1pDP5BkWg0J.
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] Switching agent to another environment does not work

2012-08-08 Thread Bernd Adamowicz
Tried to attach one of my agents to another environment with a command like 
this:

puppet agent --verbose --debug --server my.puppet.master --environment 
my_new_env --no-daemonize

But it still receives the old catalog of the old environment. No errors or 
warnings in log files both on master and agent. So I can't provide more 
information. Agent and master are on version 2.6.12.

Any ideas?

Thanks
Bernd 

-- 
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: setting different values to same variables

2012-08-08 Thread Oren Marmor
John, Axel, thanks for your comments
defining default variable in module top-scope is exactly what i did but 
like you said, its not very pretty.
i'll look at hiera, any ideas when its supposed to be released in puppet3?

Oren.

On Wednesday, August 8, 2012 4:37:23 PM UTC+3, jcbollinger wrote:
>
>
>
> On Wednesday, August 8, 2012 12:49:57 AM UTC-5, Axel Bock wrote:
>>
>> Hi Oren, 
>>
>> I'm kind of new to puppet myself - but I think this is not working as you 
>> might like. If you import a class with your definitions, your scope changes 
>> AFAIK. So between
>> import more_defs.qa
>> and
>> import more_defs.dev
>> there is - again: AFAIK - one major disadvantage. Using classes you will 
>> get different scopes for your variables - in the first case you'll get 
>> more_defs.qa::myvar, and in the 2nd case more_defs.dev::myvar as 
>> variable. probably no good.
>>
>>
> I think you're confusing 'import' with 'include'.  It should be possible 
> to put variable declarations at top-scope (outside any class or definition) 
> in a manifest, and to 'import' that manifest at top scope to make them 
> visible as global variables.  But that's ugly and brittle.  The 'import' 
> function has very few good uses, and this is not one of them.
>
> This sort of problem is hiera's bread and butter.  Although it is an 
> extension to Puppet 2, hiera will be built into Puppet 3, so using it now 
> is also forward-looking.
>
>
> John
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/7tDbmSV8u_sJ.
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: Tag Negation

2012-08-08 Thread Douglas Garstang
Anyone? Anyone?

Sent from my iPhone

On Aug 7, 2012, at 4:47 PM, Douglas Garstang  wrote:

> All,
> 
> Is there a way to run puppet and specify to apply resources NOT
> containing a tag?
> 
> ie, negating something like this?
> 
> puppetd --tags solaris
> 
> The use case for this is to put a tag in our application code so that
> when running puppet we know changes made there will NOT be enacted.
> The only way I can see to do it is to do the opposite put a tag
> indicating it isn't our code everywher else and run puppetd WITH the
> tag, which isn't as maintainable.
> 
> 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

2012-08-08 Thread Yaniv Fine
what is i put the rb file in another dir bellow the module dir .
any way i can control what node will load it ?

On Wed, Aug 8, 2012 at 5:16 PM, jcbollinger wrote:

>
>
> On Tuesday, August 7, 2012 8:45:45 AM UTC-5, Yaniv Fine wrote:
>>
>> well its wroking for me now .
>> newbie question .
>> if i put the test.rb file inside
>>
>> modules/common/test/lib/**facter/test.rb
>> is it normal that it runs automatically on all servers without a way for
>> me to control what machine will run it ?
>>
>>
>
> Yes.  Ruby sources placed in lib/facter are expected to contain custom
> facts.  They will be synced automatically to every client node that has
> pluginsync enabled, and they will be run via Facter on every node on which
> they appear, to gather the node's fact values.  They should not contain any
> code other than that of the custom fact(s) they define.
>
> Within a fact definition, however, you can control whether your code will
> run on the node via the 'confine' function provided by the custom fact
> framework.
>
>
> John
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/puppet-users/-/CXjH8Sz0J50J.
>
> 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.



Re: [Puppet Users] update yumrepo followed by packages updates.

2012-08-08 Thread Kristof Willaert
Hi,

Issue:
> 1) I update my VERSION variable
> 2) the next puppet run and only updates the repo (no rpms are upgraded)
> 3) next puppet run updates the rpms.
>
> There are no errors.  but shouldn't my rpms update on the first run after
> the variable change?
>

not sure if this causes it, but yum by default caches the metadata for 6
hours.  You can tune this with
the 'metadata_expire' directive in your repo definition (and the
corresponding 'metadata_expire' attribute
for the yumrepo type).
On the other hand, the change to the yumrepo should trigger yum to pull in
the new metadata. But if
yum determines the local metadata is younger than the remote, it doesn't
update the local metadata.

I normally use "metadata_expire => '10m'" for my internal repositories,
well below the puppet runinterval.

Kind regards,

kristof

-- 
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: update yumrepo followed by packages updates.

2012-08-08 Thread jcbollinger


On Tuesday, August 7, 2012 5:46:31 PM UTC-5, trey85stang wrote:
>
> Hey All,
>
> I have an issue I need help working around or determining if it is a 
> bug
>
> the issue is as follows,  I have a custom repo(s) that has all my software 
> for a specific version release in it. A new version gets a new repo.
>
> The problem lies when I move to upgrade software.  My idea was to have a a 
> simple version variable in an external nodes script.  When that changed the 
> repo would change... and all my software would be updated. The problem lies 
> that for some reason I need to puppet restarts to make this work??
>
> example
>
> class repos {
>   yumrepo { "custom_app":
> descr=> "custom_app",
> baseurl  => "
> http://reporserver/\$releasever/application-${::VERSION}/\$basearch";,
> gpgkey   => "http://reposerver/RPM-GPG-KEY-Interop";,
> enabled  => 1,
> gpgcheck => 1
>   }
> }
>
> class packages {
>   include repos
>   package { "custom_app_rpm1":
> ensure  => latest,
> require => Yumrepo["custom_app"],
>   }
>   package { "custom_app_rpm2":
> ensure => latest,
> require => Yumrepo["custom_app"],
>   }
> }
>
> This is just a snippet...  
>
> Issue:  
> 1) I update my VERSION variable 
> 2) the next puppet run and only updates the repo (no rpms are upgraded)
> 3) next puppet run updates the rpms.  
>
> There are no errors.  but shouldn't my rpms update on the first run after 
> the variable change?
>

If you are certain that the repo configuration is updated on the first run, 
and if the Package resources indeed do 'require' the appropriate Yumrepo 
resource, then the most likely problem is Yum's metadata caching.  After 
you change the configuration of an existing Yum repository you need to 
perform a "yum clean metadata" or "yum clean all" to ensure that Yum will 
notice the changes immediately.  If you do not do so then you have to wait 
for the repo's cached metadata to expire.

I use something like this:

exec { "clean_yum_metadata":
  command => "/usr/bin/yum clean metadata",
  refreshonly => true
}

declared on every node.  My Package resources all 'require' that Exec, 
either explicitly or via a resource default, and my Yumrepo resources all 
notify it.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/TRED3XhE2TEJ.
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

2012-08-08 Thread jcbollinger


On Tuesday, August 7, 2012 8:45:45 AM UTC-5, Yaniv Fine wrote:
>
> well its wroking for me now .
> newbie question .
> if i put the test.rb file inside 
>
> modules/common/test/lib/facter/test.rb 
> is it normal that it runs automatically on all servers without a way for 
> me to control what machine will run it ?
>
>

Yes.  Ruby sources placed in lib/facter are expected to contain custom 
facts.  They will be synced automatically to every client node that has 
pluginsync enabled, and they will be run via Facter on every node on which 
they appear, to gather the node's fact values.  They should not contain any 
code other than that of the custom fact(s) they define.

Within a fact definition, however, you can control whether your code will 
run on the node via the 'confine' function provided by the custom fact 
framework.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/CXjH8Sz0J50J.
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] new module created , but does not load ( is ignored)

2012-08-08 Thread jcbollinger


On Tuesday, August 7, 2012 9:21:10 AM UTC-5, TORO wrote:
>
>
> Am Dienstag, 7. August 2012 15:08:38 UTC+2 schrieb jcbollinger: 
>>
>>
>>
>> On Tuesday, August 7, 2012 2:47:05 AM UTC-5, TORO wrote: 
>>>
>>> Yes you are right , : 
>>>
 b) the class itself is not being included properly elsewhere
>>>
>>>  as it is not listed i
>>> /var/lib/puppet/state/classes.txt 
>>>
>>> And Yes you are right , I should have attached my init.pp and oel.pp see 
>>> now below:
>>>
>>
>> No, if the the node's catalog compiles correctly, but the class is not 
>> included, then the problem is not with the class's own manifest(s).  Ken 
>> described the most common ways in which class 'itrs_probe' could be 
>> assigned to your node; are you using one of those?
>>
>>
>> John
>>
>>  He John ,
>
> Thanks for Your comment. But now I´m totally lost.
>
> I have to admit, the puppet server was already set up and working with a 
> bunch of modules when I take over ( I have not set puppet up myselfand 
> do not have many experience with Puppet !)
>
> So I had expected to create new path under modules e.g..testing 
> /modules/itrs_prob/ { files, templates, manifests} and then put a init.pp 
> and the oel.pp into manifests should let puppet deploy my stuff.
>
> This seems not to be  the case.
>
> For testing I made again a new modul (/dummy/ { files, templates, 
> manifests} and also put an init.pp in to manifests . 
>
> (this init pp)
>
> class dummy () {
>
> notify { 'inside dummy': }
>
> }
>
>  I had expected to see something like this ...what I have tested on a 
> other already working modul ... it additionally send the notify 
>
> notice: /Stage[main]/Altiris_client/Notify[inside altiris_client]/message: 
> current_value absent, should be inside altiris_client (noop) 
>
> But the notify for dummy does not appear ...
>
> How do I add my new modules to get deploy ... ( where dummy is not 
> required it does nothing ... but my itrs_probe needed)
>

What you are missing is that Puppet does not automatically deploy all 
available modules to all nodes.  It must be told which classes of which 
modules to assign to each node.  This is a good thing, for otherwise every 
node would have to be configured the same way.

The assignments of classes to nodes may appear, either at top level or in a 
'node' declaration block matching the target node, in the site-wide root 
manifest "site.pp" or a manifest 'import'ed directly or indirectly by it.  
Ken described how those might look.  Alternatively, Puppet may assign 
classes to nodes based on the output of an "external node classifier" (ENC) 
program that someone set up for your site.  Additionally, classes may add 
other classes (as your its_probe class does), provided they themselves are 
assigned to the target node by one of the available means.

I can't tell you exactly what to do because I can't tell what mode(s) of 
class assignment your site is using, nor which of your nodes are supposed 
to get the classes you have created.

I urge you to invest some time in learning at least the fundamentals of 
your tools (Puppet, in this case).  Puppet has on-line documentation and 
tools that will carry you a long way: 
http://docs.puppetlabs.com/#puppetpuppet.  I would recommend either the 
Learning Puppet series or the Language Guide (or both).  The former may be 
a bit more accessible, but if you're up to it then the latter may be more 
comprehensive.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/m9Bx-BT-wgcJ.
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: Exec resource don't write file after the command

2012-08-08 Thread Rost
thanks Brian,

You are right !!!

It's working

Le mercredi 8 août 2012 15:42:02 UTC+2, Rost a écrit :
>
> Hi all,
>
> I'm trying to have the exec resource write a file after the command but it 
> don't.
>
> here is the resource declaration
>
> class gepet {
> notify { 'begin':}
>  file { '/root/essai/html':
> ensure => present,
> content => "Wrote By Yves Nton",
> notify => Exec['test'],
> }
>  exec { 'test':
> path => "/usr/bin:/usr/sbin:/bin",
> cwd => "/root/essai",
> command => "rm -rf /root/essai/html",
> creates => "/root/essai/exec.txt",
> refreshonly => true
> }
>  notify { 'end':
> require => File['/root/essai/html']
> }
> }
>
> suggestions ?
> Thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/7SmuU8bDuQcJ.
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] Exec resource don't write file after the command

2012-08-08 Thread Brian Gallew
The "creates" attribute tells Puppet that the "command" attribute actually
creates a file, and that the Exec{} should not be run if that file exists.
 You need to alter your command:
command => "rm -rf /root/essai/html;touch /root/essai/exec.txt"

On Wed, Aug 8, 2012 at 6:42 AM, Rost  wrote:

> Hi all,
>
> I'm trying to have the exec resource write a file after the command but it
> don't.
>
> here is the resource declaration
>
> class gepet {
> notify { 'begin':}
>  file { '/root/essai/html':
> ensure => present,
> content => "Wrote By Yves Nton",
> notify => Exec['test'],
> }
>  exec { 'test':
> path => "/usr/bin:/usr/sbin:/bin",
> cwd => "/root/essai",
> command => "rm -rf /root/essai/html",
> creates => "/root/essai/exec.txt",
> refreshonly => true
> }
>  notify { 'end':
> require => File['/root/essai/html']
> }
> }
>
> suggestions ?
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/puppet-users/-/4u6oOxidJJUJ.
> 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] Exec resource don't write file after the command

2012-08-08 Thread Rost
Hi all,

I'm trying to have the exec resource write a file after the command but it 
don't.

here is the resource declaration

class gepet {
notify { 'begin':}
 file { '/root/essai/html':
ensure => present,
content => "Wrote By Yves Nton",
notify => Exec['test'],
}
 exec { 'test':
path => "/usr/bin:/usr/sbin:/bin",
cwd => "/root/essai",
command => "rm -rf /root/essai/html",
creates => "/root/essai/exec.txt",
refreshonly => true
}
 notify { 'end':
require => File['/root/essai/html']
}
}

suggestions ?
Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/4u6oOxidJJUJ.
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] "tidy" is not :)

2012-08-08 Thread Dan White
In a node, for a test, I have:

tidy { '/opt/home/users/george':
age => "1w",
recurse => true,
rmdirs => true,
}

and when I ran it, it cleaned out all the files under "george", but not the 
directories.
There are two directories, one with today's date on it (I expect that one to 
stay) and another with a June date on it.  Why is that one still there ?

“Sometimes I think the surest sign that intelligent life exists elsewhere in 
the universe is that none of it has tried to contact us.”
Bill Waterson (Calvin & Hobbes)

-- 
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: setting different values to same variables

2012-08-08 Thread jcbollinger


On Wednesday, August 8, 2012 12:49:57 AM UTC-5, Axel Bock wrote:
>
> Hi Oren, 
>
> I'm kind of new to puppet myself - but I think this is not working as you 
> might like. If you import a class with your definitions, your scope changes 
> AFAIK. So between
> import more_defs.qa
> and
> import more_defs.dev
> there is - again: AFAIK - one major disadvantage. Using classes you will 
> get different scopes for your variables - in the first case you'll get 
> more_defs.qa::myvar, and in the 2nd case more_defs.dev::myvar as 
> variable. probably no good.
>
>
I think you're confusing 'import' with 'include'.  It should be possible to 
put variable declarations at top-scope (outside any class or definition) in 
a manifest, and to 'import' that manifest at top scope to make them visible 
as global variables.  But that's ugly and brittle.  The 'import' function 
has very few good uses, and this is not one of them.

This sort of problem is hiera's bread and butter.  Although it is an 
extension to Puppet 2, hiera will be built into Puppet 3, so using it now 
is also forward-looking.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/0ICIVY5xCbkJ.
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: A few questions about setting up Custom Facts

2012-08-08 Thread Dan White
- jcbollinger  wrote:
> On Tuesday, August 7, 2012 2:26:47 PM UTC-5, Ygor wrote:
> >
> > - jcbollinger wrote: 
> > > On Monday, August 6, 2012 10:48:25 AM UTC-5, Ygor wrote: 
> > > > 
> > > > I am putting together some system improvements based on using the 
> > > > stdlib::facter-dot-d and I have a few questions: 
> > > > 
> > > > Are facts always single “key => value” pairs or can you get a hash or 
> > > > array into a fact ? 
> > > > 
> > > > I suspect arrayed/hashed facts are not possible in the current 
> > > > environment, but I feel it does not hurt to ask. 
> > > > 
> > > 
> > > My understanding is that the protocol for sending facts from agent to 
> > > master supports only string fact values.  I think that's the main 
> > > restriction. 
> > > 
> > > 
> > > John 
> >
> > So, then could I do the following ? 
> >
> > test.yaml: 
> > stack_info: one,two,three,four,five 
> >
> >
> Um, yes?
> 
> I mean, it's not clear what, if anything, you intend for that to do.  If 
> you're asking whether you can send delimited strings as fact values, then 
> of course you can.  And once it reaches the master, Puppet has a built-in 
> split() function that can turn such a delimited string into the 
> corresponding array.
> 
> 
> John

I want to use puppetlabs-stdlib and /etc/facter/facts.d to create a set of 
local facts.
Some of these facts come in variable quantities.  I would like to stack these 
up into a delimited string.  I can deal with that.

On thing about your responses that puzzles me is the repeated mention of facts 
going from the agent to the master.  What is that about, please ?  I am looking 
at facts local to the agent.  My understanding is that all the "Magic Behind 
the Curtains" about puppet happens on the agent.  What is the story here about 
agent facts on the master ?  For what purpose ?

“Sometimes I think the surest sign that intelligent life exists elsewhere in 
the universe is that none of it has tried to contact us.”
Bill Waterson (Calvin & Hobbes)

-- 
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: Scope Confusion!

2012-08-08 Thread jcbollinger


On Tuesday, August 7, 2012 1:25:32 PM UTC-5, Douglas wrote:
>
> As usual, I'm confused about scope in puppet. This puppet 2.7.1. 
>
> In my classes below, the bottom class, company::web::content, requires 
> the file resource '/usr/local/company'. However, that resource is 
> defined two includes back in the class company::common. I always 
> thought this wasn't supposed to work, and that you could only access 
> the immediate scope, not the scope of stuff beyond this. It does work 
> however. Is it supposed to. Why? 
>

Yes, it is supposed to.  All classes and resources have global scope once 
they are declared.  The 'include' function does not introduce classes and 
their resources into the current, innermost scope -- it doesn't need to do 
so, and couldn't even if it wanted to do.  Instead, 'include' ensures that 
the specified class has been parsed and added to the catalog, which, as I 
said, puts them into the global scope.

The model pretty much has to work that way, because the physical resources 
of the target node all have global scope, too.

It is useful and appropriate for classes and definitions to 'include' (or 
'require') the classes on which they rely, provided that those classes are 
not parametrized (Puppet <= 2.7.x).  Aside from it's plain aggregation 
function, that way it's a lot easier to make classes independent of the 
order in which they are declared, plus it has documentary value.  Classes 
that 'include' all the classes on which they directly rely are more robust.

However, there is no requirement for a class to 'include' its 
dependencies.  If a class does not do so, then it simply relies on those 
dependencies to have been declared by some other class that was parsed 
before it.  Users of parametrized classes rely heavily on this, because 
parametrized classes can be declared only once, but they may need to be 
referenced by many other classes.


John

 

>
>
> class company::common { 
> file { 
> '/usr/local/company': 
>  
> } 
> } 
>
>
> class company::web::common { 
> include company::common 
> } 
>
>
> class company::web::content { 
> include company::web::common 
>
> file { 
> '/usr/local/company/www': 
> require => File['/usr/local/company'] 
> } 
> } 
>
> Doug. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/2i9JGMwdfdAJ.
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: A few questions about setting up Custom Facts

2012-08-08 Thread jcbollinger


On Tuesday, August 7, 2012 2:26:47 PM UTC-5, Ygor wrote:
>
> - jcbollinger wrote: 
> > 
> > 
> > On Monday, August 6, 2012 10:48:25 AM UTC-5, Ygor wrote: 
> > > 
> > > I am putting together some system improvements based on using the 
> > > stdlib::facter-dot-d and I have a few questions: 
> > > 
> > > Are facts always single “key => value” pairs or can you get a hash or 
> > > array into a fact ? 
> > > 
> > > I suspect arrayed/hashed facts are not possible in the current 
> > > environment, but I feel it does not hurt to ask. 
> > > 
> > 
> > My understanding is that the protocol for sending facts from agent to 
> > master supports only string fact values.  I think that's the main 
> > restriction. 
> > 
> > 
> > John 
>
> So, then could I do the following ? 
>
> test.yaml: 
> stack_info: one,two,three,four,five 
>
>
Um, yes?

I mean, it's not clear what, if anything, you intend for that to do.  If 
you're asking whether you can send delimited strings as fact values, then 
of course you can.  And once it reaches the master, Puppet has a built-in 
split() function that can turn such a delimited string into the 
corresponding array.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/f03YLTHK-5IJ.
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] Delete "unmanaged" files in directory

2012-08-08 Thread Calvin Walton
On Tue, 2012-08-07 at 22:53 -0700, Axel Bock wrote:
> Hello readers, 
> 
> I might have the need for something like "delete all unmanaged files". 
> Explanation: I am creating a bunch of apache config files, which contain 
> information about the hostname and the port they're listening on. Now if I 
> change the host name - or the port - the last generated file keeps sitting 
> there, and does nothing in the best case (rarely ;), and provokes errors in 
> all others. 
> 
> Now because _all_ config files in those directories are generated by me & 
> puppet I wondered if there's a method to find out which files are _not_ 
> genereated by puppet, and simply delete them. 

This is pretty easy to do; the functionality is built into puppet. You
just have to add a File resource for the directory, and set recurse =>
true, purge => true, like so:

file { '/etc/apache/sites-enabled':
ensure  => 'directory',
recurse => true,
purge   => true,
}

Make sure you read the documentation for details:
http://docs.puppetlabs.com/references/latest/type.html#file

-- 
Calvin Walton 

-- 
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] Type Service: ignore "notify"

2012-08-08 Thread tobias
That worked! Thanks a lot...

On Wednesday, August 8, 2012 10:37:33 AM UTC+2, Erik Dalén wrote:
>
> On 7 August 2012 17:20, tobias > wrote: 
> > Hi, 
> > 
> > Is it possible to configure a service to ignore notifies? 
> > I'd like to have some special cases where a "notify  => Service['xyz']" 
> is 
> > ignored by the service "xyz"... (The service is managed by Pacemaker and 
> I 
> > don't want Puppet to manage this service) 
> > 
>
> You could do something like this: 
> service { 'xyz': 
>   hasrestart => false, 
>   restart=> '/bin/true', 
> } 
>
> -- 
> Erik Dalén 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/4mt_i7CX97kJ.
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] Type Service: ignore "notify"

2012-08-08 Thread Erik Dalén
On 7 August 2012 17:20, tobias  wrote:
> Hi,
>
> Is it possible to configure a service to ignore notifies?
> I'd like to have some special cases where a "notify  => Service['xyz']" is
> ignored by the service "xyz"... (The service is managed by Pacemaker and I
> don't want Puppet to manage this service)
>

You could do something like this:
service { 'xyz':
  hasrestart => false,
  restart=> '/bin/true',
}

-- 
Erik Dalén

-- 
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: postgres plugin puppetdb

2012-08-08 Thread Antidot SAS
Hi,

The configuration files are attached.

Here is the postgres login:
[root@puppetmaster]:/data/local/postgresql/dumps #  psql -h localhost
puppetdb puppetdb
psql (8.4.12)
SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256)
Type "help" for help.

puppetdb=> \l
  List of databases
   Name|  Owner   | Encoding  | Collation | Ctype |   Access privileges
---+--+---+---+---+---
 postgres  | postgres | SQL_ASCII | C | C |
 puppetdb  | puppetdb | SQL_ASCII | C | C |
 template0 | postgres | SQL_ASCII | C | C | =c/postgres
  :
postgres=CTc/postgres
 template1 | postgres | SQL_ASCII | C | C | =c/postgres
  :
postgres=CTc/postgres
(4 rows)
puppetdb=> \d
  List of relations
 Schema |  Name   | Type  |  Owner
+-+---+--
 public | catalog_resources   | table | puppetdb
 public | catalogs| table | puppetdb
 public | certname_catalogs   | table | puppetdb
 public | certname_facts  | table | puppetdb
 public | certname_facts_metadata | table | puppetdb
 public | certnames   | table | puppetdb
 public | classes | table | puppetdb
 public | edges   | table | puppetdb
 public | resource_params | table | puppetdb
 public | schema_migrations   | table | puppetdb
 public | tags| table | puppetdb


And by the way I changed the JVM max heap at 256M and since then no issue.
Regarding the postgres dump file, I'll be willing to give it to you so
contact me in private to get the URL or let me know where I can put it as
long as nobody could access it publicly.


Regards,
JM




On Tue, Aug 7, 2012 at 6:59 PM, Chris Price  wrote:

> JM,
>
> Hmm... so, those versions of Java seem fine--those are probably the ones
> we've done the most testing with.
>
> So, the error message that you sent indicates that the JVM is running out
> of RAM.  This could possibly indicate that you are still using the embedded
> database instead of postgres--the embedded database uses a lot of RAM.  Can
> we see what your database.ini file looks like?  In fact, perhaps we can
> take a look at all of the files in your /etc/puppetdb/conf.d directory?
>
> You could also connect directly to your postgres database using psql or
> pgadmin, and check to see if the puppetdb tables exist and contain data.
>
> The only other possibility that I can think of would be if one or more of
> your nodes has an extremely large catalog, and that the puppetdb JVM
> instance doesn't have enough memory to process the catalog.  If that's the
> case, we can try increasing your JVM max heap space in
> /etc/default/puppetdb... but we would be really interested in collecting
> some data from you about what that catalog looks like (for our own testing
> and debugging purposes) if it turns out that that is the culprit.
>
> Thanks!
> Chris
>
>

-- 
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.



puppetdb.tar
Description: Unix tar archive