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 yngui...@gmail.com

Re: [Puppet Users] Cron Bugs

2012-07-13 Thread Brian Gallew
Alternatively, you can buy a support contract and mandate that it be fixed. On Fri, Jul 13, 2012 at 5:56 AM, R.I.Pienaar r...@devco.net wrote: - Original Message - From: Felix Frank felix.fr...@alumni.tu-berlin.de To: puppet-users@googlegroups.com Sent: Friday, July 13, 2012

Re: [Puppet Users] The Puppet Way to handle slow resources? (newbie)

2012-07-11 Thread Brian Gallew
If I understand the OPs question correctly, he has an ordering problem: some services aren't waiting for other services to come online before starting themselves? If that's the case, you handle this with dependencies and chaining, e.g. service { fast_service: require =

Re: [Puppet Users] OT: Monitoring solutions

2012-06-25 Thread Brian Gallew
If you are thinking abou Nagios, Icinga, or Shinken, may I suggest you look at omdistro.org? They provide a single installable RPM/DEB (e.g. omd-0.54.rpm) which includes all three, plus 10 or so add-ins, all configured to work together, *plus* a nifty management tool that makes it super easy to

Re: [Puppet Users] Re: Reducing system load

2012-06-19 Thread Brian Gallew
There actually is a way to do this, though you may find it to be more painful to work with. Imagine, if you will, two environments: production and maintenance. The production environment is the one you're running right now, for production. It fully manages everything and ensures that your

Re: [Puppet Users] Re: how to refresh ssh/authorized_keys file content ?

2012-06-15 Thread Brian Gallew
ensure = absent is the standard syntax for all Puppet types. On Fri, Jun 15, 2012 at 6:21 AM, eduardo erodr...@gmail.com wrote: Having advised : 'it is highly recommended to migrate work from exec to native Puppet types as quickly as possible.' Is there any chance to purge keys ? Do

Re: [Puppet Users] can we avoid notify/subscribe firing on a mode change?

2012-06-15 Thread Brian Gallew
As has already been suggested, make the change yourself, submit a patch. You have indicated several times that this isn't that big a change. Further, it's a change that is clearly only of benefit to you at this point, so trying to convince others to do it for you is pointless. If you *really*

Re: [Puppet Users] can we avoid notify/subscribe firing on a mode change?

2012-06-14 Thread Brian Gallew
I certainly don't see any value there. You need to come up with a non-strawman argument. Configuration management is about consistency. Every system is like every other system to the extent that is possible. Where it is not possible, you describe that difference in the manifests such that it

Re: [Puppet Users] Re: Can Puppet detect if a user has changed a *.conf file and not do anything to that *.conf file?

2012-06-14 Thread Brian Gallew
I had exactly this situation: I wanted to manage application configuration, but developers wanted to be able to alter the configs as necessary, yet still revert to the real config when they wanted. It's a snap with a define{}: pre # We would like to both distribute configuration files as well as

Re: [Puppet Users] Adding files to file server on Puppet Master from a client

2012-06-12 Thread Brian Gallew
So, yeah, you're doing it wrong. Really, you probably want to be running something like archiva and have the clients install from there, but I'm going to guess that's not really possible for you. I presume that done by a script being run (puppetd -onetime) but it should be run on the client

Re: [Puppet Users] Nagios hostgroup collation

2012-06-12 Thread Brian Gallew
As one who has previously used Puppet to drive Nagios configurations (and attempted to contribute patches to Puppetlabs), allow me offer a somewhat fabulous alternative: check_mk. check_mk is a package that can be used to generate your Nagios configuration in a programmatic fashion. Here's how

Re: [Puppet Users] Re: Announce: PuppetDB 0.9.0 (first release) is available

2012-05-22 Thread Brian Gallew
I'm a long-term PostgreSQL fan, but MySQL has one feature that makes it a hands-down winner in our environment: trivial replication. I have puppetmasters in two different datacenters. Being able to have my dashboard see the status of systems in both datacenters makes it a lot more useful to the

Re: [Puppet Users] White list of packages

2012-05-01 Thread Brian Gallew
Rather than whitelisting packages, you probably want to build a severely cut-down repository and ensure it's the only one configured for your box. On May 1, 2012 1:40 PM, bainar andrew.r.b...@gmail.com wrote: Can anyone tell me if it is possible to explicitly specify the only allowed packages

Re: [Puppet Users] Re: Creating classes for individual nodes

2012-04-12 Thread Brian Gallew
I'm absolutely with John on this. As an example, for our JBoss application we need the configuration file to be different based on the the hostname (we only host one app per host/VM) and environment (dev/integration/qa/staging/production). Further, some dev boxes need to allow the developers to

Re: [Puppet Users] Re: Need puppet module for condition copy

2012-04-12 Thread Brian Gallew
Another alternative is to unconditionally copy the file to a staging director (e.g. /var/staging) and then have exec { conditional copy to path1: onlyif = test -d /opt/path1 command = rsync -a /var/staging/file.txt /opt/path1; conditional copy to path2: onlyif = test -d /opt/path2

Re: [Puppet Users] Re: Need puppet module for condition copy

2012-04-12 Thread Brian Gallew
, source = puppet://$puppetserver/modules/module_name/opt/xyz/file.txt, } } } Thanks, Jeeva On Thu, Apr 12, 2012 at 9:24 AM, Brian Gallew g...@gallew.org wrote: Another alternative is to unconditionally copy the file to a staging director (e.g. /var/staging) and then have exec { conditional

Re: [Puppet Users] Multiple Nagios Servers

2012-04-10 Thread Brian Gallew
Every host is trying to create an exported resource named foo-admins. That's not what you want. You want a *virtual* resource named foo-admins and then realize it on each node. On Tue, Apr 10, 2012 at 3:19 PM, Robert Smith rsmit...@gmail.com wrote: Hello, I've been trying to build multiple

Re: [Puppet Users] local vs global variables

2012-03-30 Thread Brian Gallew
I would imagine this has to do with the whole, you can't override variables thing that comes with a declarative language. Truly, if you want do to this you need to just change the variable names so they won't conflict with the facter values. This is the primary reason (IMO) that example42 use

Re: [Puppet Users] Upgrading puppet - upgrade O/S of puppet master but leave clients on older version?

2012-03-29 Thread Brian Gallew
On Thu, Mar 29, 2012 at 10:23 PM, Richard rich...@richii.co.uk wrote: Thanks Justin! If we go with the stepped approach, would the following work? Puppet Master running 2.6.x on RHEL 6.2, serving 2.5.x clients on RHEL 5? Do the different versions of Ruby come into play at all? You're not

Re: [Puppet Users] Suggestion - puppet preload stage?

2012-03-29 Thread Brian Gallew
I just did a 2.6.11 - 2.7.12 migration with Puppet updating Puppet. The only real hitch I ran into was my puppet masters would update themselves but somehow Apache/Passenger didn't get restarted, so I had to do that by hand. Since I didn't start putting any 2.7 features into my manifests until

Re: [Puppet Users] Upgrading puppet - upgrade O/S of puppet master but leave clients on older version?

2012-03-29 Thread Brian Gallew
...@richii.co.uk wrote: On Friday, 30 March 2012 06:43:17 UTC+1, Brian Gallew wrote: Thanks Justin! If we go with the stepped approach, would the following work? Puppet Master running 2.6.x on RHEL 6.2, serving 2.5.x clients on RHEL 5? Do the different versions of Ruby come into play

Re: [Puppet Users] Re: @@file tricks..

2012-03-05 Thread Brian Gallew
I do check_mk configuration and Netbackup work via this method. On Mon, Mar 5, 2012 at 1:57 PM, windowsrefund windowsref...@gmail.comwrote: This is exactly how I handle things. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this

Re: [Puppet Users] Re: Developers having access to deploy

2012-03-02 Thread Brian Gallew
I did up a nifty deployment engine using Jenkins. Give the devs/CM a form (e.g. silo, application versions, etc). It would figure out what it needed to deploy and then do so, complete with telling the Nagios system to disable checks while everything was going on. Foreman/Puppet could be the

Re: [Puppet Users] Re: Puppet Master VMs

2012-03-01 Thread Brian Gallew
Also, there are some known issues with certain Ruby builds that cause the puppet daemon to randomly hang. Sometimes it's best to have cron run your puppet jobs. On Thu, Mar 1, 2012 at 3:01 PM, Alexander Swen alex.s...@gmail.com wrote: Thanks Markus, that's a very usefull tip. will follow!

Re: [Puppet Users] Creating domain zone files

2012-02-28 Thread Brian Gallew
Allow me to offer a couple of alternatives: 1) If Puppet is not otherwise doing stuff with the domains, then stop trying to manage the bind configs purely with Puppet. Instead, have your configs in revision control (best practice) and have the puppet run do an update/reload (e.g. have the exec

Re: [Puppet Users] Questions regarding Puppet with httpd.conf

2012-02-08 Thread Brian Gallew
Further, you should remember that there is no reason for an Apache configuration to be monolithic. Apache is perfectly happy to have a bunch of files to include. Throw in a naming convention (e.g. files named foo.ssl will be included by my SSL config file) and you've got some real flexibility.

Re: [Puppet Users] puppetd hanging on some nodes

2012-02-07 Thread Brian Gallew
If you are like me, the problem is that the ruby for your platform sucks. The webstack ruby 1.8.7 for Solaris 10 has a nasty tendency to hang (for the daemons) and core dump for individual runs. Individual runs out of a crontab are the most reliable way I've found to make it all work. On Tue,

Re: [Puppet Users] Puppet Triage-A-Thon

2012-01-10 Thread Brian Gallew
Does this mean that the tickets which are just awaiting merge (including all the relevant unit tests) will get done some day soon? On Jan 9, 2012, at 11:36 PM, James Turnbull wrote: Love Puppet? Hate the backlog of tickets? Want to help us out? The Puppet community has grown really fast and a

Re: [Puppet Users] Puppet Triage-A-Thon

2012-01-10 Thread Brian Gallew
will try and get it bumped up in priority. Daniel On Tue, Jan 10, 2012 at 10:06, Brian Gallew g...@gallew.org wrote: Does this mean that the tickets which are just awaiting merge (including all the relevant unit tests) will get done some day soon? On Jan 9, 2012, at 11:36 PM, James Turnbull

Re: [Puppet Users] Puppet Dashboard and Ruby 1.8.7 for EL5 systems HOWTO (draft)

2012-01-04 Thread Brian Gallew
Very nice write-up, Jo. Thanks. On Wed, Jan 4, 2012 at 5:04 PM, Jo Rhett jrh...@netconsonance.com wrote: NOTE: this is a draft document, just because there are some things here that I'd really like to improve. Please let me know if you have a better way to do these things. There's also a

Re: [Puppet Users] Re: Is puppet right for us?

2011-12-08 Thread Brian Gallew
Let me emphasize the beauty of running Puppet out of cron. Not only do you not end up with resource leaks (or just simple consumption when you don't need it), but you also get much more reliable load on your puppet masters. Further, if you are wiling to make a trivial effort to write a

Re: [Puppet Users] Re: Is it possible to get a list of all nodes in your manifests and all classes assigned to those nodes programatically in Ruby?

2011-11-21 Thread Brian Gallew
This is (almost) trivial. First, create a fact that turns /var/lib/puppet/state/classes.txt into an array. Then extract that fact from the storedconfigs DB programmatically. Admittedly, this won't get all defined nodes, as that is somewhat meaningless since nodes can be default or regular

Re: [Puppet Users] Publicly accessible server?

2011-10-20 Thread Brian Gallew
In theory, as long as you are NOT auto-signing certificate requests, this is exactly what the puppet server was designed for. However, you should note that the server is likely to suffer lots of random probing and may be susceptible to performance problems. On Oct 20, 2011, at 3:13 PM, Jon

Re: [Puppet Users] Re: Official puppetlabs position on cron vs puppet as a service?

2011-10-10 Thread Brian Gallew
Most of my puppet runs take ~15 seconds or so, however my Nagios servers take up to 4 minutes to complete. On Mon, Oct 10, 2011 at 7:00 AM, Chris Phillips ch...@untrepid.com wrote: On 10 October 2011 13:05, Jonathan Gazeley jonathan.gaze...@bristol.ac.uk wrote: On 08/10/11 21:22, Chris

Re: [Puppet Users] Hostname fact doesn't handle hostnames with periods

2011-09-30 Thread Brian Gallew
ALso, let's not forget that all the world is *not* linux. hostname -s doesn't do what you think it does when it's not the GNU toolset. On Sep 29, 2011, at 9:13 PM, Doug Balmer wrote: Our concept of 'hostname' as a fact is equivalent to hostname -s up until now - it doesn't mean the result of

Re: [Puppet Users] Naginator and Puppet on different hosts

2011-09-29 Thread Brian Gallew
So, I have all the nodes export their Nagios stuff, and all my Nagios hosts then collect what they need (via tagging). The only tricks I used were to override the file locations so that everything actually gets put into a test directory, and then have an exec kicked by changes which runs a

Re: [Puppet Users] Re: Hostname fact doesn't handle hostnames with periods

2011-09-29 Thread Brian Gallew
Technically, a hostname may not legally contain a dot. A fully qualified domain name, OTOH, pretty much has to have (at least) one dot. On Thu, Sep 29, 2011 at 10:59 AM, Sans r.santanu@gmail.com wrote: Is it really a good idea to have a period/dot in the hostname? Although I do agree it

Re: [Puppet Users] Re: Official puppetlabs position on cron vs puppet as a service?

2011-09-26 Thread Brian Gallew
I ended up writing a custom rand_fqdn function based heavily off the standard rand_fqdn. In my environment, we have a lot of related system (e.g. webs001, webs002, webs003), many of which have significant startup times. I changed the function to split an incoming hostname into a name+numeric

Re: [Puppet Users] Cross-nodes modules: howto?

2011-09-06 Thread Brian Gallew
I do this with a define. In my case, I define a web application and pass in several arrays of hosts. This expands, in turn, to a series of if statements that check to see which array (if any) $hostname is in and then sets appropriate variables. I use this to generate Nagios hostgroups, assign

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

2011-09-01 Thread Brian Gallew
On Sep 1, 2011, at 2:01 PM, Douglas Garstang wrote: Editing files locally under /etc/puppet as an individual user is not mutually exclusive with editing files in a distributed working copy owned by the same user. If it's not, then there's no point in asking for help: your environment is

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

2011-08-08 Thread Brian Gallew
String interpolation in the Puppet DSL is strictly variable-string, and does not handle arrays. For what you want, use inline_template(tomcat-%= $config['tomcat_version_server'] %) On Aug 8, 2011, at 11:19 AM, Douglas Garstang wrote: I've got this: file {

[Puppet Users] Templates and self-knowledge

2011-07-20 Thread Brian Gallew
So, I'm into templating. I *like* templating. What I *don't* like, of course, is to have to use multiple, similar templates for different output files. So, let's work a concrete example. Suppose I have a template standard_profile.erb which looks like this: install_typeinitial_install

Re: [Puppet Users] puppet terminating - continually forcing itself to stop

2011-07-05 Thread Brian Gallew
I was seeing the behavior on my Solaris boxes when running Puppet under SMF. The issue, in my case, was that I was trying to work around an SMF bug. My workaround was to svcadm disable puppetd;svccfg import /var/svc/manifest/network/puppetd.xml;svcadm enable puppet. The astute viewer will

Re: [Puppet Users] Deployed but unmanaged file

2011-06-29 Thread Brian Gallew
On Jun 29, 2011, at 9:05 AM, Nigel Kersten wrote: I've long wanted the equivalent of a conffile in Puppet. e.g. replace this file if it's still the same as the one Puppet put down, but if it's been modified from the default, don't replace it I've wanted this in the past for things like a

Re: [Puppet Users] Puppet managed hosts in multiple nagios hostgroups

2011-06-08 Thread Brian Gallew
I solved this in a similar manner. I wrote a custom fact (which essentially returned /var/lib/puppet/state/classes.txt) and then a custom function that generated a list of hostgroups based on that. On Wed, Jun 8, 2011 at 6:47 AM, Chris Phillips ch...@untrepid.com wrote: On 8 June 2011 13:30,

Re: [Puppet Users] Re: Virtual resources and hashes

2011-06-08 Thread Brian Gallew
On Jun 8, 2011, at 8:45 AM, Aaron Grewell wrote: Here's the thing though: since arrays are the only native method of looping, Puppet needs to handle arrays of all native types well. If it doesn't, from an end-user perspective that's broken. See, there's the crux of the issue: arrays are

Re: [Puppet Users] Re: How do you handle deleted nodes with exported resources in this situation?

2011-06-08 Thread Brian Gallew
On Jun 8, 2011, at 8:50 AM, jcbollinger wrote: On Jun 7, 11:12 am, Stefan Schulte stefan.schu...@taunusstein.net wrote: You can download the puppet sources. In the ext Directory you'll find a script »puppetstoredconfigclean.rb NODE_TO_BE_REMOVED«. AFAIK the script will set the ensure

Re: [Puppet Users] Distributed Puppet Architecture and Management

2011-04-23 Thread Brian Gallew
It depends on two things: your CA and the content of auth.conf. If you have one CA signing all your certificates, then every host can validate the cert on every master. If that's the case, then any host with the correct permissions in auth.conf can issue the puppet kick command. If you have

Re: [Puppet Users] Templating question

2011-04-15 Thread Brian Gallew
That would undoubtedly have been a neater solution. I may well switch to using that. Thanks! On Fri, Apr 15, 2011 at 1:48 AM, Felix Frank felix.fr...@alumni.tu-berlin.de wrote: On 04/13/2011 04:24 AM, Ben Hughes wrote: On Tue, Apr 12, 2011 at 07:20:24PM -0700, Brian Gallew wrote: I

Re: [Puppet Users] What do you use import for?

2011-04-14 Thread Brian Gallew
I use it to include files which, for whatever reason, won't be auto-imported. Specifically, I use it to includes my nodes.pp and defines.pp files, since neither of them define any classes, and I want my defines all in one place, usable anywhere. On Apr 14, 2011, at 11:05 AM, Randall Hansen

Re: [Puppet Users] extlookup == bad?

2011-04-12 Thread Brian Gallew
On Tue, Apr 12, 2011 at 12:54 AM, R.I.Pienaar r...@devco.net wrote: The PDL is a *much* more desirable solution than either layered classes or extlookup, why it has gone un-implemented I dont know and why the current suggestion is that layered classes somehow represents an effective

[Puppet Users] Templating question

2011-04-12 Thread Brian Gallew
OK, I'm trying to do something (apparently) stupid. Here's the relevant fragment of my manifest: /jumpstart/Begin/rootmirror.beg: require = File[/jumpstart/Begin], content = template(jumpstart/standard.beg.erb); /jumpstart/Begin/standard.beg: require =

Re: [Puppet Users] Templating question

2011-04-12 Thread Brian Gallew
On Tue, Apr 12, 2011 at 6:39 PM, Ben Hughes b...@puppetlabs.com wrote: Sadly, my introspection-fu seems to be lacking and I'm unable to figure it out. Any help? Not easily. The only way I was able to find mention of it at all was with the horrible voodoo of a template of: %= require 'pp'

Re: [Puppet Users] Re: how puppet client update the files only when the flles from puppet server are new?

2011-03-30 Thread Brian Gallew
I think the fundamental problem here is that you see a particular piece of metadata in your mind (this version of the file is the previous version) which does not, in fact, exist. Since good practices dictate that your Puppet manifests, files, and templates are all in some form of version

Re: [Puppet Users] Re: parameterized classes and variable inheritance

2011-03-21 Thread Brian Gallew
On Mar 21, 2011, at 1:39 PM, jcbollinger wrote: On Mar 21, 3:15 pm, Brian Gallew g...@gallew.org wrote: It has occurred to me that another way of doing this would be to use defines define kludge($sudo_add_rule=undef) { node { ${name}: class {sudoers: additional_rules

Re: [Puppet Users] templates for user resources types

2011-03-15 Thread Brian Gallew
On Mon, Mar 14, 2011 at 11:07 AM, VinceT vgtalus...@gmail.com wrote: class passwd { user { root: ensure = present, comment = template(passwd/passwd.root.user.erb), } passwd.root.user.erb contains: Root user on %= hostname % For such a simple substitution,

Re: [Puppet Users] How to get the result of a command in puppet?

2011-03-15 Thread Brian Gallew
On Mon, Mar 14, 2011 at 8:12 AM, duff etienne.dufr...@googlemail.comwrote: Hello, I am trying to export the latest tag of an svn repository to a puppet client. To do so, I would like to run the following command to get the latest tag /usr/bin/svn ls http://url_to_my_svn_repository/tags |

Re: [Puppet Users] How to get the result of a command in puppet?

2011-03-15 Thread Brian Gallew
In that case I've got nothing. Sorry. On Mar 15, 2011, at 6:37 AM, duff wrote: Hi Brian The problem isn't the lack of output from the puppet custom function. I have written some that return results. I used puts statements in the example to show the absence of result from the %x[]

Re: [Puppet Users] Deduplication (was: Why is it so hard to make a sane nagios server config?)

2011-03-11 Thread Brian Gallew
A cons cell isn't actually that hard to produce in Puppet: you can use a hash. Each key is the member of the cell you want to keep, while the value is a throwaway. But. Puppet's non-determinate evaluation order is pretty much guaranteed to bite you in the butt. You can really only get the full

Re: [Puppet Users] Deduplication (was: Why is it so hard to make a sane nagios server config?)

2011-03-11 Thread Brian Gallew
On Mar 11, 2011, at 7:52 AM, Nick Moffitt wrote: I'm not sure what you mean by deduplicating. Puppet won't let you have duplicate *anything*, exported or not. If you mean filtering, that's doable, but any non-trivial filtering rule will require to you write evil Puppet functions that hook

Re: [Puppet Users] How can I dynamically realize this?

2011-03-10 Thread Brian Gallew
The short answer is: it sucks to be you. The longer answer is that variables are really rvalues: they are something that you can read and test, but they are not function calls or otherwise subject to evaluation. When you write Cron | tag == a | in your manifest, you are evaluating an ==

Re: [Puppet Users] Nagios configuration arrays

2011-03-02 Thread Brian Gallew
Sadly, signs point to no. On Wed, Mar 2, 2011 at 5:15 AM, Martijn Grendelman mart...@iphion.nlwrote: Hi, A question for the devs. Will this: http://projects.puppetlabs.com/issues/4020 make it into a release any time soon? Best regards, Martijn. -- You received this message because

Re: [Puppet Users] Nagios configuration arrays

2011-03-02 Thread Brian Gallew
, default = host-generic-template }, host-pnp-template ], } On Mar 2, 2011, at 6:55 AM, Martijn Grendelman wrote: On 02-03-11 14:49, Brian Gallew wrote: Sadly, signs point to no. Too bad. But since I run a patched

Re: [Puppet Users] Nagios configuration arrays

2011-03-02 Thread Brian Gallew
-02 09:55 AM, Martijn Grendelman wrote: On 02-03-11 14:49, Brian Gallew wrote: Sadly, signs point to no. Too bad. But since I run a patched Puppetmaster anyway, I can do what I want :-) Unfortunately, it doesn't solve my problem. I am trying to do the same thing as Gabriel Filion

Re: [Puppet Users] Where to put External Nodes in Multiple Environments?

2011-02-28 Thread Brian Gallew
Doug, there's a command-line tool called ack which is an enhanced grep replacement. It will probably do what you wat with finding your nodes. On Mon, Feb 28, 2011 at 4:43 PM, Douglas Garstang doug.garst...@gmail.comwrote: On Mon, Feb 28, 2011 at 1:17 PM, Alan Barrett a...@cequrux.com wrote:

Re: [Puppet Users] Re: Config Deployment: baseline manifest to all hosts, different sudoers,autofs..etc(manifest) to hosts, by hostname?

2011-02-25 Thread Brian Gallew
For the way you are doing thing, the easiest answer is: use templates. Here is an example from my sshd_config.erb file that may be of use to you: - CUT HERE - pps = cprt_classes.split(',') rescue [] my_login_groups = ['root', 'wheel', 'sysadmin']

Re: [Puppet Users] provisioning bare metal (best practices)

2011-02-22 Thread Brian Gallew
Never forget the DHCP does NOT necessarily mean dynamic addresses. Depending upon your corporate culture, it may be perfectly acceptable for DHCP to hand out statically assigned addresses to your hosts. This would allow your build process to be easy, and you can have the host never DHCP again

Re: [Puppet Users] String size limit for variables?

2011-02-18 Thread Brian Gallew
Yeah, fire up MySQL and alter the column to be of type TEXT instead of VARCHAR(255). I ran into the same problem. I believe the column you are looking for is fact_values.value. On Feb 18, 2011, at 12:26 PM, Mark Stanislav wrote: So I had been smashing my head against a wall, unsure why I

Re: [Puppet Users] Multiple external commands with puppet

2011-02-03 Thread Brian Gallew
While it's perfectly appropriate to have multiple exec{} or a single exec{} with a multi-line command in your puppet manifest, once you reach a certain level of complexity you almost invariably want to switch to a file{/usr/local/scripts: ...} exec{/usr/local/scripts/doit: ...} model. The

Re: [Puppet Users] Re: Ordering

2011-02-03 Thread Brian Gallew
Add a fact that's derived from parsing /var/lib/puppet/state/classes.txt. It will be exactly one run behind, but it will have the complete list of classes as of the previous run and it's reliable. On Feb 3, 2011, at 9:58 AM, Richard Crowley wrote: On Thursday, February 3, 2011 at 9:53 AM,

Re: [Puppet Users] Re: Ordering

2011-02-03 Thread Brian Gallew
On Feb 3, 2011, at 10:22 AM, Adam Gibbins wrote: On 3 February 2011 18:14, Brian Gallew g...@gallew.org wrote: Add a fact that's derived from parsing /var/lib/puppet/state/classes.txt. It will be exactly one run behind, but it will have the complete list of classes as of the previous run

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

2011-02-02 Thread Brian Gallew
On Feb 2, 2011, at 4:57 PM, John Warburton wrote: I would love to see that in http://docs.puppetlabs.com/guides/templating.html in the Access to defined tags and classes section. I have created a ticket for that -https://projects.puppetlabs.com/issues/6124 Sadly, there's also a great need

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

2011-02-02 Thread Brian Gallew
, or is there a method to it? On Feb 2, 5:18 pm, Brian Gallew g...@gallew.org wrote: On Feb 2, 2011, at 4:57 PM, John Warburton wrote: I would love to see that inhttp:// docs.puppetlabs.com/guides/templating.htmlinthe Access to defined tags and classes section. I have created

Re: [Puppet Users] Re: Puppet 2.6 on Solaris

2011-01-31 Thread Brian Gallew
Interestingly enough, it's pretty easy to make a Solaris package. More than that, it may well be necessary that you do so since your package would depend on Ruby, which could be in one of several places, and your own organization's policies on where addons go might differ from someone else's.

Re: [Puppet Users] RE: each clients classes.txt on the server

2011-01-31 Thread Brian Gallew
save me some time as I am not a ruby developer. From: puppet-users@googlegroups.com [mailto:puppet-users@googlegroups.com] On Behalf Of Brian Gallew Sent: Thursday, January 27, 2011 9:08 PM To: puppet-users@googlegroups.com Subject: Re: [Puppet Users] RE: each clients classes.txt on the server

Re: [Puppet Users] How to deal with a slightly changing file?

2011-01-27 Thread Brian Gallew
Not really. There are a couple ways to handle this: 1) Make use of includes. Have the puppet-managed file include the app-managed file. Of course, this requires the app to be friendly to this kind of setup. 2) Add replace=false so that Puppet will create the file but never update it if it

Re: [Puppet Users] How to deal with a slightly changing file?

2011-01-27 Thread Brian Gallew
Not really. There are a couple ways to handle this: 1) Make use of includes. Have the puppet-managed file include the app-managed file. Of course, this requires the app to be friendly to this kind of setup. 2) Add replace=false so that Puppet will create the file but never update it if it

