[Puppet Users] Re: extending puppet without hacking puppet

2011-05-10 Thread John Lyman
You can set "noop => true" in the package resource and puppet won't actually change it, just log that it wants to change it. package { "httpd": name=> "httpd", ensure => "latest", noop => true, } This is especially convenient with tagmail or other reporting. If possible, making "noop"

[Puppet Users] Re: What is the best practice to clean up installed components on a node?

2011-07-09 Thread John Lyman
Create a class called sg_node::disabled that inherits sg_node and overrides all of it's resources to "undo" them. This usually means setting 'ensure =>absent' (or 'undef' if applicable) for most resources. For execs, I usually set 'unless => true.' Be sure to include the class on the nodes you w

[Puppet Users] Re: Modules for Solaris

2011-07-21 Thread John Lyman
I would be especially interested if anyone has a good way to manage / etc/system. I am currently using the concat module, but it's not the best method. I know the "puppet way" would be to use augeas, but I haven't had any luck compiling it with sun studio and don't want to go the gcc route for va

[Puppet Users] Re: CPAN package provider?

2011-09-27 Thread John Lyman
We are using ActiveState perl so we compile ppms from cpan modules. I created a definition based on this page: http://www.windley.com/archives/2008/10/using_puppet_and_cpan.shtml It works pretty well for us. Ideally, a provider would be better than a definition, but this works in the mean time.

[Puppet Users] Re: RFC: Being able to exclude resources from reporting.

2011-10-05 Thread John Lyman
My tagmail.conf contains "all, !noreport: em...@example.com," so if I want to ignore a resource I just tag it with "noreport." Of course, that only applies to tagmail reporting. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this gr

[Puppet Users] Re: Using defined(Class[]) on a subclass

2010-09-02 Thread John Lyman
I believe there is a bug, but I can't find it to reference it now. Try this: if ! defined("server::cobler") { # do something } On Sep 2, 5:07 pm, "Steven L. Seed" wrote: > I'm having trouble getting puppet to work when using a conditional to > check whether or not a subclass is defined. > > Her

[Puppet Users] Re: Path issue using Puppet 2.6 with Nexenta ncp 3.0.1

2010-09-24 Thread John Lyman
> Nexenta is using SMF like Solaris, not init.d like Linux. You can modify the SMF service manifest to include the path. For example: See http://www.cuddletech.com/blog/pivot/entry.php?id=182 You can also do it with svccfg: svccfg -s puppetma

[Puppet Users] Re: Puppet 2.6 on Solaris

