[Puppet Users] exec a command if return value from exec'ing another command is non-zero

2010-10-04 Thread Aaron
Hi puppet experts, I'm pretty new to puppet and am having some trouble finding the right way to specify the functionality I need. Specifically, lets say I have a command to create some key/value pair: myCommand -create "key" "value" And I have a second command to list key/value pairs: myComman

[Puppet Users] Re: exec a command if return value from exec'ing another command is non-zero

2010-10-04 Thread Aaron
Sorry for wasting anyones time, just found the "onlyif" parameter. On Oct 4, 5:11 pm, Aaron wrote: > Hi puppet experts, > > I'm pretty new to puppet and am having some trouble finding the right > way to specify the functionality I need. > > Specifically, lets sa

Re: [Puppet Users] Re: All Hosts Shown as Unresponsive. Worker Restart Fails. Clients Seem Happy?

2015-10-19 Thread Aaron
So, I just ran into this after my VM ran out of space. I removed all of the reports from /var/lib/puppet/reports# to free up space and then restarted the server. After the restart, I could run the following $ sudo service apache2 start * Starting web server apache2 [ OK ] $ sudo service puppetm

[Puppet Users] powershell detect then install nonexistent or replace existing custom service

2015-10-30 Thread Aaron
I have a question and hopefully someone can help me resolve it - In windows, I have custom services that I need to manage. I've been running this code for a while, and it works well for several custom Windows services, but the problem is I cannot run it on a bare server without manual interve

Re: [Puppet Users] powershell detect then install nonexistent or replace existing custom service

2015-11-04 Thread Aaron
Services\Win\FooServiceConsumerSvc\FooService.exe"', provider=> powershell, refreshonly => true, } } On Tuesday, November 3, 2015 at 10:44:03 AM UTC-5, Rob Reynolds wrote: > > > > On Fri, Oct 30, 2015 at 8:50 AM, Aaron > > wrote: > >> I h

Re: [Puppet Users] powershell detect then install nonexistent or replace existing custom service

2015-11-04 Thread Aaron
not being able to uninstall first? this is the step I can't seem to figure out. Aaron On Wednesday, November 4, 2015 at 2:58:46 PM UTC-5, Aaron wrote: > > Thanks Rob! > > This appears to work well after looking into your suggestions...I tried to > include an "unless&quo

Re: [Puppet Users] Re: Display correctly any array

2012-01-17 Thread Aaron Grewell
As long as we're lacking a builtin method for pretty-printing data structures during a debug session inline templates are going to continue to be popular in scenarios like this. On Tue, Jan 17, 2012 at 10:06 AM, Krzysztof Wilczynski wrote: > Hi Felix, > >> Seeing as this has not been mentioned in

Re: [Puppet Users] Re: Display correctly any array

2012-01-17 Thread Aaron Grewell
This (or something like it) should be a candidate for stdlib. On Tue, Jan 17, 2012 at 10:47 AM, Krzysztof Wilczynski wrote: > Hi Aaron, > >> As long as we're lacking a builtin method for pretty-printing data >> structures during a debug session inline templates are goi

Re: [Puppet Users] Re: RFC: Deprecate defined() function for Telly.

2012-01-20 Thread Aaron Grewell
On Fri, Jan 20, 2012 at 2:34 PM, Cody wrote: > Defining all somewhat common packages in a central location becomes > unrealistic when you no longer "control" the code that is in every > module you use.  If you obtain five modules from the forge and they > all require a specific package and so all

Re: [Puppet Users] Re: RFC: Deprecate defined() function for Telly.

2012-01-20 Thread Aaron Grewell
On Fri, Jan 20, 2012 at 2:49 PM, Aaron Grewell wrote: > > Are we sure it can't be fixed?  What makes defined() so different from > the code that implements require?  Shouldn't "if  not defined" be the > same as "if a require would fail"?  That seems to be

Re: [Puppet Users] Cross-module (package) dependencies

2012-01-24 Thread Aaron Grewell
I was thinking more in terms of an exception handler: package { "foo": ensure => installed, exceptDefined => skip} Or something of that nature. This could also be used in other situations where you want to bypass default behaviors. We've seen situations where users want to apply a file if it ex

Re: [Puppet Users] Error at the end of a puppet agent run...

2012-01-24 Thread Aaron Grewell
If you didn't specifically configure Puppet to use Passenger then you're using Mongrel by default. Scalability => false. On Tue, Jan 24, 2012 at 8:24 AM, Peter Berghold wrote: > > > On Sun, Jan 22, 2012 at 7:54 PM, Stefan Schulte > wrote: >> >> >> What version of puppet are you using on the age

Re: [Puppet Users] Error at the end of a puppet agent run...