Re: [Puppet Users] How to deal with a slightly changing file?

2011-01-27 Thread Brian Gallew
it if it exists. Of course, that breaks when you have updates that you really do need puppet to apply. When I need to force the update, I would simply comment out the 'replace for one run? is there a better way? Mohamed. On Thu, Jan 27, 2011 at 12:00 PM, Brian Gallew g...@gallew.org

Re: [Puppet Users] RE: each clients classes.txt on the server

2011-01-27 Thread Brian Gallew
Interestingly enough, I wrote a custom fact to do that. In my case, I have and sshd_config.erb where I want to set the AllowGroups stanza based on all the classes applied to a node. With 2.6.1 I could achieve that effect simply by moving adding a class to the post stage (which is run after main)

Re: [Puppet Users] Get resource from http

2011-01-05 Thread Brian Gallew
You are not authorized to access this page. On Wed, Jan 5, 2011 at 12:07 PM, Daniel Pittman dan...@rimspace.net wrote: ...ideally, that answer should be for now, because every second person seems to want this feature. Which will be helped if someone filed a feature request. So, um, I did:

Re: [Puppet Users] Multiple AllowGroups entries in sshd_config with Puppet and Augeas

2010-12-23 Thread Brian Gallew
So, once again usability is sacrificed in favor of purity. If you are using Puppet 2.6.1, you can move evaluation of the sshd_config.erb template to a post stage, and then generate your AllowGroups stanza from the class list (which will be complete). Here's an excerpt from my sshd_config.erb

