[Puppet Users] Re: [Puppet-dev] Taking github noise away from puppet-dev list

2012-04-12 Thread Brice Figureau
On Mon, 2012-04-09 at 14:09 -0700, Michael Stahnke wrote: > Since our move to github for pull requests and patches, the usefulness > of puppet-dev has declined significantly. puppet-dev used to be a > great list for development discussion of puppet and the ecosystem > around it. With the informati

Re: [Puppet Users] Unable to access hash elements directly from templates

2012-04-12 Thread Josh
On Wednesday, 11 April 2012 17:14:10 UTC+1, Gary Larizza wrote: > > Don't use the $ for variables in Templates - Puppet variables and arrays > are accessed as local variables/arrays in templates. So try this: TEST: > <%= myhash[key][subkey1] %> > Ah, I did try that before. I get the error: e

Re: [Puppet Users] Implementing hooks

2012-04-12 Thread Luke Bigum
Gabriel, Could you get by with a wrapper? Say, a 'my_nagios' define that does it's own thing, then uses the third party 'nagios' definition? You could add your own resources in your my_nagios that 'Subscribes' to resources in the 'nagios' define to insert your own resources into the dependen

Re: [Puppet Users] Re: [Puppet-dev] Taking github noise away from puppet-dev list

2012-04-12 Thread Ken Barber
>> 3.  More forethought and discussion on the dev list prior to making a >> pull request/patch. > > That'd be really great. And I noticed some attempts lately in this > direction, which is really good. I've been moving more discussions onto puppet-dev in the last few weeks, as I've been delving mo

Re: [Puppet Users] Unable to access hash elements directly from templates

2012-04-12 Thread Josh
Sorry, that should be: err: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to parse template mymodule/test.erb: Could not find value for 'key' at /etc/puppet/modules/mymodule/manifests/init.pp:7 on node pc01.domain.com (i.e. it errors on the content => ... line) Jos

Re: [Puppet Users] Unable to access hash elements directly from templates

2012-04-12 Thread Josh
Eventually I worked this out (nothing like trying every possible combination eh), solution was to remove the $ at the start as you said and also quote the keys in single quotes like so: TEST: <%= myhash['key']['subkey1'] %> Thanks again for your help Josh -- You received this message because

Re: [Puppet Users] Puppet Module

2012-04-12 Thread Javier Segura
On Thu, Apr 12, 2012 at 8:16 AM, niraj wrote: > Hi All, >I am getting the following err while looking up for this command > > You should take a look at http://projects.puppetlabs.com/issues/4847 There are some info about proxy connections. Regards -- Javier -- You received this message

[Puppet Users] Re: [Puppet-dev] Taking github noise away from puppet-dev list

2012-04-12 Thread R.I.Pienaar
- Original Message - > From: "Dean Wilson" > To: puppet-...@googlegroups.com > Cc: puppet-users@googlegroups.com > Sent: Thursday, April 12, 2012 10:55:45 AM > Subject: Re: [Puppet-dev] Taking github noise away from puppet-dev list > > On 12 April 2012 08:48, Brice Figureau > wrote: >

Re: [Puppet Users] How to add Ubuntu PPA repository (with signing key)?

2012-04-12 Thread Bob
This is a very old thread, but I am a new puppet user and it still seems very relevant. I am a SuSE user struggling to find a tidy way of managing repository keys, but I think the principles are the same for all distributions. As far as I can see, both yumrepo and zypprepo are of limited value

[Puppet Users] Error 400 on SERVER: Duplicate definition

2012-04-12 Thread Sans
Dear all, I'm getting this "Duplicate definition" error but can't make sure what's going wrong. I have this definition: voms in the vomscert.pp: # /etc/puppet/modules/d_services/manifests/vomscert.pp class d_services::v

AW: [Puppet Users] Error 400 on SERVER: Duplicate definition