2012-01-24 Thread Aaron Grewell
Depending on your hardware and ruleset a dozen might be more than Mongrel will handle. On Tue, Jan 24, 2012 at 11:32 AM, Peter Berghold wrote: > Aaron, > > What does scalability have to do with this case?  There are maybe a dozen > systems being managed in this case (soon will be m

Re: [Puppet Users] Re: Mining hash field out of the /etc/shadow shadow file

2012-01-29 Thread Aaron Grewell
Since it's the shell redirection that Puppet seems not to like, why not wrap the commands in a shell script and use generate on that? On Jan 29, 2012 6:18 PM, "Olivier" wrote: > and then lookup the hash in the /etc/shadow file > > or use the mkpasswd utility (with which I am not familiar) > > >

Re: [Puppet Users] Puppet can't start service (dropbox) but init.d command works manually

2012-01-31 Thread Aaron Grewell
> However, if I run the above command manually, it works fine and > returns 0: > > root@webhost:~# /etc/init.d/dropbox start ; echo $? > Starting dropbox... > 0 > > Any ideas why puppet can't start the dropbox daemon? I had the same problem when running ssh-keygen via an exec. It ran fine from

Re: [Puppet Users] What is the fully-qualified variable name format for external and factors variable in template erb file?

2012-02-06 Thread Aaron Grewell
There's a couple of ways to do this, but I usually take the easy route: assign a local variable that has the global's value in the related manifest. In this case, in centrifydc's init.pp just set $domain=$::domain. This will appear as a local variable in the template and you don't have to change

[Puppet Users] Strange behavior by service

2012-02-08 Thread Aaron Grewell
I've got a bit of a head-scratcher here, though I'm sure it must be something small. I'm trying to enable a service for next boot without starting it. That usually "just works" but for some reason this time around it isn't. The node keeps trying to start the service which will always fail becaus

Re: [Puppet Users] Strange behavior by service

2012-02-08 Thread Aaron Grewell
On 02/08/2012 04:11 PM, Daniel Pittman wrote: > You can't: if you tell Puppet to ensure the service is running, it > will try to start it every time it finds it "out of compliance". > Look at the code. I didn't ensure => running. I set enable => true. AFAIK that doesn't mean 'start the service'

Re: [Puppet Users] Strange behavior by service

2012-02-08 Thread Aaron Grewell
On 02/08/2012 04:29 PM, Daniel Pittman wrote: > On Wed, Feb 8, 2012 at 16:13, Aaron Grewell wrote: >> On 02/08/2012 04:11 PM, Daniel Pittman wrote: >>> You can't: if you tell Puppet to ensure the service is running, it >>> will try to start it every tim

Re: [Puppet Users] Re: Strange behavior by service

2012-02-09 Thread Aaron Grewell
On 02/09/2012 06:16 AM, jcbollinger wrote: > > > On Feb 8, 5:34 pm, Aaron Grewell wrote: >> I've got a bit of a head-scratcher here, though I'm sure it must be >> something small. I'm trying to enable a service for next boot without >> starting i

Re: [Puppet Users] Re: Strange behavior by service

2012-02-09 Thread Aaron Grewell
On 02/09/2012 11:39 AM, Daniel Pittman wrote: >>> I would try adding "ensure => undef" to the service's parameters. If >>> that doesn't work then I can't imagine what would. >> >> Thanks John, that did the trick. I'm not sure if I've got a service >> default set somewhere I didn't realize or what

[Puppet Users] Basic string manipulation in puppet

2012-02-16 Thread Aaron Nicoli
version), equal just 102. For example in perl (since I know it): $version = '10.2.0'; if ($version =~ /^(\d+)\.(\d+).*$/) { $cutversion = $1 . $2; } Any help? Thanks, Aaron. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group

[Puppet Users] Re: Basic string manipulation in puppet

2012-02-16 Thread Aaron Nicoli
Stefan, Your the man, thanks for the help, exactly the kind of thing I am after! Cheers dude, On Feb 17, 10:24 am, Stefan Schulte wrote: > On Thu, Feb 16, 2012 at 02:50:27PM -0800, Aaron Nicoli wrote: > > Hi all, > > > Been searching the net for a few hours now. > > I

Re: [Puppet Users] Re: overriding parts of a collection of defined resources

2012-02-19 Thread Aaron Grewell
Resource defaults may help you. If you create a default file resource : File{ owner => root, group => root, mode => 644, } The file resources in the class will assume these defaults unless their own definition specifies otherwise. For large numbers of resources of the same type there is als

Re: [Puppet Users] Unresponsive Agents - PE 2.0

2012-02-22 Thread Aaron Grewell
Are you running RHEL 5? Did you recently patch your kernel? If so, you've probably been bitten by a kernel bug. I've successfully used kernel-2.6.18-274.17.1.el5 and backrev versions from the kernel-2.6.18-238.x.x series. On 02/22/2012 12:26 PM, Robert Stinnett wrote: > Hi there, > > I am rel

Re: [Puppet Users] Puppet apache config for vhost