Re: [Puppet Users] foreman issue

2010-12-21 Thread Brian Gallew
Foreman's report agent, for some reason, doesn't update as many of the Foreman DB fields as one might wish. I submitted a patch on this, but as Mark pointed out, the approved way to do this is to run a rake periodically to re-import all of the reports and/or classes. If you are interested in

Re: [Puppet Users] Re: Recent (unfun) experience with cron resource on Solaris 10 with puppet 0.25.5

2010-12-21 Thread Brian Gallew
In general, cron != vixie-cron. It turns out that most of the Unix world pre-dates Linux and for various reasons (not the least of which are legal issues, branding, and in-product compatibility) it is generally *extremely* poor form to assume Linux-isms. Clearly, the cron provider should be

Re: [Puppet Users] easy to way to track clients checking in?

2010-11-29 Thread Brian Gallew
Personally, I like Foreman for doing that, especially once I've patched it to make certain Foreman-specific variables set by the report processor. In theory Dashboard will do the same thing, though I've never been able to get it to work reliably (incompatible gem set). And of course, there's

[Puppet Users] 2.6.3 differs in behavior from 2.6.1

2010-11-29 Thread Brian Gallew
Before I go and write yet another custom fact, I just want to be sure that the behavior I'm seeing is as designed rather than a regression. When I ran 2.6.1, I had the following snippets working as expected: base/manifests/minimal.pp: class {ssh::sshd_config: stage = post}