2012-04-12 Thread Bernd Adamowicz
Try to change * exec { 'chk_vomsdir': to something like * exec { "chk_vomsdir_${dir}": and * require => Exec[ 'chk_vomsdir' ]; to * require => Exec["chk_vomsdir_${dir}"]; This should make everything unique. Bernd > -Ursprüngliche Nachricht- > Von: puppet-users@googlegroups.com [m

[Puppet Users] GitHub -> PuppetForge

2012-04-12 Thread Dennis Hoppe
Hello, i am managing my Puppet modules with GitHub and today i discovered the GitHub Service Hooks. Does anybody know if it is possible to use a GitHub Service Hook to push the lates *.tar.gz into PuppetForge? Regards, Dennis signature.asc Description: OpenPGP digital signature

[Puppet Users] Testing a single module

2012-04-12 Thread James Patterson
Hello, I have a production puppet environment that is working well. Now more people are developing modules for it we are using a test environment using environment=test in the puppet.conf file. This prevents changes to modules in the production environment being affected by changes in the test en

[Puppet Users] Re: Error 400 on SERVER: Duplicate definition

2012-04-12 Thread Sans
WOW!! that was real fast (I feel myself so silly now!!). Thanks a lot. But do you mind explaining why I was getting errors in the first place? If I do that 'static way', like this: # /etc/puppet/modules/d_services/manifests/init.pp: --- class voms_c

Re: [Puppet Users] GitHub -> PuppetForge

2012-04-12 Thread Ken Barber
(I don't have a direct tool - but its an interesting conceptual problem) You would ordinarily want an intermediate system for this, either something custom - or a CI system like Jenkins (and perhaps Travis CI does this as well) where you would put your 'publish' logic. The problem of course, bein

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

2012-04-12 Thread Munna S
Hi Gary, I created a custom fact path_to_check.rb and placed it under .../module_name/lib/facter below is my init.pp file class class_name if $path_to_check == present{ file { "/opt/xyz/file.txt": owner => "jboss", group => "jboss",

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

AW: [Puppet Users] Re: Error 400 on SERVER: Duplicate definition

2012-04-12 Thread Bernd Adamowicz
No problem. You're wellcome! And you're not silly. It's just a common pitfall. If you define a resource within a function, this resource will be re-defined with every function call. And since resources have to be unique, the second call to the function will lead to a duplicate definition. So th

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

[Puppet Users] Re: Puppet Certificate's

2012-04-12 Thread Allister Banks
Hey there, I've got fire in ma belly to get this solved, as I'm impatient to use Puppet's CA to bootstrap Simian, but due to this same sticking point the bootstrapping process is more ungainly then it should be. My point is we customize things about each machine while naming and binding, why can't

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

2012-04-12 Thread Munna S
Hi Brian, below is my updated init.pp file. but i am getting the error as Apr 12 14:49:51 pil-vm-pup-01 puppet-master[14586]: (//vm-jeeva2.aircell.prod/Puppet) Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class dev_jboss_jeeva for vm-jeeva2.aircell.prod at /e

Re: [Puppet Users] puppetd locking up?

2012-04-12 Thread David Alden
Hi, On Apr 11, 2012, at 7:38 PM, Jason Antman wrote: > Sorry I missed this thread until now. > > Are you running with --listen? If so, try: > echo "" | nc localhost 8139 > and see if that helps. > > https://projects.puppetlabs.com/issues/12185 > is tracking an issue where puppetd, running with

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

2012-04-12 Thread Sans
As Brian suggested, using define{} is the better way of doing it; you can even copy different files to different directories, if required. Something like this: # /etc/puppet/modules//manifests/staging.pp -- class ur_module::staging { define

[Puppet Users] Re: Puppet Certificate's

2012-04-12 Thread Sean McGrath
Gary, Thanks very much for getting back to me on this. While I have been researching Puppet for our Mac fleet I have used a lot of the very useful information you have published about this so thank you very much for that. In regards your response. Firstly, apologies for my lack of knowledge in th

[Puppet Users] Re: [Puppet-dev] Taking github noise away from puppet-dev list

2012-04-12 Thread James Turnbull
> * no close e-mail > * more readable inlined patches (syntax coloring?, broken in different > e-mails per commit?) > * send back to the thread on this list the internal discussion happening > on github I agree with Brice. The only way to bring the conversation back here is not to segment/split th

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

2012-04-12 Thread Brian Gallew
You can't put a file{} resource inside an exec{} resource. On Thu, Apr 12, 2012 at 7:53 AM, Munna S <19.mu...@gmail.com> wrote: > Hi Brian, > > below is my updated init.pp file. but i am getting the error as > > Apr 12 14:49:51 pil-vm-pup-01 puppet-master[14586]: > (//vm-jeeva2.aircell.prod/Pupp

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

2012-04-12 Thread Sans
You mean, doing this: define opt_dir($fl_name, $path) { instead of this? define opt_dir($file, $path) { On Apr 12, 4:04 pm, Brian Gallew wrote: > You can't put a file{} resource inside an exec{} resource. -- You received this message because you are subscribed to the Google

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

2012-04-12 Thread Munna S
I am bit confused about /var/staging/${file} . Let me explain again my requirement. we have 3 version of jboss running on multiple servers. I need a puppet module to copy a jboss config file to different location based on path condition check . Below is my requirement if /opt/path1 found on the

[Puppet Users] Puppet and SCAP

2012-04-12 Thread Kiki
Hi Does Puppet support SCAP? If yes, how do you use it? If no, have you thought about it? Is it possible? Have you dismissed the idea completely? If it does support SCAP or will in the future, will the operating system be a factor, i.e. will it support both Linux and Windows? Thank you Kiki --

Re: [Puppet Users] Abridged summary of puppet-users@googlegroups.com - 44 Messages in 16 Topics

2012-04-12 Thread Dave Soucy
-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at

Re: [Puppet Users] Puppet and SCAP

2012-04-12 Thread Dan White
Have you seen SecState ? https://fedorahosted.org/secstate/ “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” Bill Waterson (Calvin & Hobbes) - Kiki wrote: > Hi > > Does Puppet support SCAP? If yes, how d

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

2012-04-12 Thread Sans
w.r.t ${file}, what I meant is you can make it "super dynamic" with filenames, if you had to copy different files, as opposed to "a single" file. This is a perfectly working example (change the values/ parameter as required): # /etc/puppet/modules//manifests/test.pp -

Re: [Puppet Users] Re: Puppet Certificate's

2012-04-12 Thread Gary Larizza
Hey Guys, Let me try to step through this one step at a time. I recommend downloading one of our VMs that we host for testing puppet (I'm using the VM we use for training located here --> http://downloads.puppetlabs.com/training/puppet-vmware.zip but there's also one for VirtualBox too --> http:/

[Puppet Users] Re: Error 400 on SERVER: Duplicate definition

2012-04-12 Thread Sans
Thanks Bernd! Make sense. Cheers!! On Apr 12, 3:19 pm, Bernd Adamowicz wrote: > No problem. You're wellcome! And you're not silly. It's just a common > pitfall. If you define a resource within a function, this resource will be > re-defined with every function call. And since resources have to

[Puppet Users] template arrays

2012-04-12 Thread Marek Dohojda
Sorry if this has been asked, but Google has failed me and I haven't been able to find an answer. With a source one can declare array so that if file exist puppet will pull it out first, if not move to the next file in this fashion: source => ["puppet:///conf/httpd_$hostname.conf", "

Re: [Puppet Users] template arrays

2012-04-12 Thread Gary Larizza
Hey Marek, Templates do have different functionality here - they will concatenate arrays of templates (i.e. if you pass more than one template, it concatenates them all together into one file). You might want to check out the blog on separating data from code ( http://puppetlabs.com/blog/the-prob

Re: [Puppet Users] Facter not initialized in rspec in puppetlabs-stdlib?

2012-04-12 Thread Jeff McCune
On Wed, Apr 11, 2012 at 9:59 PM, Wil Cooley wrote: > Unfortunately, I am unable to run any of the rspec tests--not just in > has_interface_with_spec.rb, but on any of the specs. They fail with: > >      Failure/Error: Unable to find matching line from backtrace >      NoMethodError: >        undef

Re: [Puppet Users] Testing a single module

2012-04-12 Thread Gary Larizza
James, If the modules are in your modulepath and environments are defined in puppet.conf, you can actually use puppet apply to declare classes from the command line. For example, if you just wanted to test the nginx::config class you could run: puppet apply -v -e 'include nginx::config' This (

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

2012-04-12 Thread Munna S
source file path it will take from my puppet master server right ? -Jeeva On Thu, Apr 12, 2012 at 11:20 AM, Sans wrote: > w.r.t ${file}, what I meant is you can make it "super dynamic" with > filenames, if you had to copy different files, as opposed to "a > single" file. This is a perfectly wor

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

2012-04-12 Thread Munna S
Hi Sans, This is my jboss.pp file class d_services::jboss { define opt_dir($path) { exec { "copy_${path}": path=> [ '/bin', '/usr/bin' ], command => "cp /etc/puppet/modules/dev_jboss_jeeva/opt/jboss/ jboss-4.2.3.GA/server/default/conf/props/jmx-console-user

[Puppet Users] using array parameters with inherited parameterized classes

2012-04-12 Thread Shantanu
I am trying to use an inherited array parameter in a parameterized class as follows: class params{ $packages = $operatingsystem ? { Centos => ['scons','bzip2'], Ubuntu => ['scons','bzip2'], # Ubuntu => 'scons', } } class depacks( $packages = "$params::packages" ) inherits par

Re: [Puppet Users] template arrays

2012-04-12 Thread Marek Dohojda
Hello Thank you Unfortunately this won't help me at the moment because the files are different completely and not just few parameters. I need different templates based on hostname. I am fully aware that I can use "if" but well..ahm.. its ugly :) On Thu, Apr 12, 2012 at 10:53 AM, Gary Larizza

Re: [Puppet Users] template arrays

2012-04-12 Thread Gary Larizza
On Thu, Apr 12, 2012 at 11:39 AM, Marek Dohojda wrote: > Hello > > Thank you > Unfortunately this won't help me at the moment because the files are > different completely and not just few parameters. I need different > templates based on hostname. > I am fully aware that I can use "if" but well.

Re: [Puppet Users] template arrays

2012-04-12 Thread Steven King
Marek, I'd suggest using something like the following to use a template based on hostname: file { '/path/to/file': template => $hostname ? { /regex/ => 'puppet://module/template.erb', /regex2/ => 'puppet://module/template1.erb', default=> 'puppet://module/default-template.e

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

2012-04-12 Thread Sans
You probably getting: "file not found" or something like that? It's because you are trying to copy a file from one machine (i.e. puppet server) to another machine, your puppet agent, using "cp" command. Puppet has file{} resource and "source" parameter for that. Other than that, if not typo, I don'

Re: [Puppet Users] template arrays

2012-04-12 Thread Marek Dohojda
Hey that does look heck of a lot prettier! Thanks! On Thu, Apr 12, 2012 at 1:02 PM, Steven King wrote: > Marek, > > I'd suggest using something like the following to use a template based on > hostname: > > file { '/path/to/file': > template => $hostname ? { > /regex/ => 'puppet://module

[Puppet Users] service restart upon notify

2012-04-12 Thread puppetguest
I have choosen to split my module into several .pp files as i have seen in an example and makes it cleaner i think. \modules\mysoftware\ init.pp install.pp config.pp service.pp Is that recommended or too many disadvantages ? So my install.pp went through fine, config.pp as well. When i change a

[Puppet Users] Defining node environment on master nodes.pp?

2012-04-12 Thread Will S. G.
Hello, Is there a way to define an environment for the prospective nodes in nodes.pp? *I'd like to be able to define it there and then have my puppet module configure the node puppet.conf* (*erb* template) *based* on the parameters that*’s* passed on from the master. Possible? Thanks, Wil

[Puppet Users] Define node environment on puppet master nodes.pp?

2012-04-12 Thread Will S. G.
Hello, Is there a way to define an environment for the prospective nodes in nodes.pp (maybe a default node?) I'd like to be able to define it there and then have my puppet module configure the node puppet.conf (erb template) based on the parameters that’s passed on from the master. Possible? T

[Puppet Users] Re: service restart upon notify

2012-04-12 Thread Trevor Smith
On Thursday, April 12, 2012 4:07:40 PM UTC-4, puppetguest wrote: > > I have choosen to split my module into several .pp files as i have > seen in an example and makes it cleaner i think. > > \modules\mysoftware\ > init.pp > install.pp > config.pp > service.pp > > Is that recommended or too

[Puppet Users] Developing a module: Use it from the current directory?

2012-04-12 Thread Michael Elsdörfer
In general, the loading/import/namespacing mechanism is really something that I cannot wrap my head around, even after reading the relevant sections in the documentation. Specifically, I'm trying to put together a module. I believe I have the correct module structure: $ find . ./test.pp ./grap

Re: [Puppet Users] Installing from source, not a package

2012-04-12 Thread John Shoemaker
Is it possible to install packages to specific directories for most providers? (for example, passing --instdir to dpkg -i). On Monday, July 18, 2011 4:18:18 PM UTC-7, chiggsy wrote: > > use fpm . You still > should know how to make a package, bu

Re: [Puppet Users] Implementing hooks

2012-04-12 Thread Gabriel Filion
On 12-04-12 04:18 AM, Luke Bigum wrote: > Could you get by with a wrapper? Say, a 'my_nagios' define that does > it's own thing, then uses the third party 'nagios' definition? > > You could add your own resources in your my_nagios that 'Subscribes' to > resources in the 'nagios' define to insert y

[Puppet Users] Re: [Puppet-dev] Taking github noise away from puppet-dev list

2012-04-12 Thread Andrew Parker
I just recently started working at Puppet Labs and have been pretty much been ignoring most of what I see from this list because of the amount of github mail on it. I think that removing the github email from this list will help it to do what I'm hoping to see on it, which is to have discussions

Re: [Puppet Users] Implementing hooks

2012-04-12 Thread Gabriel Filion
On 12-04-12 04:18 AM, Luke Bigum wrote: > Could you get by with a wrapper? Say, a 'my_nagios' define that does > it's own thing, then uses the third party 'nagios' definition? > > You could add your own resources in your my_nagios that 'Subscribes' to > resources in the 'nagios' define to insert y