2012-02-28 Thread Aaron Grewell
On 02/28/2012 06:45 AM, Tony G. wrote: > > You might want to use a parametrized class instead of the define, there > is a discussion in removing or not from future puppet releases[1] No, you've misunderstood. The 'defined()' function is/was under consideration for removal. That's not the same a

Re: [Puppet Users] net ads join

2012-03-05 Thread Aaron Grewell
I'm not sure how much membership-specific code you have, but if it's more than just this you may want a custom fact rather than using unless/onlyif every time. We use QAS instead of Samba for domain membership but the idea is the same: --vas_status.rb-- require 'facter' vastool = '/opt/quest/bi

[Puppet Users] Developing new modules using Puppet Sandbox

2012-03-21 Thread Aaron Schaefer
f the project [2]. There's still a bit of work to be done, but the basics are all in place. Let me know what you think! [1] https://github.com/elasticdog/puppet-sandbox [2] http://vimeo.com/elasticdog/puppet-sandbox-demo -- Aaron Bull Schaefer http://elasticdog.com/ -- You received th

Re: [Puppet Users] How can I get puppet onto a closed network ?

2012-03-22 Thread Aaron Grewell
I would install yum-utils and use reposync on a system with internet access to create a local repo. Yum.puppetlabs.com has most of what you need, but you may also need a copy of the epel repo. On Mar 22, 2012 4:42 PM, "Peter Bukowinski" wrote: > I'd copy down from the yum.puppetlabs.com site all

Re: [Puppet Users] How can I get puppet onto a closed network ?

2012-03-25 Thread Aaron Grewell
t does, please file a bug. > > On Thu, Mar 22, 2012 at 5:27 PM, Aaron Grewell > wrote: > > I would install yum-utils and use reposync on a system with internet > access > > to create a local repo. Yum.puppetlabs.com has most of what you need, > but > > you may also

Re: [Puppet Users] Going insane : Puppet PHP module for multiple distributions

2012-03-30 Thread Aaron Grewell
If you try to handle unlike OSes in the same class you're in for lots of debugging and logic issues. I agree with Walter, you'll want to subclass them. If you name your subclasses according to the results of the built-in osfamily fact (which should return RedHat for both RHEL and CentOS) you can

[Puppet Users] Does create_resources support virtual resources?

2012-03-30 Thread Aaron Grewell
Hi all, I'm interested pushing my user list out of my users manifest and into Hiera. Unfortunately I haven't been able to get it to work the way I thought it would. The error suggests that perhaps create_resources cannot create virtual resources, but the docs I've read so far don't address it. T

Re: [Puppet Users] Does create_resources support virtual resources?

2012-03-30 Thread Aaron Grewell
ce. > > On Friday, March 30, 2012, Aaron Grewell wrote: > > Hi all, > I'm interested pushing my user list out of my users manifest and into > Hiera. Unfortunately I haven't been able to get it to work the way I > thought it would. The error suggests

Re: [Puppet Users] scaling puppet, skipping puppetmaster?

2012-04-27 Thread Aaron Grewell
Note that using multiple masters is one way to solve this. On Apr 27, 2012 10:46 AM, "Philip Brown" wrote: > I've heard that after (some # of machines) x (some size of manifests) > puppet does not scale well, due to bottlenecking on the puppetmaster. > > Anyone doing large scale use by some other

Re: [Puppet Users] distributing updates to multiple puppet masters (Subversion)

2012-05-02 Thread Aaron Grewell
Our SVN repo box is shared with some other projects so I haven't implemented a post-commit hook at this point. We used to have Puppet perform the checkouts, but since a commit may break Puppet's ability to run it didn't seem like the best way. For now we're doing it via MCollective. On 05/02/201

Re: [Puppet Users] how best to combine business data (Hiera) and machine data (Facts)

2012-05-11 Thread Aaron Grewell
I suppose you could create a separate class for the entries that will be fact-driven versus Hiera-driven. You wouldn't be able to use a single template, but either augeas or concat should work. I wouldn't call it elegant, but the code might be less ugly. On Fri, May 11, 2012 at 9:47 AM, Luke Big

Re: [Puppet Users] Using Puppet to manage preexisting servers

2012-05-16 Thread Aaron Grewell
On Wed, May 16, 2012 at 5:07 AM, Mister IT Guru wrote: > Ordinarily, I'd say lets upgrade your working practices while we're at it, > and properly manage your whole workflow, manage access and manage who can > make changes. Lets start by rebuilding your boxes to specification, and > migrating y

Re: [Puppet Users] Re: Newbie question: what to start from?

2012-05-18 Thread Aaron Grewell
On Fri, May 18, 2012 at 11:07 AM, Christopher Wood wrote: >>    When we started using cfengine long time ago cookbooks _with_examples_ >>    were available, it was very convenient. There's an integrated set of example modules here that are worth a look: http://www.example42.com/ -- You received

Re: [Puppet Users] file_line type issue, possible bug