Re: [Puppet Users] Monitor puppet runs on clients with nagios

2010-11-17 Thread Brian Gallew
I've been thinking about this myself, and I've come up with a few possibilities. 1) Leverage the reports on the puppet master. This could be done with a daemon that watched /var/lib/puppet/reports, for instance. 2) Leverage the reports on the puppet clients. Each puppet run could ship the

Re: [Puppet Users] Making edits to /etc/system on Solaris

2010-09-13 Thread Brian Gallew
I've basically ended up with one /etc/system to rule them all (and in the darkness bind them?). Fortunately for me, my systems are large enough to support this and there have been no conflicting requirements. I'm sure I'm losing some tiny bit of performance and memory, but I really can't work up

Re: [Puppet Users] Spaces in templates

2010-09-10 Thread Brian Gallew
Is there any reason why you don't just do it the easy way? host %= users_ldap_servers.join( ) % On Fri, Sep 10, 2010 at 5:50 AM, Al @ Lab42 lab42...@gmail.com wrote: Hi all, I've a silly problem that it's driving me crazy and I'm almost sure the solution is quick and easy. Still it doesn't

Re: [Puppet Users] Re: Cross definition dependancies.

2010-09-06 Thread Brian Gallew
There are two standard answers for conflicting items like this. 1) Break out the conflicting items into their own class/definition. 2) Learn to love virtual resources and realize them as necessary. On Mon, Sep 6, 2010 at 12:30 PM, Douglas Garstang doug.garst...@gmail.comwrote: On Mon, Sep 6,

