[Puppet Users] Using puppet cert generate on a client -- why doesn't this work?

2012-02-27 Thread Rich Rauenzahn
I'm running a two headed puppetmaster and have disabled crl's. Let's call them the primary and the secondary. The primary and secondary both use the primary as their master. The secondary only is used when the primary isn't responding (I wrap the puppetd call in cron with a short shell script)

Re: [Puppet Users] Software inventory

2011-09-21 Thread Rich Rauenzahn
On Wed, Sep 21, 2011 at 9:45 AM, Glenn Bailey replic...@dallaslamers.org wrote: Howdy, Before I go about writing one myself, anyone out there written a software inventory module/fact for gathering a list of all installed rpms/debs on a system? Got a few ideas floating around in my head, but

Re: [Puppet Users] Re: scoping question - I want a node specific global var

2011-08-17 Thread Rich Rauenzahn
On Tue, Aug 16, 2011 at 4:46 PM, Scott Smith sc...@ohlol.net wrote: Some times doing things the right way requires going through the pain of changing your current practices for the better. Sometimes your schedule doesn't allow you to refactor that much right now. -- You received this message

Re: [Puppet Users] Re: scoping question - I want a node specific global var

2011-08-17 Thread Rich Rauenzahn
On Wed, Aug 17, 2011 at 6:44 AM, jcbollinger john.bollin...@stjude.org wrote: * We're not using ENC Fair enough.  I don't use one either, but it was worth pointing out the possibility. Yes, and it is an additional argument to migrate there eventually. * I want the special information right

Re: [Puppet Users] Re: scoping question - I want a node specific global var