2012-06-11 Thread Aaron Grewell
Depending on your sudo version you could also put snippets in /etc/sudoers.d. This has the advantage of allowing each class to manage its own sudoers file without any Puppet conflicts. On Jun 10, 2012 3:56 AM, "Ryan Bowlby" wrote: > Hi All, > > I am using the file_line type included in stdlib to

Re: [Puppet Users] How to add extra lines in the existing files?

2011-06-23 Thread Aaron Grewell
There are at least three ways to do this: 1) Use an Augeas resource to edit the file. For system files this can be a good solution since Augeas generally has lenses for them. 2) Use an Exec resource and something like sed or cat. Not my preferred approach but sometimes the easiest, especially if y

Re: [Puppet Users] Make puppet automatically recognize new files in nodes directory?

2011-06-23 Thread Aaron Grewell
touch site.pp? On Jun 23, 2011 1:01 PM, "Pheran" wrote: > So, instead of defining all my nodes in one file, I use what seems to > be a fairly common practice, from site.pp I do: > > import 'nodes/*' > > Then I have a nodes directory containing a .pp file for each node. > The only problem with this

Re: [Puppet Users] Re: Make puppet automatically recognize new files in nodes directory?

2011-06-23 Thread Aaron Grewell
the puppet manifests from > my git repo always touch the site.pp file after it fires. Any other > good methods for handling this? > > On Jun 23, 4:05 pm, Aaron Grewell wrote: > > touch site.pp? > > On Jun 23, 2011 1:01 PM, "Pheran" wrote:> So, instead > of def

Re: [Puppet Users] Deployed but unmanaged file

2011-06-29 Thread Aaron Grewell
I'd be tempted to write another file as well as part of the initial config (/var/lib/firebird/configured or something), then check for its (non)existence before pushing the file out. On Wed, Jun 29, 2011 at 8:34 AM, Craig White wrote: > This seems to work but it does seem perilous and ugly. A me

Re: [Puppet Users] Deployed but unmanaged file

2011-06-29 Thread Aaron Grewell
That would be sweet. For system-level files I want to overwrite and keep a known state, but at the user level I would love to be able to push a default and then let them customize. You can get something similar with concat by including a local file with additions but since modifications to the co

[Puppet Users] Solaris mount provider question

2011-07-13 Thread Aaron Grewell
I'm trying to mount multiple swap partitions in Solaris, but I'm not sure how to create a working syntax for that. Since the mountpoint for a swap partition is '-' adding more than one is going to result in a multiple declaration. I'd like to do something like this: mount { '-':

Re: [Puppet Users] Modules for Solaris

2011-07-20 Thread Aaron Grewell
I'm just finishing up adding initial Solaris support to my existing Linux-oriented module set. I do think a set of modules covering the basics would be helpful. As a Linux admin learning Solaris trying to understand both the Puppet differences and the OS differences made startup harder. Solaris

Re: [Puppet Users] Re: Modules for Solaris

2011-07-20 Thread Aaron Grewell
Interesting. I will definitely take a look at that IPS link, that could make life a lot easier. I'd love to see what you've done, I'm sure it would help me along as I work to smooth out our Solaris processes. On Wed, Jul 20, 2011 at 10:47 AM, deet wrote: > > > so as far as I'm concerned Solari

Re: [Puppet Users] Re: Modules for Solaris

2011-07-21 Thread Aaron Grewell
The pkgutil provider comes with the OpenCSW Puppet package on Solaris in Puppet 2.6, and is in 2.7 by default. It works quite well. On Thu, Jul 21, 2011 at 11:14 AM, windowsrefund wrote: > > > > - What packages? > > This might become a nightmare... there are different packages > repositories, >

Re: [Puppet Users] Re: Modules for Solaris

2011-07-21 Thread Aaron Grewell
One thing to note: if you're using pkgutil with Puppet make sure you set 'wgetopts=-nv' in pkgutil.conf or you'll get loads of inexplicable warnings. On Wed, Jul 20, 2011 at 6:10 PM, Al @ Lab42 wrote: > On Wednesday, July 20, 2011 5:24:05 PM UTC+2, deet wrote: > >> >> On Jul 20, 12:06 am, "Al @

Re: [Puppet Users] Custom fact question

2011-07-29 Thread Aaron Grewell
If you put your custom fact in a module and enable plugin sync it should be deployed and run before your manifest IIRC. On Jul 29, 2011 5:55 AM, "Oliver Beattie" wrote: > Hi, > > I need to use the output of a script to set the value of a variable. I > understand the only way to do this is to use a

Re: [Puppet Users] Facter 1.6.0 and CentOS 6.0

2011-08-01 Thread Aaron Grewell
Is the redhat-lsb package installed? IIRC it provides the necessary info for the lsb facts. On Aug 1, 2011 8:27 AM, "Derek J. Balling" wrote: > We just started testing CentOS 6.0 here, and I'm using Facter 1.6.0 > > If I run this command from my CentOS 5.x test machine: > > [root@puppetclient.nj