Re: [Puppet Users] Using service with a specific user

2010-08-30 Thread Brian Gallew
The way you make the service start/stop by a specific user is to make sure the OS-standard start/stop script do su/sudo at the correct point. On Mon, Aug 30, 2010 at 6:43 AM, Daniel Pittman dan...@rimspace.net wrote: Matt matthieu.nant...@gmail.com writes: I would like to use the type

Re: [Puppet Users] Re: Centralised Graphing?

2010-08-26 Thread Brian Gallew
If you have shared storage, it's pretty trivial to collect all the relationship files. If not, you might consider the simple expedient of scp or curl in an exec{} to get them where you want them. On Thu, Aug 26, 2010 at 12:47 AM, Matt Wallace li...@truthisfreedom.org.ukwrote: On Wednesday 25

Re: [Puppet Users] puppet and cpan

2010-08-16 Thread Brian Gallew
I have to agree with Daniel on this one. While it's annoying to build Solaris (in my case) packages for every CPAN package you want to install, then end result is that I can control the installed version *precisely*. While it may never have been a problem for you, I've been bitten more than once

Re: [Puppet Users] puppet and cpan

2010-08-16 Thread Brian Gallew
Sorry, when you use Gmail you end up top-posting whether you like it or not. On Mon, Aug 16, 2010 at 8:45 PM, Daniel Pittman dan...@rimspace.net wrote: Brian Gallew g...@gallew.org writes: It is always nice if y'all follow the existing quoting style in mails; it makes it much less confusing