2011-08-16 Thread Rich Rauenzahn
On Tue, Aug 16, 2011 at 6:23 AM, jcbollinger john.bollin...@stjude.org wrote: [Lots of good ideas] Of those, I would recommend either extlookup() or your ENC (if you have one), with my personal preference being extlookup().  I think Hiera may offer an even better solution (though similar to

[Puppet Users] scoping question - I want a node specific global var

2011-08-15 Thread Rich Rauenzahn
Is it possible to do something like this within the new scoping rules? It seems that $::IMSPECIAL doesn't refer to the decl in node a. And I can't use class parms as the variable is evaluated in a base class. Suggestions? Currently using puppet 2.7.1 node a { $IMSPECIAL=true include foo

Re: [Puppet Users] Re: Not getting errors/warnings/etc in reports

2011-08-01 Thread Rich Rauenzahn
On Thu, Jul 21, 2011 at 7:37 AM, Peter Meier peter.me...@immerda.ch wrote: I'm still not getting my error() messages in the report yaml ... why? Probably, because functions are evaluated on the master, while the report is created on the client when the catalog is applied. So these messages

[Puppet Users] Re: Not getting errors/warnings/etc in reports

2011-07-20 Thread Rich Rauenzahn
On Tue, Jul 19, 2011 at 11:03 AM, Rich Rauenzahn rraue...@gmail.com wrote: I assumed this would have been fixed by 2.7.1, but it appears that when we call the functions err(), warning(), etc., that they don't get added to the report object, which we are using to generate nagios alerts. I'm

[Puppet Users] Not getting errors/warnings/etc in reports

2011-07-19 Thread Rich Rauenzahn
I assumed this would have been fixed by 2.7.1, but it appears that when we call the functions err(), warning(), etc., that they don't get added to the report object, which we are using to generate nagios alerts. I'm guessing I'll have to write my own to do that -- does anyone have any examples of

[Puppet Users] puppet never finishing when there are thousands of resources

2011-07-12 Thread Rich Rauenzahn
We are using puppet to export nagios resources (now we're using file resources to represent them) and the number of resources is probably in the thousands -- our puppet runs take 6GB (on the client side) and then just sort of spin forever (it's been running for a couple of hours now -- and no,

[Puppet Users] imports, defined(), and conflicts

2011-06-29 Thread Rich Rauenzahn
We're trying to write a rule that imports a bunch of nagios Nagios_host rules. But then we take a list of machines and add Nagios_host rules for them as well. Some of the systems might overlap, and we were hoping to use puppet to weed them out. We assumed if we did class a { Nagios_host

[Puppet Users] exporting resources that aren't built-in resources...

2011-06-22 Thread Rich Rauenzahn
We seem to be able to export resources (and import them) just fine if they are basic resources, like nagios_* -- but we don't seem to be able to do it with defines, like @@concat::fragment. $ puppet -V 2.6.4 Is this a bug? Intended behavior? Are we doing something wrong? -- You received this

[Puppet Users] Re: exporting resources that aren't built-in resources...

2011-06-22 Thread Rich Rauenzahn
On Wed, Jun 22, 2011 at 3:03 PM, Rich Rauenzahn rraue...@gmail.com wrote: We seem to be able to export resources (and import them) just fine if they are basic resources, like nagios_* -- but we don't seem to be able to do it with defines, like @@concat::fragment. $ puppet -V 2.6.4

Re: [Puppet Users] any better way to manage access control via /etc/passwd

2011-04-11 Thread Rich Rauenzahn
On Mon, Apr 11, 2011 at 7:30 PM, hai wu haiwu...@gmail.com wrote: We need to manage /etc/passwd where there would be one line at the very end of the file to restrict access to all users not explictly allowed: +::/sbin/nologin If using delete_lines and append_if_no_such_lines (similar to

[Puppet Users] Using puppet/augeas to manage config entry AND matching comment

2011-04-06 Thread Rich Rauenzahn
Seems like Augeas doesn't have a really good concept of conf file entry AND a comment that goes with it. I can 'ins' a comment before the configuration item, but every time augeas runs, it will add another. I can re-'set' the comment before the existing configuration item, but that won't work if

[Puppet Users] Re: Using puppet/augeas to manage config entry AND matching comment

2011-04-06 Thread Rich Rauenzahn
On Wed, Apr 6, 2011 at 11:14 AM, Rich Rauenzahn rraue...@gmail.com wrote: Seems like Augeas doesn't have a really good concept of conf file entry AND a comment that goes with it.  I can 'ins' a comment before the configuration item, but every time augeas runs, it will add another. I can re

Re: [Puppet Users] Re: returning a hash (json object) from custom function?

2011-03-16 Thread Rich Rauenzahn
On Thu, Feb 10, 2011 at 8:35 AM, Peter Meier peter.me...@immerda.ch wrote: Could you file a bugreport[1], if there isn't yet one? Thanks! Then the chances are high that it will get fixed. I'd love to, but so far no matter how many times I reset my password, it thinks my login is invalid. Rich

Re: [Puppet Users] parsing (and returning) json data in puppet in custom function

2011-03-16 Thread Rich Rauenzahn
I see there is a bug open about this, http://projects.puppetlabs.com/issues/6621 but I can't login to puppetlabs. define test() { $foo3 = json_parse(bad|,'':) notice($foo3) $type = type($foo3) # our custom function that returns class notice(type=$type) if $foo3 == {

Re: [Puppet Users] Trying to write a visudo checker

2011-03-04 Thread Rich Rauenzahn
On 3/4/2011 12:23 AM, Alan Barrett wrote: On Thu, 03 Mar 2011, Rich Rauenzahn wrote: It seems someone got clever and decided to look at exec's and look for managed filenames in argument lists and create implicit dependencies from them? Argh! Yes, the unwanted dependencies are very annoying

[Puppet Users] Trying to write a visudo checker

2011-03-03 Thread Rich Rauenzahn
This visudo checker I've written (based on some examples from the web and puppet training materials) causes a dependency loop -- but only when I include the unless = diff It seems someone got clever and decided to look at exec's and look for managed filenames in argument lists and create

[Puppet Users] Keeping a directory clean at top level

2011-02-15 Thread Rich Rauenzahn
Say we have a directory called /FOO-- we want to only have in it what puppet puts into it. I want to remove any symlinks, empty directories, or files in it that don't belong -- but only one level deep. If the subdirectory has content, I don't want it removed -- ideally, I'd like a failure. This

[Puppet Users] force directory to symlink, but only if empty

2011-02-14 Thread Rich Rauenzahn
I was surprised to find that file { $foo: ensure = symlink, target = '/tmp/foo', } doesn't replace $foo if $foo is an empty directory. Is there a particular combination of options to the file resource that would replace the directory with the symlink if empty, but wouldn't filebucket

Re: [Puppet Users] force directory to symlink, but only if empty

2011-02-14 Thread Rich Rauenzahn
On Mon, Feb 14, 2011 at 5:20 PM, Nan Liu n...@puppetlabs.com wrote: On Mon, Feb 14, 2011 at 5:17 PM, Rich Rauenzahn rraue...@gmail.com wrote: I was surprised to find that file { $foo:    ensure = symlink,    target  = '/tmp/foo', } doesn't replace $foo if $foo is an empty directory

[Puppet Users] returning a hash (json object) from custom function?

2011-02-07 Thread Rich Rauenzahn
We have a command line utility that queries a database to get certain facts about our hosts -- I wanted to write a custom function to obtain all of those facts at once. The tool outputs JSON and I wanted to take that output and return a hash back into puppet where I could access the facts like...

[Puppet Users] Re: returning a hash (json object) from custom function?

2011-02-07 Thread Rich Rauenzahn
Ok, I was mistaken. Returning a hash works. It would be helpful if the ruby exceptions bubbled up to puppet reported the correct line number from the ruby source -- if that is possible. Rich On Mon, Feb 7, 2011 at 4:18 PM, Rich Rauenzahn rraue...@gmail.com wrote: We have a command line

Re: [Puppet Users] certificate fails to verify

2011-02-06 Thread Rich Rauenzahn
On Sat, Feb 5, 2011 at 7:54 PM, Tim Dunphy bluethu...@gmail.com wrote: Hello list!!  I am a new puppet user and I am having trouble getting the server to verify the client cert. I know this has been covered before but I have tried several things and no luck as of yet. This probably isn't

[Puppet Users] failing with fail() without failing everything

2011-02-03 Thread Rich Rauenzahn
We would like to have a default node applied to systems, but also trigger a failure so that we notice the system in puppet-dashboard. At the moment we're doing... node default { include system_defaults fail($hostname doesn't have a node to apply to it) } Unfortunately this seems to fail

[Puppet Users] How to include the Scope(...) in a generated string?

2011-02-02 Thread Rich Rauenzahn
I'd like to include similar information that notice() spits out in a file I am generating -- basically so that anyone looking at the generated file (actually a file fragment) could trace it back to the class that is generating the entry. Using $name within the file fragment is the closest I am

[Puppet Users] redefining resource with a fully qualified name

2011-01-26 Thread Rich Rauenzahn
This works: $ cat foo.pp define aaa($x=1) {   notice(\$x=$x) } class b {    aaa { xxx: x=2 } } class c inherits b{    Aaa[xxx] {  x=3 } } include c -- But this doesn't: -- $ cat foo.pp define scope::aaa($x=1) {   notice(\$x=$x) } class b {    

[Puppet Users] Re: redefining resource with a fully qualified name

2011-01-26 Thread Rich Rauenzahn
On Wed, Jan 26, 2011 at 10:18 AM, Rich Rauenzahn rraue...@gmail.com wrote: class c inherits b{    Scope:aaa[xxx] {  x=3 } } I remember seeing an example now: Scope:Aaa[xxx] -- capitalize both components. Rich -- You received this message because you are subscribed to the Google Groups