Re: [Puppet Users] Re: Puppet 2.7.1, variable scoping, best practices

2011-08-01 Thread Aaron Grewell
I recommend taking a look at R I Pienaar's alternative extlookup implementation. It supports YAML in addition to csv which allows for the full range of available variable types to be pulled in from external sources. I've combined this with a YAML-based ENC to put all variables for a single node

Re: [Puppet Users] Re: module / class scope

2011-08-02 Thread Aaron Grewell
I think you'll need to use both an include and a require. The include makes the class(es) in the file available, the require creates the actual dependency. On Tue, Aug 2, 2011 at 3:02 PM, Stephen Bunn wrote: > On Tue, Aug 2, 2011 at 10:06 PM, Luke Bigum wrote: > >> Strange, they both appeared

Re: [Puppet Users] Extlookup() Docs

2011-08-03 Thread Aaron Grewell
I just copied it into the necessary locations on the master since I couldn't think of a use case for it elsewhere. On RHEL 5 I replaced: /usr/lib/ruby/site_ruby/1.8/puppet/parser/functions/extlookup.rb with puppet-extlookup/lib/puppet/parser/function

Re: [Puppet Users] Extlookup() again.

2011-08-03 Thread Aaron Grewell
Precedence is for having it look in multiple places. I've got node-level, site-level, and default YAML files for example. On Wed, Aug 3, 2011 at 3:50 PM, Douglas Garstang wrote: > Can't get the extlookup() that supports yaml to work. > > I did this... > > On server: > mv /usr/lib/ruby/site_ruby/

Re: [Puppet Users] Extlookup() again.

2011-08-03 Thread Aaron Grewell
domain.yaml /usr/share/puppet/environments/testing/cluster_cluster1.yaml /usr/share/puppet/environments/testing/site_site1.yaml /usr/share/puppet/environments/testing/default.yaml In that order, which means you can set this at the default level, then override at any lower level you like. Make sen

Re: [Puppet Users] Extlookup() again.

2011-08-03 Thread Aaron Grewell
/environments/testing/nodes/default.yaml On Wed, Aug 3, 2011 at 4:25 PM, Aaron Grewell wrote: > Example Config: > --- > :parser: YAML > :precedence: > - %{environment}/nodes/%{fqdn} > - %{environment}/nodes/cluster_%{cluster} > - %{environment}/nodes/site_%{site} > - %{environmen

Re: [Puppet Users] Extlookup() again.

2011-08-03 Thread Aaron Grewell
It's an array, which can then be exploded into a whole set of package resources with a single entry: package {$default_packages:} On Wed, Aug 3, 2011 at 4:31 PM, Douglas Garstang wrote: > On Wed, Aug 3, 2011 at 4:25 PM, Aaron Grewell wrote: > >> Example Config: >&g

Re: [Puppet Users] Hiera

2011-08-03 Thread Aaron Grewell
Yes. You're probably being confused by Puppet's default behavior, which is to concatenate arrays & hashes together into a string representation when you're printing it. On Wed, Aug 3, 2011 at 4:34 PM, Douglas Garstang wrote: > So, I'll ask this question... > > With hiera, can you retrieve comple

Re: [Puppet Users] Hiera

2011-08-03 Thread Aaron Grewell
;ll give that a try but ... how do > I access a key that's deep down in the data structure? Not possible? > > On Wed, Aug 3, 2011 at 4:46 PM, Aaron Grewell wrote: > >> Yes. You're probably being confused by Puppet's default behavior, which >> is t

Re: [Puppet Users] Hiera

2011-08-03 Thread Aaron Grewell
No, pull the whole hash and break it down afterwards. On Aug 3, 2011 5:15 PM, "Douglas Garstang" wrote: > Aaron, > > I'm not sure you understood my question. I was asking how I could do that > with extlookup. Your saying that this should work? > > $test_v

Re: [Puppet Users] Run script on puppetmaster

2011-08-04 Thread Aaron Grewell
I've never tried to do that, but generate may do what you need. http://docs.puppetlabs.com/references/stable/function.html#generate On Thu, Aug 4, 2011 at 2:50 PM, Craig White wrote: > I can't seem to find this with Google because the search language turns up > common usage. > > What I am tryin

Re: [Puppet Users] How to query other classes/defines configurations in the same node?

2011-08-06 Thread Aaron Grewell
Case 1: if you keep your data elsewhere you can use extlookup or Hiera to retrieve it as needed. Case 2: you may want to look at concat, it's tailor made for this scenario. On Aug 3, 2011 6:45 PM, "hsanson" wrote: > I have a huge library of custom classes/defines for all my servers and > I con

Re: [Puppet Users] Re: pluginsync before catalogue?

2011-08-06 Thread Aaron Grewell
It would probably be easier to give the apps team their own module path, that's what we're doing anyway. On Aug 5, 2011 11:10 PM, "John Martin" wrote: > Hey John, > > I've been using environments quite some time with lots of success. I > love the idea of creating a bootstrap environment which I ne

Re: [Puppet Users] Is accessing vars from different class safe?

2011-08-11 Thread Aaron Grewell
It's fine, just make sure class2 requires class1. That's what requires are for. On Thu, Aug 11, 2011 at 8:26 AM, Stefan Schulte < stefan.schu...@taunusstein.net> wrote: > On Sat, Aug 06, 2011 at 04:14:31PM +0200, Stefan Schulte wrote: > > Is it ALWAYS safe to access > $::my_application::paramBal

Re: [Puppet Users] Is accessing vars from different class safe?

2011-08-11 Thread Aaron Grewell
;Hallo Welt'} mod1 -> mod2 you may have better luck. On Thu, Aug 11, 2011 at 8:54 AM, Stefan Schulte < stefan.schu...@taunusstein.net> wrote: > On Thu, Aug 11, 2011 at 08:30:37AM -0700, Aaron Grewell wrote: > > It's fine, just make sure class2 requires class1. That&#x

Re: [Puppet Users] Re: Is accessing vars from different class safe?

2011-08-11 Thread Aaron Grewell
Thanks John , I wasn't aware of that distinction. I suspect you've saved me a forehead=>wall session on down the road. :-) On Aug 11, 2011 2:31 PM, "jcbollinger" wrote: > > > On Aug 11, 10:54 am, Stefan Schulte > wrote: >> On Thu, Aug 11, 2011