Re: [Puppet Users] Recipes release management : separate test and prod

2010-07-05 Thread Brian Gallew
First of all, if your sysadmins aren't advocates of version control (even more so than your developers), fire them now, Now, NOW. Or at least hire a competent senior sysadmin to train them properly. Back to the topic at hand. We have only two environment (production and development). Since the

[Puppet Users] Overriding user attributes

2010-06-14 Thread Brian Gallew
I've got a generic user java that owns Java applications. Due to circumstances beyond my control, I cannot dictate a change here, so I need to make Puppet work with the infrastructure on hand. The big problem, though, is that java's home directory varies with the application that's being run.

Re: [Puppet Users] Re: Overriding user attributes

2010-06-14 Thread Brian Gallew
Thanks. I'll try that when I get in to the office tomorrow. On Mon, Jun 14, 2010 at 4:00 PM, donavan dona...@desinc.net wrote: On Jun 14, 1:14 pm, Brian Gallew g...@gallew.org wrote: class jboss { include users User[java]{home = /home/app1 realize(User[java])} where java

[Puppet Users] Have I found a bug with variables in nodes?

2010-05-11 Thread Brian Gallew
(vastly trimmed code) *manifests/site.pp:* import base *module/base/manifests/init.pp*: import baselines/*.pp import infrastructures/*.pp import nodes.pp *nodes.pp: *node 'pslave1' inherits rnc { notice($my_puppet_master) } *infrastructures/geographical.pp:* node rnc inherits basenode {

Re: [Puppet Users] Have I found a bug with variables in nodes?

2010-05-11 Thread Brian Gallew
fundamentally broken as to make node inheritance completely useless, in which case node inheritance should be pulled. On Tue, May 11, 2010 at 7:58 AM, Joe McDonagh joseph.e.mcdon...@gmail.comwrote: On 05/11/2010 02:11 AM, Brian Gallew wrote: (vastly trimmed code) *manifests/site.pp:* import base

Re: [Puppet Users] Have I found a bug with variables in nodes?

2010-05-11 Thread Brian Gallew
there I need, you know, basic functionality. On Tue, May 11, 2010 at 3:31 PM, Dan Bode d...@puppetlabs.com wrote: On Tue, May 11, 2010 at 3:27 PM, Nigel Kersten nig...@google.com wrote: On Tue, May 11, 2010 at 3:19 PM, R.I.Pienaar r...@devco.net wrote: - Brian Gallew g...@gallew.org wrote

Re: [Puppet Users] scaling up puppetmasterd by cloning puppetmasterd

2010-04-22 Thread Brian Gallew
I would have thought that, instead of rsyncing the new machine, you'd have used Puppet to deploy it as a Puppet master. I'm curious as to why you went this route? On Thu, Apr 22, 2010 at 12:22 AM, Nicolas Szalay nsza...@qualigaz.comwrote: - Brian Lam brianc...@gmail.com a écrit : | I

  1   2   >