2011-01-31 Thread John Lyman
Gems are always an option. On Jan 31, 4:06 am, David Schmitt wrote: > Hi all, > > I'm looking for current puppet packages for Solaris and found only > blastwave (0.25.5), opencsw (http://www.opencsw.org/packages/CSWpuppet/, > 0.25.4) and Gary Law's repo (http://garylaw.net/packages/, 0.25.1). > >

[Puppet Users] Re: user authorized_keys with wrong perms

2011-02-04 Thread John Lyman
I ran into an issue where I was trying to set the owner and group on authorized_keys using a file resource. I didn't realize that the ssh_authorized_keys provider will automatically set the gid to the primary group of the owner of the puppetd process (in my case, root). So if a key was added after

[Puppet Users] Re: facter to display all active networks

2011-02-10 Thread John Lyman
You could probably get away with using template or an inline template. On Feb 10, 5:00 pm, windowsrefund wrote: > On Feb 10, 3:59 pm, Forrie wrote: > > > Facter will display the values associated with network_* specific > > settings.   Shouldn't there be a way to display all connected (active)

[Puppet Users] rrd library missing

2010-01-21 Thread John Lyman
I am trying to get rrd graphs working, but I am getting the infamous "RRD library is missing; cannot store metrics". Everything I have read about the error applied to redhat or ubuntu. I am using Solaris 10. I installed both the rrdtool Solaris package and the RubyRRDtool gem. When I run "ruby -

[Puppet Users] Re: rrd library missing

2010-01-22 Thread John Lyman
> Are you using by any chance any trunk version of puppet? I am running puppet 0.25.3 on Solaris, installed using the gem. > As far as I know puppet currently (0.25.4) uses RubyRRDTool gem which is > not the same as the ruby rrd library bundled in RRDtools (despite the fact > that the bundled vers

[Puppet Users] Re: New Puppet Documentation Site

2010-01-27 Thread John Lyman
It would be nice if the page titles weren't all "Puppet Docs." When I have multiple pages open in separate tabs, it's difficult to find the page I want. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet

[Puppet Users] qualified variables inside of a node definition?

2010-02-02 Thread John Lyman
I'm trying to figure out the best way to achieve the following... Inside of each node definition, I have variables for ip address, default router, dns server, etc. I have a jumpstart module that has several different file resources that use templates. In each template, I would like to be able to

[Puppet Users] Re: Running multiple instances of a puppetmaster on one server

2010-02-02 Thread John Lyman
Basically, you set up a web proxy with your web server of choice to handle SSL connections, and then you can start as many puppetmasterd instances as you need. See one of the following: http://reductivelabs.com/trac/puppet/wiki/UsingMongrel http://reductivelabs.com/trac/puppet/wiki/UsingMongrelNgi

[Puppet Users] puppetdlog configuration parameter broken?

2010-02-02 Thread John Lyman
I am trying to log to a file instead of syslog, but when I set "puppetdlog = /var/log/puppetd.log", it still logs to syslog. If also set "syslogfacility =", it doesn't log anywhere. Does this work for anyone else? -- You received this message because you are subscribed to the Google Groups "Pu

[Puppet Users] Re: Patching Solaris with Puppet?

2010-02-02 Thread John Lyman
> I wouldn't mind seeing the facts. Me neither if possible. -- 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...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr

[Puppet Users] Re: puppetdlog configuration parameter broken?

2010-02-03 Thread John Lyman
> The latter case - if you set syslogfacility you don't get any log > output to syslog at all? Only if I set it to nothing (i.e. "syslogfacility =" with no value). This is probably expected behavior, but I thought that maybe the syslogfacility needed to be turned off for puppetdlog to work. -- Y

[Puppet Users] Re: qualified variables inside of a node definition?

2010-02-03 Thread John Lyman
> You could use stored configs and collect all the values for all the hosts on > all the hosts. This won't work in my case because I need the value from a host *before* the host actually has puppet installed and running. -- You received this message because you are subscribed to the Google Grou

[Puppet Users] Re: qualified variables inside of a node definition?

2010-02-03 Thread John Lyman
No need to apologize; thanks for the help. I'll look into extlookup. -- 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...@googlegroups.com. To unsubscribe from this group, send email to puppet-users

[Puppet Users] Re: Augeas type: Removing an entry from /etc/hosts

2010-02-22 Thread John Lyman
> ... I know this can be done with a simple exec of sed but ... Or with the "host" native type. See http://docs.reductivelabs.com/references/stable/type.html#host -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send ema

[Puppet Users] prevent tagmail reports when puppetd runs interactively

2010-02-24 Thread John Lyman
I would like to not get a tagmail report when "puppetd --test" is run. Is there a tag that is applied when puppetd is running daemonized vs. non-daemonized? I could just run "puppetd --test -no- report", but I don't want to rely on other users to remember to run it this way. I was hoping I could

[Puppet Users] Re: How to manipulate contents of directory without affecting parent directory

2010-04-01 Thread John Lyman
> file { "/foo/*":  mode => 700; } > > What comes close is: > file { "/foo": mode => 700, recurse => "true", recurselimit => 1; } I'm not sure if this will work (I've never tried to ignore the top level directory), but you can try: file { "/foo": mode => 700, recurse => "true", recurselimit => 1,

[Puppet Users] Re: Overriding a resource created in a define

2010-04-22 Thread John Lyman
Here's how I do it... In my nodes.pp, I define certain global variables at the top of the manifest, outside of any node definitions. If I want to override a default variable, I redefine the variable inside of the specific node definition, before I include the class that uses the variable. For ex

[Puppet Users] Re: OS Conditional exec.

2010-04-27 Thread John Lyman
> puppet really needs a downcase function. You can use an inline template: $lc_operatingsystem = inline_template("<%= operatingsystem.downcase - %>") -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-u

[Puppet Users] Re: variables in variable and class names

2010-05-07 Thread John Lyman
Does class hostconfig::mynewserver::settings contain just variables? You could do something like this (from http://groups.google.com/group/puppet-users/browse_thread/thread/5ba9d8b1ed4d4d1a/1214d616ef5caec0)... === In my nodes.pp, I define certain "default" variables at the top of the manifest, ou

[Puppet Users] Re: Breaking down variables (and setting new ones) from within a manifest using regular expressions

2010-05-07 Thread John Lyman
You probably want to use the regsubst function: http://docs.puppetlabs.com/references/stable/function.html#regsubst -- 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...@googlegroups.com. To unsubscrib

[Puppet Users] Re: temporarily editing sudoers

2010-05-07 Thread John Lyman
By using the schedule metaparameter, you could have puppet only check sudoers outside of the time period when you grant temporary access. This might not be feasible if the time period is constantly changing though. -- You received this message because you are subscribed to the Google Groups "Pup

[Puppet Users] Provider gem is not functional on this platform

2010-06-15 Thread John Lyman
I just upgraded from 0.25.2 to 0.25.5 and now I get this: ... debug: Prefetching gem resources for package debug: Puppet::Type::Package::ProviderGem: Executing ' list --local' warning: Could not match /usr/local/lib/ruby/gems/1.8/gems/ puppet-0.25.5/lib/puppet/util.rb:307: [BUG] rb_sys_fail() - err

[Puppet Users] Re: Provider gem is not functional on this platform

2010-06-16 Thread John Lyman
> maybe a $PATH issue? is the gem command in a standard location? Yes, that was it. Thanks for pointing out the obvious to me :) -- 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...@googlegroups.com

[Puppet Users] Re: Ability to deploy a "skeleton" directory

2010-06-26 Thread John Lyman
> - I'd like puppet to let user change some files in the skeleton as they > want, i.e. skip this directory if it just exists You should use "recurse => remote" to solve this issue. See http://projects.reductivelabs.com/issues/1469 and http://projects.reductivelabs.com/issues/1700 for more info. Y

[Puppet Users] Re: Managing some (but not all) user files

2010-07-02 Thread John Lyman
Use "recurse => remote". See this thread too: http://groups.google.com/group/puppet-users/browse_thread/thread/8eb0bc8a117924b8/e509c1ff40c25296. -- 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...

[Puppet Users] defrouter in zone resource

2010-07-19 Thread John Lyman
Does anyone know a way to set the defrouter when creating a zone on a solaris box? I'm guessing the the provider was written before the Solaris update that provided the new functionality. I've been getting around it with an exec (e.g. zonecfg -z my_zone "select net address=192.168.1.100 ; set def

[Puppet Users] Re: defrouter in zone resource

2010-07-20 Thread John Lyman
> Without noodling on it too long it would appear to be a job for exec > currently. Thanks for confirming. I created a feature request: http://projects.reductivelabs.com/issues/4296 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to th

[Puppet Users] Re: Design, syntax question for passing values from node.pp

2010-07-24 Thread John Lyman
You can pass the file name as a variable as long as you assign a value to the variable before you include the class. For example: class basenode { include postgresql include monit include wiki include apace } node 'freebeerontuesdays.com' { $monit_config = "/etc/monit/monitrc" include

[Puppet Users] can not boot zone

2010-07-28 Thread John Lyman
On Solaris 10 x86 u7 I get the following error when a zone resource is created: err: //Node[foo]/Zones::Instance[test]/Zone[test]/ensure: change from absent to running failed: Could not boot zone: Execution of '/usr/sbin/ zoneadm -z test boot' returned 1: zoneadm: zone 'test': These file- systems

[Puppet Users] Re: can not boot zone

2010-07-29 Thread John Lyman
Derek, I am using nested zfs filesystems: >zfs list -o name,zoned,mountpoint NAME ZONED MOUNTPOINT rootpool off /rootpool rootpool/ROOToff legacy rootpool/ROOT/s10x_u7off / rootpool/ROOT/s10x_u7/v

[Puppet Users] Re: Modules review

2010-08-19 Thread John Lyman
Instead of the case statements in init.pp, I do something like this: if defined("foo::$release") { include "foo::$release" } ... not necessarily a "quality enhancement," but it saves on the typing. On Aug 19, 7:04 am, Dennis Hoppe wrote: > Hello, > > i have written some modules for Puppet and w

[Puppet Users] Re: Frequent "Could not retrieve file metadata" errors

2010-08-19 Thread John Lyman
I was getting errors like this before I switched from webrick to nginx/ mongrel. -- 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...@googlegroups.com. To unsubscribe from this group, send email to p

[Puppet Users] can checksum be set to none on a file if content is defined?

2010-08-27 Thread John Lyman
On a file resource, if the content parameter is set and checksum is set to none, I am getting "Parameter content failed: Munging failed..." This appears to be a bug, but maybe I missed something in the documentation and it isn't supposed to work. cat test.pp file { "/tmp/foo": checksum =>

[Puppet Users] Re: can checksum be set to none on a file if content is defined?

2010-08-27 Thread John Lyman
e: > > > On Aug 27, 2010, at 7:07 AM, John Lyman wrote: > > > > On a file resource, if the content parameter is set and checksum is > > > set to none, I am getting "Parameter content failed: Munging > > > failed..." > > > > This appears t

Re: [Puppet Users] Using generate() to mine a shadow file hash

2012-06-25 Thread John Lyman
This would be fairly easy from cron by running 'puppet resource user root > some.pp'. It would be even better if your password manager could trigger the command to run only when the password has changed. On Monday, June 25, 2012 10:17:20 AM UTC-4, Rob B. wrote: > > I suppose I could use a cron

Re: [Puppet Users] Using generate() to mine a shadow file hash

2012-06-26 Thread John Lyman
It does for me, but I am running as root. Maybe that is the difference. Or maybe your user provider doesn't manage_passwords? On Monday, June 25, 2012 9:30:39 PM UTC-4, Rob B. wrote: > > Hey John, > > It doesnt give the password section. > -- You received this message because you are sub