Re: [Puppet Users] Re: unable to distribute custom facts

2011-08-12 Thread Aaron Grewell
IIRC you're doing this the hard way. The easy way: 1) Create a module: mkdir -p /etc/puppet/modules/facts 2) Create the pluginsync directories in your module mkdir -p /etc/puppet/modules/facts/lib/facter 3) Put custom facts in the directory you just made 4) Enable pluginsync on master & clients

Re: [Puppet Users] Re: unable to distribute custom facts

2011-08-12 Thread Aaron Grewell
Oh, and include module 'facts' on every node where these facts will be used. That could be somewhat important. On Fri, Aug 12, 2011 at 2:15 PM, Aaron Grewell wrote: > IIRC you're doing this the hard way. The easy way: > 1) Create a module: > mkdir -p /etc/puppet/modules

Re: [Puppet Users] Re: unable to distribute custom facts

2011-08-12 Thread Aaron Grewell
{"/home/ubuntu/a": > ensure=>file > } > } > else { > file {"/home/ubuntu/ai": > ensure=>file > } > } > > file ai was made . > > Please help > > > On Aug 12, 2:17 pm, Aaron Grewell wrote: >> Oh, and include module

Re: [Puppet Users] trying to resolve group dependency in creating users

2011-08-15 Thread Aaron Grewell
Have you tried including require => Group['admin'] in the user declaration? I try to perform my Requires at the resource level instead of the class level if at all possible. On Mon, Aug 15, 2011 at 2:04 PM, Jim Nachlin wrote: > Hi all, > > Using Puppet 2.5, I have a class which creates users: >

Re: [Puppet Users] problem with server/client setup

2011-08-18 Thread Aaron Grewell
Include at the class level. include testfile:testfileclass On Aug 18, 2011 7:11 AM, "Jakov Sosic" wrote: > Hi list. > > I'm trying to set up master/client environment, but I'm having problems... > > Here is my configuration so far: > > # find /etc/puppet/manifests/ > /etc/puppet/manifests/ > /etc

Re: [Puppet Users] Dynamic lookup of $var

2011-08-18 Thread Aaron Grewell
Agreed, facts are the one thing that really should be global IMHO. On Aug 18, 2011 9:39 AM, "Darren Chamberlain" wrote: > On 8/18/2011 12:08 PM, Gary Larizza wrote: >> On Thu, Aug 18, 2011 at 9:06 AM, Darren Chamberlain wrote: >> > $operatingsystem is a facter variable, of course. How are these

Re: [Puppet Users] Exec resource not being applied properly

2011-08-26 Thread Aaron Grewell
I think you may have a typo in your resource: /bin/sed -i 's/^SELINUX=enforcing/SELINUX=disabled/' should have '-e' after '-i' I believe. On Fri, Aug 26, 2011 at 8:03 AM, Frederiko Costa wrote: > Hi folks, > > I have the following resource on my test environ: > > exec { "/bin/sed -i 's/^SELINUX=

Re: [Puppet Users] manage sudoers with augeas

2011-08-26 Thread Aaron Grewell
My 2c: I avoid the augeas provider whenever possible. I've got it in one manifest, but it's a pain to troubleshoot. I would either assemble the file from fragments using the concat module or drop prebuilt fragments in /etc/sudoers.d/. You may have to create the directory, but recent sudoers rele

Re: [Puppet Users] Exec resource not being applied properly

2011-08-26 Thread Aaron Grewell
Or just push a new file, that's what we do. On Fri, Aug 26, 2011 at 8:16 AM, Frank Sweetser wrote: > On 08/26/2011 11:03 AM, Frederiko Costa wrote: > > Hi folks, > > > > I have the following resource on my test environ: > > > > exec { "/bin/sed -i 's/^SELINUX=enforcing/SELINUX=disabled/' > /etc/

Re: [Puppet Users] Exec resource not being applied properly

2011-08-26 Thread Aaron Grewell
I'm clear on what -i does, but I thought -e was also required. I'm not a sed expert, but last time I left out -e things went rather badly. On Fri, Aug 26, 2011 at 8:25 AM, Frederiko Costa wrote: > Hi folks, > > Thanks for the quick help > > Aaron - the -i does an in pla

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

2011-09-01 Thread Aaron Grewell
We don't put our manifests under /etc/puppet at all. It's convenient for small installations but as we scaled up I found mixing configs (local, managed by Puppet) and manifests (kept under version control) to be problematic. On Sep 1, 2011 11:58 AM, "Russell Van Tassell" wrote: > I'm currently

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

2011-09-01 Thread Aaron Grewell
Technically true, but administratively confusing IMHO. On Thu, Sep 1, 2011 at 1:08 PM, Scott Smith wrote: > A directory is a directory. That a directory has a parent directory in > which other files exist is pretty moot. > > On Thu, Sep 1, 2011 at 12:13 PM, Aaron Grewell wrote: &

Re: [Puppet Users] Custom Facts

2011-09-01 Thread Aaron Grewell
You can't. The whole purpose of facts is to allow Puppet to make decisions based on client data. Variables=server, facts=client. On Thu, Sep 1, 2011 at 3:41 PM, Douglas Garstang wrote: > So, after reading this doc: > > http://projects.puppetlabs.com/projects/1/wiki/Adding_Facts > > it's not rea

Re: [Puppet Users] Custom Facts

2011-09-01 Thread Aaron Grewell
Create a variable for server_class in your node definition. On Thu, Sep 1, 2011 at 4:48 PM, Douglas Garstang wrote: > > On Thu, Sep 1, 2011 at 4:31 PM, Aaron Grewell wrote: > >> You can't. The whole purpose of facts is to allow Puppet to make >> decisions based on clie

Re: [Puppet Users] Custom Facts

2011-09-01 Thread Aaron Grewell
And then assign classes based on that. Standard if logic or case statement as you prefer. On Thu, Sep 1, 2011 at 4:57 PM, Douglas Garstang wrote: > On Thu, Sep 1, 2011 at 4:56 PM, Aaron Grewell wrote: > >> Create a variable for server_class in your node definition. >>

Re: [Puppet Users] Custom Facts

2011-09-01 Thread Aaron Grewell
Ah. I don't know how mcollective works so I'm not sure how to address that. If there's a YAML data file involved then you could push it with Puppet... On Thu, Sep 1, 2011 at 5:02 PM, Douglas Garstang wrote: > On Thu, Sep 1, 2011 at 4:58 PM, Aaron Grewell wrote: > >&

Re: [Puppet Users] Custom Facts

2011-09-01 Thread Aaron Grewell
. On Thu, Sep 1, 2011 at 5:13 PM, Douglas Garstang wrote: > On Thu, Sep 1, 2011 at 5:05 PM, Aaron Grewell wrote: > >> Ah. I don't know how mcollective works so I'm not sure how to address >> that. If there's a YAML data file involved then you could push it with &g

Re: [Puppet Users] Custom Facts

2011-09-02 Thread Aaron Grewell
level. #- #!/usr/bin/ruby # Modified by Aaron Grewell # Originally by Gary Larizza # http://glarizza.posterous.com require 'yaml' require 'puppet' # Intitialize Variables environments = ["development", "testing", "qa",

Re: [Puppet Users] Distribution of custom facts

2011-09-07 Thread Aaron Grewell
In 2.6.9 that hasn't been my experience. On first run I provide any custom facts I may need as environment variables. After that they seem to work as expected. On Sep 7, 2011 4:39 PM, "Stefan Schulte" wrote: > On Wed, Sep 07, 2011 at 02:33:30PM -0700, AdamW wrote: >> I noticed that the distribut

Re: [Puppet Users] Problems with the "source" statement

2011-09-08 Thread Aaron Grewell
Lose the /files/ part. That's automatic. On Thu, Sep 8, 2011 at 4:00 PM, BillS wrote: > I am new to puppet and have been trying to work my way through the > tutorial materials on the PuppetLab site as well as the "Pro Puppet" > book (and anything else I can find via google). I did not get very

Re: [Puppet Users] Re: Problems with the "source" statement

2011-09-08 Thread Aaron Grewell
Been there. :) On Thu, Sep 8, 2011 at 4:07 PM, BillS wrote: > > > On Sep 8, 4:02 pm, Aaron Grewell wrote: > > Lose the /files/ part. That's automatic. > > > > Sigh. Thank you. > > -- > You received this message because you are subscribed to the Google

Re: [Puppet Users] DNS Zone serial numbers

2011-09-09 Thread Aaron Grewell
I'd just write a custom script in the language of your choice, put it on the server, and use the generate() function to pull the data. Since it doesn't need to run on the client this should make things simpler. On Fri, Sep 9, 2011 at 9:02 AM, Jan-Piet Mens wrote: > > and the template will inclu

Re: [Puppet Users] How To Expand an .erb Template Without Doing a Full Puppet Run?

2011-09-10 Thread Aaron Grewell
Perhaps just add an exec step or two to your regular run? Put the file in a temp location then move it to the live one if it checks out? On Sep 10, 2011 8:01 PM, "Jon Forrest" wrote: > On 9/10/2011 6:57 PM, Jonathan Stanton wrote: >> >> Maybe I'm missing something here, but I think Jon was asking

[Puppet Users] For Solaris users: an OpenSSL problem/fix

2011-09-14 Thread Aaron Grewell
I ran into an interesting one today, the answer to which was on display at the bottom of the Google cache of a long-expired Blastwave mailing list thread behind a door marked 'Beware the Leopard'. I've repro'd it here in case you ever hit it. When running the Puppet agent on a Solaris 10 SPARC sy

Re: [Puppet Users] Source of external node data?

2011-09-15 Thread Aaron Grewell
I'm pulling Hiera data inside the modules. It's less conceptually elegant than passing the data but much easier to actually make work. On Sep 15, 2011 2:33 PM, "Douglas Garstang" wrote: > I asked this question a few weeks ago. Didn't get a reply, so I > thought I'd try again. > > Where are peopl

Re: [Puppet Users] Variable number of variables in external node output...

2011-09-21 Thread Aaron Grewell
Remember too that if you can do it once (say with a define) Puppet will do it as many times as you like just by putting the data in an array. On Sep 21, 2011 2:39 PM, "Brian Gupta" wrote: > Puppet can do this. I would propose the following solution, but there may be > other ways to do it. > > 1) U

Re: [Puppet Users] Variable number of variables in external node output...

2011-09-22 Thread Aaron Grewell
ed ruby can do. > > > > As for using define(), well, I am trying to separate the data from the > > manifest, and putting N number of defines in the manifests and passing > > values to it, breaks that. > > > > Doug. > > > > On Wed, Sep 21, 2011 at 2:48 PM,

Re: [Puppet Users] puppet agent memory useage

2011-09-23 Thread Aaron Grewell
We're running Puppet via cron instead of daemonized which eliminates these kinds of issues. On Fri, Sep 23, 2011 at 9:56 AM, Martin Alfke wrote: > Hi, > On 23.09.2011, at 13:01, datastream wrote: > > > Hi, > >Three days ago i notice puppet agent in many node use a lot of > memory(some nodes

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

2011-09-24 Thread Aaron Grewell
We had frequent inexplicable daemon crashes on Solaris, but not on RHEL5 (at least not yet) . Given known issues with memory leakage in older Ruby releases Cron seemed more likely to be reliable. We stuck a random wait in the Cron job to spread load on the master and so far it works well. On Se

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

2011-09-26 Thread Aaron Grewell
I picked this up online somewhere and modified to suit: # Puppet will run twice an hour on a random schedule to spread load. $first_run = fqdn_rand(30) $second_run = fqdn_rand(30) + 30 cron { 'puppet_cron': command => '/usr/bin/puppet agent --onetime --logdest syslog > /dev/nu

Re: [Puppet Users] CPAN package provider?

2011-09-27 Thread Aaron Grewell
We're not using CPAN. Modules are installed as RPMs in our environment. On Tue, Sep 27, 2011 at 7:59 AM, Jeffrey Ollie wrote: > Google searches don't turn up anything very promising in terms of a > Puppet CPAN package provider. What are people using to manage Perl > modules installed through C

Re: [Puppet Users] Re: CPAN package provider?

2011-09-28 Thread Aaron Grewell
> wrote: > > > > On Sep 27, 11:13 am, Aaron Grewell wrote: > >> We're not using CPAN. Modules are installed as RPMs in our environment. > > > > As it should be on an RPM-based distro. > > Yes, I wish it could be so... Unfortunately the one system that

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

2011-09-30 Thread Aaron Grewell
I'd prefer that the existing behavior remain the same and that a new fact be added for those that require it. I'd rather not have to interrogate a hypothetical Facter config file to determine what it means by 'hostname' on each given system. On Fri, Sep 30, 2011 at 10:49 AM, Ken Barber wrote: >

  1   2   3   4   >