Re: [Puppet Users] Managing puppet code

2012-08-17 Thread Benjamin Priestman
That's been my feeling as well. I want to make sure that the same code goes 
through each environment. While performing the same merge on different 
branches should give that result, it's still performing two different 
actions which - especially with svn in the mix - may give different results.
 
We use dev, systest, uat and prod environments.
 
I'm think I'm heading towards using CI-style checkouts of the main branch 
of code for systest, with a user-modifiable modules directory in the 
module path for dev, in addition. Both would exist only on our internal 
systems. Puppet-library looks like it would be good for this but extending 
it to use SVN will have to wait for another day.
 
To make it onto UAT, modules need to be packaged up forge-style. A local 
repo of these packages would get synced between puppetmasters in different 
environments. I'm hoping I can work past the current crop of bugs and 
install locally packaged modules with the puppet module tool. I'd install 
to different module directories for UAT and Prod.
 
This still leaves me with no entirely accurate record of what's on prod at 
any given time, but the dev trunk will be close enough to rebuild from in 
the case of total meltdown.

On Thursday, 16 August 2012 15:46:07 UTC+1, Ygor wrote:

 May I politely disagree ?

 I feel that using subversion branches for the different environments is 
 defeating the fact that Puppet separates the environments thru the use of 
 the environment setting.

 Does that make any sense to you all ?

 “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)

 --
 *From: *Jason Slagle rais...@tacorp.net javascript:
 *To: *puppet...@googlegroups.com javascript:
 *Sent: *Thursday, August 16, 2012 9:28:29 AM
 *Subject: *Re: [Puppet Users] Managing puppet code

 Although it doesn't seem to do svn yet (You could extend it), I'm fairly 
 certain you could accomplish this with librarian-puppet.

 It's on github.

 Your Puppetfile would be in your main repo which could have 
 dev/stage/prod branches.

 Jason

 On 08/16/2012 07:22 AM, Benjamin Priestman wrote:
  I'm piloting a puppet deployment that may grow to a fair size (~100 
  nodes, at least two distinct sites, dev/stage/prod environments). I'm 
  struggling a bit with settling on a strategy and processes for 
  managing and deploying puppet code.
 
  As seems to be generally accepted best practice and as required by the 
  fact that there will be multiple teams likely to contribute modules 
  for their applications, I'm managing the code for each 
  internally-developed module in separate repositories - some SVN and 
  some git-based, depending on the working practices of the different 
  teams. I also want to make sure we have a way of pushing different 
  modules through the different environments at their own pace 
  (application a's module might be ready to move into production while 
  application b's module should remain in UAT).
 
  My issues are around how to pull all these modules together, and how 
  to move them through dev/stage/prod environments in sane a reasonably 
  simple way. There are a number whitepapers and descriptions of process 
  around which mainly seem to rely on having a single git repo with 
  different branches representing the different environments. I've got a 
  kind of process working which links together different internal 
  modules, as well as the git-hub sources of modules that have been 
  published to the forge, making use of azimux's externals project 
  (https://github.com/azimux/externals). This works quite nicely for 
  constructing an unstable trunk/master and could be used to push 
  monolithic tags through uat and prod. My current system for deploying 
  individual tags, though, relies on creating a library of tagged 
  modules and a forest of symlinks under $environment/modules. It works, 
  but it is so complex it confuses me, let alone anyone else.
 
  Using forge-style modules seems to be the way to go, but these will 
  need management, too.
 
  Does anyone have any suggestions?


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/f7Jbot7Tei0J.
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 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Class Naming Convention

2012-08-17 Thread Garrett Honeycutt
On 8/16/12 10:44 PM, Douglas Garstang wrote:
 So, this has always puzzled me a bit. By convention, init.pp contains
 one class, named the same as the module. However, what is the
 convention when the module may have multiple external access points?
 Say you have a module called 'syslog' which provides both a client and
 a server class. I typically have used syslog::server and
 syslog::client. I've ended up using this convention more than init.pp
 because I don't know when I first put the class together exactly what
 it's going to do. In module mymodule, rather than create init.pp with
 class mymodule, I'll call it mymodule::base or something and stick it
 in base.pp. Confused...
 
 Doug
 

Not all classes are meant to be directly included by nodes. A common
practice would be having a module where you might have a base class,
such as syslog and other sub classes, such as syslog::client and
syslog::server. Class syslog would contain resources that were common to
both syslog::client and syslog::server (ie: they both have a package and
a config file). Both syslog::client and syslog::server might include (or
possibly inherit) the syslog class. In this setup, a node might include
syslog::server or syslog::client, but not syslog directly. When using
this pattern, be sure to comment in your base class that it is not meant
to be included directly.

-g

-- 
Garrett Honeycutt

206.414.8658
http://puppetlabs.com

-- 
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 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: Custom types in environments working .... yes/no/maybe ?

2012-08-17 Thread Jakov Sosic

On 08/16/2012 10:38 PM, Daniele Sluijters wrote:


The point that we would be able to test Puppet extensions without
putting them into production is moot really if Puppet would actually
bother to load extensions from a environment specific libdir. There's
plenty of ways to work around the fact that extensions in environments
don't really work as one would expect them to but, that really ought be
fixed in the first place, or environments removed all together. In it's
current state the behaviour is slightly unspecified.


+1


--
Jakov Sosic
www.srce.unizg.hr

--
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 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Type Service: ignore notify

2012-08-17 Thread Jakov Sosic

On 08/08/2012 01:53 PM, tobias wrote:

That worked! Thanks a lot...


Isn't it better to restart it through pacemaker commands? Something like:

service { 'xyz':
  hasrestart = false,
  restart= 'crm restart blah blah',
}


Some services reload configurations on HUP, so you can even send signal. 
Much cleaner than just to ignore the configuration change... It will 
bite you in the a** sooner or later if you ignore the changes...




--
Jakov Sosic
www.srce.unizg.hr

--
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 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Class Naming Convention

2012-08-17 Thread Douglas Garstang
On Thu, Aug 16, 2012 at 11:34 PM, Garrett Honeycutt
garr...@puppetlabs.com wrote:
 On 8/16/12 10:44 PM, Douglas Garstang wrote:
 So, this has always puzzled me a bit. By convention, init.pp contains
 one class, named the same as the module. However, what is the
 convention when the module may have multiple external access points?
 Say you have a module called 'syslog' which provides both a client and
 a server class. I typically have used syslog::server and
 syslog::client. I've ended up using this convention more than init.pp
 because I don't know when I first put the class together exactly what
 it's going to do. In module mymodule, rather than create init.pp with
 class mymodule, I'll call it mymodule::base or something and stick it
 in base.pp. Confused...

 Doug


 Not all classes are meant to be directly included by nodes. A common
 practice would be having a module where you might have a base class,
 such as syslog and other sub classes, such as syslog::client and
 syslog::server. Class syslog would contain resources that were common to
 both syslog::client and syslog::server (ie: they both have a package and
 a config file). Both syslog::client and syslog::server might include (or
 possibly inherit) the syslog class. In this setup, a node might include
 syslog::server or syslog::client, but not syslog directly. When using
 this pattern, be sure to comment in your base class that it is not meant
 to be included directly.

Garrett, thanks. Aware of all that, but I'm not sure you really answer
my question. :)

Doug.

-- 
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 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] brew and macosx and puppet

2012-08-17 Thread kegstand
any hints on installing a package through the 'brew' provider on macosx?

code:

exec { brew_install_nginx:
command = /usr/local/bin/brew install nginx,
creates = /usr/local/sbin/nginx,
path= /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin,
user = push,
}

brew install nginx works from the command line, outside of puppet

output:

$ ls /usr/local/sbin/nginx
ls: /usr/local/sbin/nginx: No such file or directory
$ /opt/bin/contact_puppet_server.sh
info: Retrieving plugin
info: Caching catalog for dev.push.am
info: Applying configuration version '1345186944'
err: /Stage[main]/Nginx::Install/Exec[brew_install_nginx]/returns: change
from notrun to 0 failed: /usr/local/bin/brew install nginx returned 1
instead of one of [0] at /etc/puppet/modules/nginx/manifests/install.pp:23

-- 
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 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: Hiera unable to retrieve the value

2012-08-17 Thread linuxbsdfreak
Hi,

The default value works when i set the value in common.yaml. Strange part 
is why isnt hiera find the value in the hierarchy, since i want to override 
the default value according to a facter fact.

Regards,
Kevin

On Friday, August 17, 2012 2:57:03 AM UTC+2, denmat wrote:

 Hi, 

 Can't see anything that stands out in the quick glance, but here's how you 
 can dig further:

 Use --debug on your puppet run and you'll get an output of what hiera is 
 going through. Second, use notify to print out the variables you are trying 
 to access, making sure they match with what hiera is looking for and what 
 you expect. You can also try setting the default for the hsflowd_port and 
 see if that solves your problems or there are others (not saying you should 
 only use the default, just to further your own investigations).

   $hsflowd_port  = hiera('hsflowd_port', '8080'),

   

 HTH,
 Den

 On 17/08/2012, at 1:38, linuxbsdfreak linuxb...@gmail.com javascript: 
 wrote:

 Typo error location=frankfurt is actually location=london.

 On Thursday, August 16, 2012 5:25:17 PM UTC+2, linuxbsdfreak wrote:

 Hi All,

 I am using hiera for storing configuration values. I have setup puppet to 
 use facter following the article from 

 http://nuknad.com/2011/02/11/**self-classifying-puppet-nodes/http://nuknad.com/2011/02/11/self-classifying-puppet-nodes/

 I have custom facts 

 company_role
 company_platform
 company_location

 I have defined the following in hiera.yaml

 ---
 :backends: 
  - yaml

 :logger: console

 :hierarchy:
   - '%{operatingsystem}'
   - '%{platform}/%{location}/%{**role}'
   - common

 :yaml:
 :datadir: '/etc/puppet/hieradata'


 and i create the directories /etc/puppet/hieradata/**
 production/london/dev_tst.yaml

 I have something like this in the above file

 ---

 hsflowd_port: 8080

 company_role: dev_tst
 company_platform: production
 company_location: london

 Given a system with the above facts connecting to puppetmaster. When i 
 run the client i get the following error

 Err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
 Could not find data item hsflowd_port in any Hiera data file and no default 
 supplied at /etc/puppet/modules/hsflowd/**manifests/config.pp.


 For some reason its not getting the value. However when i do the 
 following from the command line

 hiera -c /etc/puppet/hiera.yaml hsflowd_port platform=production  
 location=frankfurt role=dev_tst

 I get the value.

 Following is my manifest:

 class hsflowd::config(
   $hsflowd_user   = hiera('hsflowd_user'),
   $hsflowd_group  = hiera('hsflowd_group'),
   $hsflowd_config_dir = hiera('hsflowd_config_dir'),
   $hsflowd_port  = hiera('hsflowd_port'),
 )

 {

file {
   ${hsflowd_config_dir}/**hsflowd.conf:
 ensure  = present,
 content = template(${module_name}/**hsflowd.conf.erb),
 owner   = $hsflowd_user,
 group   = $hsflowd_group,
 mode= '0644';
 } 

 Is something wrong that i am doing?

 Regards,
 Kevin


  -- 
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To view this discussion on the web visit 
 https://groups.google.com/d/msg/puppet-users/-/L2PKd1u1QAgJ.
 To post to this group, send email to puppet...@googlegroups.comjavascript:
 .
 To unsubscribe from this group, send email to 
 puppet-users...@googlegroups.com javascript:.
 For more options, visit this group at 
 http://groups.google.com/group/puppet-users?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/OXeVLSL5_iIJ.
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 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Getting all variable occurrences from Hiera

2012-08-17 Thread Daniele Sluijters
Hi,

True, however, that is already the case. A host right now is made up of two 
YAML files. Nevertheless I agree it would be nice to keep all information 
relevant to a specific node contained in its own YAML.

I could easily create something that would just parse the files and 
generate DHCPD and DNS files from them without going through Puppet but 
that defeats the purpose. Plus one'd have to remember to run that code 
before committing.

-- 
Daniele Sluijters

On Thursday, 16 August 2012 23:08:26 UTC+2, Alexander Swen wrote:


 I hadn't thought of just separating that information into its own YAML 
 file, that's an interesting solution and one I'll definitely be looking 
 into to.

 But then, information about one host is kept in multiple files and it 
 would be my aim to wrap all specific info for one host into one yaml. so 
 that once you remove the host, you only have to remove that file.
 That yaml file should keep alle the specific params of that host. and 
 every other module should be able to take advantage of that information. 
 This is not only the case for dhcp, but for dns as well. and of course the 
 /etc/network/interfaces file of the host itself.

 And to avoid needless redundancy of information, certain values should be 
 written into that file maximum once. so, the ipaddress for example must not 
 be written in some dns config yaml file as well. and in the hostname.yaml. 
 Should you decide to change the ipaddress, you definitely forget either the 
 bind or the dhcp config.

 I realize that this might lead into a feature req for Hiera. 
 There must simply be a way to tell the dhcp and bind modules to have a 
 look in all hostname.yaml files to collect all ipaddresses and macaddresses 
 and hostnames.

 Best regards,
 Alex


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/hW_VCzOnl4MJ.
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 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: brew and macosx and puppet

2012-08-17 Thread Daniele Sluijters
Hello,

The problem is that you're running 'brew install nginx' as root, since 
Puppet runs as root.

If you run that command as root on a console it will tell you:

9:35:11 r...@chell.portal.daenney.net ~ brew install nginx
Cowardly refusing to `sudo brew install'

And it exists with an exitcode of:
9:35:14 r...@chell.portal.daenney.net ~ echo $? 
  1 ↵
1

So, unless you can run that command as the actual user that owns the brew 
installation this just won't work.

-- 
Daniele Sluijters

On Friday, 17 August 2012 09:20:53 UTC+2, Dan wrote:

 any hints on installing a package through the 'brew' provider on macosx?

 code:

 exec { brew_install_nginx:
 command = /usr/local/bin/brew install nginx,
 creates = /usr/local/sbin/nginx,
 path= /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin,
 user = push,
 }

 brew install nginx works from the command line, outside of puppet

 output:

 $ ls /usr/local/sbin/nginx
 ls: /usr/local/sbin/nginx: No such file or directory
 $ /opt/bin/contact_puppet_server.sh 
 info: Retrieving plugin
 info: Caching catalog for dev.push.am
 info: Applying configuration version '1345186944'
 err: /Stage[main]/Nginx::Install/Exec[brew_install_nginx]/returns: change 
 from notrun to 0 failed: /usr/local/bin/brew install nginx returned 1 
 instead of one of [0] at /etc/puppet/modules/nginx/manifests/install.pp:23 

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/9Ox-OD1_m8QJ.
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 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Installing puppet-dashboard on ubuntu precise

2012-08-17 Thread Daniele Sluijters
Hi,

Are you sure there's no rack 1.3.5 somewhere around your system? If there 
is it is probably found in the $RUBYLIBDIR path before the one installed 
from gem so you're still seeing the error.

If not, then it's getting interesting...

-- 
Daniele Sluijters

On Wednesday, 15 August 2012 07:17:38 UTC+2, Sam Morrison wrote:

 Hi, 

 I'm trying to install dashboard on precise and I get the below error.
 I'm using the latest version that is available in the puppet apt 
 repository. The package rdoc is installed (it's just a virtual package 
 pointing to ruby)

 Are there some other missing dependencies that the package doesn't specify?
 I don't know ruby that well so finding it hard to debug.

 Also it's well after 2011-11-01 is that a problem too?

 Thanks,
 Sam



 root@admin:/usr/share/puppet-dashboard# rake RAILS_ENV=production 
 db:migrate --trace
 NOTE: Gem.source_index is deprecated, use Specification. It will be 
 removed on or after 2011-11-01.
 Gem.source_index called from 
 /usr/share/puppet-dashboard/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:21.
 NOTE: Gem::SourceIndex#initialize is deprecated with no replacement. It 
 will be removed on or after 2011-11-01.
 Gem::SourceIndex#initialize called from 
 /usr/share/puppet-dashboard/config/../vendor/rails/railties/lib/rails/vendor_gem_source_index.rb:100.
 NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. 
 It will be removed on or after 2011-11-01.
 Gem::SourceIndex#add_spec called from 
 /usr/lib/ruby/vendor_ruby/1.8/rubygems/source_index.rb:91.
 NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. 
 It will be removed on or after 2011-11-01.
 Gem::SourceIndex#add_spec called from 
 /usr/lib/ruby/vendor_ruby/1.8/rubygems/source_index.rb:91.
 NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. 
 It will be removed on or after 2011-11-01.
 Gem::SourceIndex#add_spec called from 
 /usr/lib/ruby/vendor_ruby/1.8/rubygems/source_index.rb:91.
 NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. 
 It will be removed on or after 2011-11-01.
 Gem::SourceIndex#add_spec called from 
 /usr/lib/ruby/vendor_ruby/1.8/rubygems/source_index.rb:91.
 NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. 
 It will be removed on or after 2011-11-01.
 Gem::SourceIndex#add_spec called from 
 /usr/lib/ruby/vendor_ruby/1.8/rubygems/source_index.rb:91.
 NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. 
 It will be removed on or after 2011-11-01.
 Gem::SourceIndex#add_spec called from 
 /usr/lib/ruby/vendor_ruby/1.8/rubygems/source_index.rb:91.
 NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. 
 It will be removed on or after 2011-11-01.
 Gem::SourceIndex#add_spec called from 
 /usr/lib/ruby/vendor_ruby/1.8/rubygems/source_index.rb:91.
 NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. 
 It will be removed on or after 2011-11-01.
 Gem::SourceIndex#add_spec called from 
 /usr/lib/ruby/vendor_ruby/1.8/rubygems/source_index.rb:91.
 NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. 
 It will be removed on or after 2011-11-01.
 Gem::SourceIndex#add_spec called from 
 /usr/lib/ruby/vendor_ruby/1.8/rubygems/source_index.rb:91.
 NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. 
 It will be removed on or after 2011-11-01.
 Gem::SourceIndex#add_spec called from 
 /usr/lib/ruby/vendor_ruby/1.8/rubygems/source_index.rb:91.
 NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. 
 It will be removed on or after 2011-11-01.
 Gem::SourceIndex#add_spec called from 
 /usr/lib/ruby/vendor_ruby/1.8/rubygems/source_index.rb:91.
 NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. 
 It will be removed on or after 2011-11-01.
 Gem::SourceIndex#add_spec called from 
 /usr/lib/ruby/vendor_ruby/1.8/rubygems/source_index.rb:91.
 NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. 
 It will be removed on or after 2011-11-01.
 Gem::SourceIndex#add_spec called from 
 /usr/lib/ruby/vendor_ruby/1.8/rubygems/source_index.rb:91.
 NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. 
 It will be removed on or after 2011-11-01.
 Gem::SourceIndex#add_spec called from 
 /usr/lib/ruby/vendor_ruby/1.8/rubygems/source_index.rb:91.
 NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. 
 It will be removed on or after 2011-11-01.
 Gem::SourceIndex#add_spec called from 
 /usr/lib/ruby/vendor_ruby/1.8/rubygems/source_index.rb:91.
 NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. 
 It will be removed on or after 2011-11-01.
 Gem::SourceIndex#add_spec called from 
 /usr/lib/ruby/vendor_ruby/1.8/rubygems/source_index.rb:91.
 NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. 
 It will be removed on or after 

Re: [Puppet Users] Class Naming Convention

2012-08-17 Thread Denmat


On 17/08/2012, at 17:19, Douglas Garstang doug.garst...@gmail.com wrote:

 On Thu, Aug 16, 2012 at 11:34 PM, Garrett Honeycutt
 garr...@puppetlabs.com wrote:
 On 8/16/12 10:44 PM, Douglas Garstang wrote:
 So, this has always puzzled me a bit. By convention, init.pp contains
 one class, named the same as the module. However, what is the
 convention when the module may have multiple external access points?
 Say you have a module called 'syslog' which provides both a client and
 a server class. I typically have used syslog::server and
 syslog::client. I've ended up using this convention more than init.pp
 because I don't know when I first put the class together exactly what
 it's going to do. In module mymodule, rather than create init.pp with
 class mymodule, I'll call it mymodule::base or something and stick it
 in base.pp. Confused...
 
 Doug
 
 
 Not all classes are meant to be directly included by nodes. A common
 practice would be having a module where you might have a base class,
 such as syslog and other sub classes, such as syslog::client and
 syslog::server. Class syslog would contain resources that were common to
 both syslog::client and syslog::server (ie: they both have a package and
 a config file). Both syslog::client and syslog::server might include (or
 possibly inherit) the syslog class. In this setup, a node might include
 syslog::server or syslog::client, but not syslog directly. When using
 this pattern, be sure to comment in your base class that it is not meant
 to be included directly.
 
 Garrett, thanks. Aware of all that, but I'm not sure you really answer
 my question. :)
 
 Doug.
 
Well you can leave init.pp blank, ie,
class name {
}

Then you can put whatever you like in the module's manifest dir.

I tend to write 90% of modules with the following:
name::config
name::install
name::service
name::client
name::server

All of those refer to individual .pp files of course.

Then something like:
include name::server

HTH
Den

-- 
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 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: Hiera unable to retrieve the value

2012-08-17 Thread linuxbsdfreak
Just for info i am running ruby-1.9.3p194.


On Friday, August 17, 2012 9:28:13 AM UTC+2, linuxbsdfreak wrote:

 Hi,

 The default value works when i set the value in common.yaml. Strange part 
 is why isnt hiera find the value in the hierarchy, since i want to override 
 the default value according to a facter fact.

 Regards,
 Kevin

 On Friday, August 17, 2012 2:57:03 AM UTC+2, denmat wrote:

 Hi, 

 Can't see anything that stands out in the quick glance, but here's how 
 you can dig further:

 Use --debug on your puppet run and you'll get an output of what hiera is 
 going through. Second, use notify to print out the variables you are trying 
 to access, making sure they match with what hiera is looking for and what 
 you expect. You can also try setting the default for the hsflowd_port and 
 see if that solves your problems or there are others (not saying you should 
 only use the default, just to further your own investigations).

   $hsflowd_port  = hiera('hsflowd_port', '8080'),

   

 HTH,
 Den

 On 17/08/2012, at 1:38, linuxbsdfreak linuxb...@gmail.com wrote:

 Typo error location=frankfurt is actually location=london.

 On Thursday, August 16, 2012 5:25:17 PM UTC+2, linuxbsdfreak wrote:

 Hi All,

 I am using hiera for storing configuration values. I have setup puppet 
 to use facter following the article from 

 http://nuknad.com/2011/02/11/**self-classifying-puppet-nodes/http://nuknad.com/2011/02/11/self-classifying-puppet-nodes/

 I have custom facts 

 company_role
 company_platform
 company_location

 I have defined the following in hiera.yaml

 ---
 :backends: 
  - yaml

 :logger: console

 :hierarchy:
   - '%{operatingsystem}'
   - '%{platform}/%{location}/%{**role}'
   - common

 :yaml:
 :datadir: '/etc/puppet/hieradata'


 and i create the directories /etc/puppet/hieradata/**
 production/london/dev_tst.yaml

 I have something like this in the above file

 ---

 hsflowd_port: 8080

 company_role: dev_tst
 company_platform: production
 company_location: london

 Given a system with the above facts connecting to puppetmaster. When i 
 run the client i get the following error

 Err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
 Could not find data item hsflowd_port in any Hiera data file and no default 
 supplied at /etc/puppet/modules/hsflowd/**manifests/config.pp.


 For some reason its not getting the value. However when i do the 
 following from the command line

 hiera -c /etc/puppet/hiera.yaml hsflowd_port platform=production  
 location=frankfurt role=dev_tst

 I get the value.

 Following is my manifest:

 class hsflowd::config(
   $hsflowd_user   = hiera('hsflowd_user'),
   $hsflowd_group  = hiera('hsflowd_group'),
   $hsflowd_config_dir = hiera('hsflowd_config_dir'),
   $hsflowd_port  = hiera('hsflowd_port'),
 )

 {

file {
   ${hsflowd_config_dir}/**hsflowd.conf:
 ensure  = present,
 content = template(${module_name}/**
 hsflowd.conf.erb),
 owner   = $hsflowd_user,
 group   = $hsflowd_group,
 mode= '0644';
 } 

 Is something wrong that i am doing?

 Regards,
 Kevin


  -- 
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To view this discussion on the web visit 
 https://groups.google.com/d/msg/puppet-users/-/L2PKd1u1QAgJ.
 To post to this group, send email to puppet...@googlegroups.com.
 To unsubscribe from this group, send email to 
 puppet-users...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/puppet-users?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/3rPfzeEvIMUJ.
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 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Difference between puppet agent and puppetd

2012-08-17 Thread Axel Bock
Hello readers, 

I am wondering - what's the difference between executing puppet agent and 
puppetd? I am on SLES 11 SP2, and both commands want to use the 
/var/run/puppet/agent.pid lock file, both pull the configurations from the 
server, but they seem to be mutually exlusive. When I run sudo puppet 
agent, the /etc/init.d/puppet status will say unused, for examle. Also 
the process is different - one is /usr/sbin/puppetd, the other is 
/usr/bin/puppet. 

Yet they do - AFAIK - the same. 

Can somebody help me out here? Which one should I actually use for clients? 


Thanks  greetings, 
Axel.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/sQCr77Ia0zkJ.
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 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: Hiera unable to retrieve the value

2012-08-17 Thread denmat
Sorry, your hiera config points to:
   -'%{operatingsystem}'
  - '%{platform}/%{location}/%{role}
  - common role

But the facts you have are:
company_role
company_platform
company_location

So unless you have facts platform, location, and role defined they aren't
going to match up. It's like the facts you've used below:

hiera -c /etc/puppet/hiera.yaml hsflowd_port platform=production
location=frankfurt role=dev_tst

So role = dev_tst does not equal custom_role = dev_tst

-- you get what I mean?

Something like this might work:
  -'%{operatingsystem}'
  - %{custom_platform}/%{custom_location}/%{custom_role}
  - '%{platform}/%{location}/%{role}'

See if that works,
Den
On 17 Aug 2012 19:31, linuxbsdfreak linuxbsdfr...@gmail.com wrote:

 Just for info i am running ruby-1.9.3p194.


 On Friday, August 17, 2012 9:28:13 AM UTC+2, linuxbsdfreak wrote:

 Hi,

 The default value works when i set the value in common.yaml. Strange part
 is why isnt hiera find the value in the hierarchy, since i want to override
 the default value according to a facter fact.

 Regards,
 Kevin

 On Friday, August 17, 2012 2:57:03 AM UTC+2, denmat wrote:

 Hi,

 Can't see anything that stands out in the quick glance, but here's how
 you can dig further:

 Use --debug on your puppet run and you'll get an output of what hiera is
 going through. Second, use notify to print out the variables you are trying
 to access, making sure they match with what hiera is looking for and what
 you expect. You can also try setting the default for the hsflowd_port and
 see if that solves your problems or there are others (not saying you should
 only use the default, just to further your own investigations).

   $hsflowd_port  = hiera('hsflowd_port', '8080'),



 HTH,
 Den

 On 17/08/2012, at 1:38, linuxbsdfreak linuxb...@gmail.com wrote:

 Typo error location=frankfurt is actually location=london.

 On Thursday, August 16, 2012 5:25:17 PM UTC+2, linuxbsdfreak wrote:

 Hi All,

 I am using hiera for storing configuration values. I have setup puppet
 to use facter following the article from

 http://nuknad.com/2011/02/11/**s**elf-classifying-puppet-nodes/http://nuknad.com/2011/02/11/self-classifying-puppet-nodes/

 I have custom facts

 company_role
 company_platform
 company_location

 I have defined the following in hiera.yaml

 ---
 :backends:
  - yaml

 :logger: console

 :hierarchy:
   - '%{operatingsystem}'
   - '%{platform}/%{location}/%{**rol**e}'
   - common

 :yaml:
 :datadir: '/etc/puppet/hieradata'


 and i create the directories /etc/puppet/hieradata/**producti**
 on/london/dev_tst.yaml

 I have something like this in the above file

 ---

 hsflowd_port: 8080

 company_role: dev_tst
 company_platform: production
 company_location: london

 Given a system with the above facts connecting to puppetmaster. When i
 run the client i get the following error

 Err: Could not retrieve catalog from remote server: Error 400 on
 SERVER: Could not find data item hsflowd_port in any Hiera data file and no
 default supplied at /etc/puppet/modules/hsflowd/**ma**
 nifests/config.pp.


 For some reason its not getting the value. However when i do the
 following from the command line

 hiera -c /etc/puppet/hiera.yaml hsflowd_port platform=production
 location=frankfurt role=dev_tst

 I get the value.

 Following is my manifest:

 class hsflowd::config(
   $hsflowd_user   = hiera('hsflowd_user'),
   $hsflowd_group  = hiera('hsflowd_group'),
   $hsflowd_config_dir = hiera('hsflowd_config_dir'),
   $hsflowd_port  = hiera('hsflowd_port'),
 )

 {

file {
   ${hsflowd_config_dir}/**hsflowd**.conf:
 ensure  = present,
 content = template(${module_name}/**hsflo**
 wd.conf.erb),
 owner   = $hsflowd_user,
 group   = $hsflowd_group,
 mode= '0644';
 }

 Is something wrong that i am doing?

 Regards,
 Kevin


  --
 You received this message because you are subscribed to the Google
 Groups Puppet Users group.
 To view this discussion on the web visit https://groups.google.com/d/**
 msg/puppet-users/-/**L2PKd1u1QAgJhttps://groups.google.com/d/msg/puppet-users/-/L2PKd1u1QAgJ
 .
 To post to this group, send email to puppet...@googlegroups.com.
 To unsubscribe from this group, send email to
 puppet-users...@googlegroups.**com.
 For more options, visit this group at http://groups.google.com/**
 group/puppet-users?hl=enhttp://groups.google.com/group/puppet-users?hl=en
 .

  --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/puppet-users/-/3rPfzeEvIMUJ.
 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] Re: Hiera unable to retrieve the value

2012-08-17 Thread linuxbsdfreak
Hi,

I figured that out and did the changes to verify. However it doesn't parse 
the hierarchy to override the values. I did a quick test to only use the 
operatingsystem fact in hierarchy.  It doesnt pickup the value from it 
also. Even though the machine is CentOS.  I dont know if  hiera 0.3.0 works 
with ruby1.9.3

Regards,
Kevin


On Friday, August 17, 2012 12:13:37 PM UTC+2, denmat wrote:

 Sorry, your hiera config points to:
-'%{operatingsystem}'
   - '%{platform}/%{location}/%{role}
   - common role

 But the facts you have are:
 company_role
 company_platform
 company_location

 So unless you have facts platform, location, and role defined they aren't 
 going to match up. It's like the facts you've used below:

 hiera -c /etc/puppet/hiera.yaml hsflowd_port platform=production  
 location=frankfurt role=dev_tst

 So role = dev_tst does not equal custom_role = dev_tst 

 -- you get what I mean?

 Something like this might work:
   -'%{operatingsystem}'
   - %{custom_platform}/%{custom_location}/%{custom_role}
   - '%{platform}/%{location}/%{role}'

 See if that works,
 Den
 On 17 Aug 2012 19:31, linuxbsdfreak linuxb...@gmail.com javascript: 
 wrote:

 Just for info i am running ruby-1.9.3p194.


 On Friday, August 17, 2012 9:28:13 AM UTC+2, linuxbsdfreak wrote:

 Hi,

 The default value works when i set the value in common.yaml. Strange 
 part is why isnt hiera find the value in the hierarchy, since i want to 
 override the default value according to a facter fact.

 Regards,
 Kevin

 On Friday, August 17, 2012 2:57:03 AM UTC+2, denmat wrote:

 Hi, 

 Can't see anything that stands out in the quick glance, but here's how 
 you can dig further:

 Use --debug on your puppet run and you'll get an output of what hiera 
 is going through. Second, use notify to print out the variables you are 
 trying to access, making sure they match with what hiera is looking for 
 and 
 what you expect. You can also try setting the default for the hsflowd_port 
 and see if that solves your problems or there are others (not saying you 
 should only use the default, just to further your own investigations).

   $hsflowd_port  = hiera('hsflowd_port', '8080'),

   

 HTH,
 Den

 On 17/08/2012, at 1:38, linuxbsdfreak linuxb...@gmail.com wrote:

 Typo error location=frankfurt is actually location=london.

 On Thursday, August 16, 2012 5:25:17 PM UTC+2, linuxbsdfreak wrote:

 Hi All,

 I am using hiera for storing configuration values. I have setup puppet 
 to use facter following the article from 

 http://nuknad.com/2011/02/11/**s**elf-classifying-puppet-nodes/http://nuknad.com/2011/02/11/self-classifying-puppet-nodes/

 I have custom facts 

 company_role
 company_platform
 company_location

 I have defined the following in hiera.yaml

 ---
 :backends: 
  - yaml

 :logger: console

 :hierarchy:
   - '%{operatingsystem}'
   - '%{platform}/%{location}/%{**rol**e}'
   - common

 :yaml:
 :datadir: '/etc/puppet/hieradata'


 and i create the directories /etc/puppet/hieradata/**producti**
 on/london/dev_tst.yaml

 I have something like this in the above file

 ---

 hsflowd_port: 8080

 company_role: dev_tst
 company_platform: production
 company_location: london

 Given a system with the above facts connecting to puppetmaster. When i 
 run the client i get the following error

 Err: Could not retrieve catalog from remote server: Error 400 on 
 SERVER: Could not find data item hsflowd_port in any Hiera data file and 
 no 
 default supplied at /etc/puppet/modules/hsflowd/**ma**
 nifests/config.pp.


 For some reason its not getting the value. However when i do the 
 following from the command line

 hiera -c /etc/puppet/hiera.yaml hsflowd_port platform=production  
 location=frankfurt role=dev_tst

 I get the value.

 Following is my manifest:

 class hsflowd::config(
   $hsflowd_user   = hiera('hsflowd_user'),
   $hsflowd_group  = hiera('hsflowd_group'),
   $hsflowd_config_dir = hiera('hsflowd_config_dir'),
   $hsflowd_port  = hiera('hsflowd_port'),
 )

 {

file {
   ${hsflowd_config_dir}/**hsflowd**.conf:
 ensure  = present,
 content = template(${module_name}/**hsflo**
 wd.conf.erb),
 owner   = $hsflowd_user,
 group   = $hsflowd_group,
 mode= '0644';
 } 

 Is something wrong that i am doing?

 Regards,
 Kevin


  -- 
 You received this message because you are subscribed to the Google 
 Groups Puppet Users group.
 To view this discussion on the web visit https://groups.google.com/d/**
 msg/puppet-users/-/**L2PKd1u1QAgJhttps://groups.google.com/d/msg/puppet-users/-/L2PKd1u1QAgJ
 .
 To post to this group, send email to puppet...@googlegroups.com.
 To unsubscribe from this group, send email to 
 puppet-users...@googlegroups.**com.
 For more options, visit this group at http://groups.google.com/**
 

[Puppet Users] Re: Difference between puppet agent and puppetd

2012-08-17 Thread Paul Tötterman
Hi Axel,

`puppetd` is the old ( 2.6.0?) way to call the agent, and `puppet agent` 
is the new way. The old way is still supported, but support will probably 
be removed at some point.

Cheers,
Paul

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/01TD81g2gIAJ.
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 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Class Naming Convention

2012-08-17 Thread jcbollinger


On Friday, August 17, 2012 2:52:42 AM UTC-5, denmat wrote:



 On 17/08/2012, at 17:19, Douglas Garstang doug.g...@gmail.comjavascript: 
 wrote: 

  On Thu, Aug 16, 2012 at 11:34 PM, Garrett Honeycutt 
  gar...@puppetlabs.com javascript: wrote: 
  On 8/16/12 10:44 PM, Douglas Garstang wrote: 
  So, this has always puzzled me a bit. By convention, init.pp contains 
  one class, named the same as the module. However, what is the 
  convention when the module may have multiple external access points? 
  Say you have a module called 'syslog' which provides both a client and 
  a server class. I typically have used syslog::server and 
  syslog::client. I've ended up using this convention more than init.pp 
  because I don't know when I first put the class together exactly what 
  it's going to do. In module mymodule, rather than create init.pp with 
  class mymodule, I'll call it mymodule::base or something and stick it 
  in base.pp. Confused... 
  
  Doug 
  
  
  Not all classes are meant to be directly included by nodes. A common 
  practice would be having a module where you might have a base class, 
  such as syslog and other sub classes, such as syslog::client and 
  syslog::server. Class syslog would contain resources that were common 
 to 
  both syslog::client and syslog::server (ie: they both have a package 
 and 
  a config file). Both syslog::client and syslog::server might include 
 (or 
  possibly inherit) the syslog class. In this setup, a node might include 
  syslog::server or syslog::client, but not syslog directly. When using 
  this pattern, be sure to comment in your base class that it is not 
 meant 
  to be included directly. 
  
  Garrett, thanks. Aware of all that, but I'm not sure you really answer 
  my question. :) 
  
  Doug. 
  
 Well you can leave init.pp blank, ie, 
 class name { 
 } 

 Then you can put whatever you like in the module's manifest dir. 

 I tend to write 90% of modules with the following: 
 name::config 
 name::install 
 name::service 
 name::client 
 name::server 

 All of those refer to individual .pp files of course. 

 Then something like: 
 include name::server 


In fact, init.pp can be entirely empty.  If you have a class with the same 
name as the module then the autoloader expects to find it in init.pp, but 
such a class is not required as far as I know.  I'm not on the most recent 
Puppet at the moment, but I definitely have working modules with empty 
init.pp.

If init.pp serves any essential purpose beyond its significance to the 
autoloader, it seems to be simply to (redundantly) mark the directory 
containing it as a module's base manifest directory.


John

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/JyTCa7XIG94J.
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 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Difference between puppet agent and puppetd

2012-08-17 Thread Axel Bock
Hi Paul, 

thanks for the answer. I'm on SLES 11 SP2, and the RPM says 
puppet-2.6.17-0.3.1.
so, no, it should be reasonably new (even if too old for my personal taste 
;)

SuSE uses puppetd in the /etc/init.d script it seems.


Greetings, 
Axel.


Am Freitag, 17. August 2012 12:05:05 UTC+2 schrieb Axel Bock:

 Hello readers, 

 I am wondering - what's the difference between executing puppet agent 
 and puppetd? I am on SLES 11 SP2, and both commands want to use the 
 /var/run/puppet/agent.pid lock file, both pull the configurations from the 
 server, but they seem to be mutually exlusive. When I run sudo puppet 
 agent, the /etc/init.d/puppet status will say unused, for examle. Also 
 the process is different - one is /usr/sbin/puppetd, the other is 
 /usr/bin/puppet. 

 Yet they do - AFAIK - the same. 

 Can somebody help me out here? Which one should I actually use for 
 clients? 


 Thanks  greetings, 
 Axel.


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/pSdVJ84OWLcJ.
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 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Declare the same resource with different parameters

2012-08-17 Thread jcbollinger


On Thursday, August 16, 2012 11:00:34 AM UTC-5, Rost wrote:

 Yes I want to fill  /myappbase/applis/conf with the content of twice 
 sources, but in different class.

  

 Le jeudi 16 août 2012 17:41:12 UTC+2, Rost a écrit :

 Hi all,

 I'm developing  my own module, and i want to declare same resources in 
 different class like this :

 This resource is used to configure my Jboss server by copying conf files 
 in /myappbase/applis/conf
 class srhjboss::config::applis {

 file { /myappbase/applis/conf:

 ensure = directory,
 notify = Class['srhjboss::service'],
 recurse = true,
 source = 'puppet:///modules/srhjboss/communs',

 }

 }

 The second class and resource is used to deploy the conf file of my war 
 application like this :

 class srhdeployit::war {

 file { /myappbase/applis/conf':
 ensure = present,
 source = puppet://puppet/srnrepo/myappname,
 recurse = true,
 }

 }

 then i include the class in the node

 node default {
include srhjboss::config::applis
include srhdeployit::war

 I got the exact failure : 

 err: Failed to apply catalog: Cannot alias File[ ' ' ] to 
 [/sirhen/applis/conf] at 
 /etc/puppet/modules/srhjboss/manifests/config/applis.pp:47; resource 
 [File, /sirhen/applis/conf] already declared at 
 /etc/puppet/modules/srhdeployit/manifests/war.pp:44



As Christopher explained, you cannot declare the same resource twice on the 
same node, as it is internally inconsistent.  You give Puppet conflicting 
information about the properties of the resource, so which is it supposed 
to apply?

Supposing that none of the files provided by class 'srhdeployit::war' 
replace files provided by class 'srhjboss::config::applis', you should be 
able to solve the problem by using separate File resources for each file or 
directory that the former wants to manage.  Note also that it looks like 
you probably need a 'requires' parameter on the 'srhdeployit::war' file(s).


John

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/wsfaj8SLod8J.
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 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Difference between puppet agent and puppetd

2012-08-17 Thread llowder


On Friday, August 17, 2012 8:26:54 AM UTC-5, Axel Bock wrote:

 Hi Paul, 

 thanks for the answer. I'm on SLES 11 SP2, and the RPM says 
 puppet-2.6.17-0.3.1.
 so, no, it should be reasonably new (even if too old for my personal taste 
 ;)

 SuSE uses puppetd in the /etc/init.d script it seems.


Ubuntu (10.04 + 12.04) uses puppetd in it's upstart and related scripts as 
well IIRC.
 


 Greetings, 
 Axel.


 Am Freitag, 17. August 2012 12:05:05 UTC+2 schrieb Axel Bock:

 Hello readers, 

 I am wondering - what's the difference between executing puppet agent 
 and puppetd? I am on SLES 11 SP2, and both commands want to use the 
 /var/run/puppet/agent.pid lock file, both pull the configurations from the 
 server, but they seem to be mutually exlusive. When I run sudo puppet 
 agent, the /etc/init.d/puppet status will say unused, for examle. Also 
 the process is different - one is /usr/sbin/puppetd, the other is 
 /usr/bin/puppet. 

 Yet they do - AFAIK - the same. 

 Can somebody help me out here? Which one should I actually use for 
 clients? 


 Thanks  greetings, 
 Axel.



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/ViA41M7iULcJ.
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 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Can I re-use a Exec resource from multiple un-related classes?

2012-08-17 Thread jcbollinger


On Thursday, August 16, 2012 2:48:54 PM UTC-5, Kenneth Lo wrote:

  Looks like with some testing I answered my own question. :)

  As soon as the 'helpFunction' class is included in a node, I can simply 
 notify the resource there from other classes as well. If I re-define the 
 Exec resource in other classes I would ended up getting multi-define error. 


Yes, all classes *and resources* in Puppet have global scope and visibility 
once declared.  Furthermore, resources are not namespaced.


John

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/JN5q8Z_WZ28J.
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 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Dashboard fails to import report from Fedora 17 node

2012-08-17 Thread Peter Bukowinski
Greetings,

I'm testing Fedora 17 in our environment and have come across an 
interesting/annoying issue (that may or may not be isolated to my environment). 
Puppet runs fine on the test node but the reports are failing to import to 
dashboard and are showing up as background task failures with these details:


Importing report report-19732-119.yaml at 2012-08-17 09:01 EDT
undefined method `each' for nil:NilClass

Backtrace:
  /opt/puppet-dashboard/lib/puppet/report.rb:202:in `extended'
  /opt/puppet-dashboard/lib/puppet/report.rb:200:in `each'
  /opt/puppet-dashboard/lib/puppet/report.rb:200:in `extended'
  /opt/puppet-dashboard/lib/puppet/report.rb:114:in `extend'
  /opt/puppet-dashboard/lib/puppet/report.rb:114:in `extended'
  /opt/puppet-dashboard/app/models/report.rb:107:in `extend'
  /opt/puppet-dashboard/app/models/report.rb:107:in `create_from_yaml'
  /opt/puppet-dashboard/app/models/report.rb:86:in `create_from_yaml_file'


Anyone have any ideas why this might be occurring?

The Fedora 17 node and the puppetmaster are running puppet 2.7.18.
My puppetmaster has ruby enterprise 1.8.7 (patch level 334), the node has ruby 
1.9.3p194.
Puppetmaster is hosting puppet-dashboard version 1.2.10. OS is Scientific Linux 
5.5.


-- 
Peter M. Bukowinski
Sr. Systems Engineer
Janelia Farm Research Campus, HHMI

-- 
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 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] puppet kick not working against windows service

2012-08-17 Thread Matt F
I am running puppet 2.7.14 - CentOS 6 server, CentOS and windows 2008 R2 
clients. 

I'm having problems with the puppet kick command - it works on linux 
clients, and on my windows box when puppet agent --no-daemonize --verbose 
is run from a command prompt. However, when I run it as a windows service, 
I get Host blah failed: Connection refused - connect(2) and blah 
finished with exit code 2. Any idea why the behaviour might be different 
when running as a service vs running from the Start Command Prompt with 
Puppet window?

I did  a test with process monitor from the windows resource toolkit and 
it looks like the service is actually running 'ruby  -S -- puppet agent 
--onetime'..? 

Is there a way to force the windows service to use listen mode? I've 
modified C:\ProgramData\PuppetLabs\puppet\etc\puppet.conf to have [agent] 
listen=true but that seems not to be working (at least not when run as a 
service).

Thanks!


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/sRnW7JXSBU8J.
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 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Getting all variable occurrences from Hiera

2012-08-17 Thread jcbollinger


On Thursday, August 16, 2012 4:08:26 PM UTC-5, Alexander Swen wrote:


 I hadn't thought of just separating that information into its own YAML 
 file, that's an interesting solution and one I'll definitely be looking 
 into to.

 But then, information about one host is kept in multiple files and it 
 would be my aim to wrap all specific info for one host into one yaml. so 
 that once you remove the host, you only have to remove that file.



As much or as little information about the hosts as is wanted can be put in 
the one big hash, so host information does not need to be split up.  If 
everything went into one hash then removing info for a host would involve 
removing one block of lines from one file.  That's only a little less 
convenient than removing a single file, and it could be automated 
relatively easily.

Please understand that I don't have any stake in what approach Daniele 
chooses.  I am not advocating for a particular approach, nor asserting it 
superior over any other that also achieves the desired result, but I do 
hope that Daniele and others who may read this thread will base their 
decisions on solid reasoning.

 

 That yaml file should keep alle the specific params of that host. and 
 every other module should be able to take advantage of that information. 
 This is not only the case for dhcp, but for dns as well. and of course the 
 /etc/network/interfaces file of the host itself.

 And to avoid needless redundancy of information, certain values should be 
 written into that file maximum once. so, the ipaddress for example must not 
 be written in some dns config yaml file as well. and in the hostname.yaml. 
 Should you decide to change the ipaddress, you definitely forget either the 
 bind or the dhcp config.



Certainly data duplication should be avoided, and that could be aided by 
putting all information for each host into a single hash for that host.  
Those per-host hashes could equally well (for this purpose) appear in 
separate YAML files or all together as values in a larger hash in one YAML 
file.

 


 I realize that this might lead into a feature req for Hiera. 
 There must simply be a way to tell the dhcp and bind modules to have a 
 look in all hostname.yaml files to collect all ipaddresses and macaddresses 
 and hostnames.


I suppose you're suggesting another function similar to hiera_hash(), in 
that it provides the result in the form of a hash that associates the data 
from each yaml with a key that corresponds to the filename.  Hmm, where did 
I see such a data structure described before?

Inasmuch as you can achieve the output you want now, by structuring your 
data the way you want it in the first place, I think this is by no means a 
must-have feature.  If the mode of file organization you describe would be 
of such high value to you, however, then Hiera supports pluggable 
back-ends, so you can easily add that capability.  You could probably get 
80% of the way there by deriving your custom back-end from the current YAML 
back-end.


John

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/lsYFiVADptYJ.
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 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Getting all variable occurrences from Hiera

2012-08-17 Thread Alexander Swen
Thanks for your reply John,
 

 As much or as little information about the hosts as is wanted can be put 
 in the one big hash, so host information does not need to be split up.  If 
 everything went into one hash then removing info for a host would involve 
 removing one block of lines from one file.  That's only a little less 
 convenient than removing a single file, and it could be automated 
 relatively easily.

 That might be a nice workarround.

Please understand that I don't have any stake in what approach Daniele 
 chooses.  I am not advocating for a particular approach, nor asserting it 
 superior over any other that also achieves the desired result, but I do 
 hope that Daniele and others who may read this thread will base their 
 decisions on solid reasoning.

 same here 

  



 Certainly data duplication should be avoided, and that could be aided by 
 putting all information for each host into a single hash for that host.  
 Those per-host hashes could equally well (for this purpose) appear in 
 separate YAML files or all together as values in a larger hash in one YAML 
 file.

 true,  

  

 I suppose you're suggesting another function similar to hiera_hash(), in 
 that it provides the result in the form of a hash that associates the data 
 from each yaml with a key that corresponds to the filename.  Hmm, where did 
 I see such a data structure described before?


no idea, enlighten me ;-)


 Inasmuch as you can achieve the output you want now, by structuring your 
 data the way you want it in the first place, I think this is by no means a 
 must-have feature.  If the mode of file organization you describe would be 
 of such high value to you, however, then Hiera supports pluggable 
 back-ends, so you can easily add that capability.  You could probably get 
 80% of the way there by deriving your custom back-end from the current YAML 
 back-end.


Well, I think it is a must-have feature. Just by adding an option, you 
won't force anyone to actually use it should one not want that off course. 

Best regards, Alex

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/OmH27hXfNIQJ.
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 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Custom types in environments working .... yes/no/maybe ?

2012-08-17 Thread jcbollinger


On Thursday, August 16, 2012 3:38:10 PM UTC-5, Daniele Sluijters wrote:

 I'm afraid I don't completely agree there. One of the benefits of 
 environments is that it allows you to completely separate a change for a 
 module/extension into a separate environment, without needing a separate 
 master, SSL CA and so forth.



I'm sorry, disagreeing with me is not permitted.  :-)

Seriously, though, if you use environments only for separating your 
production code from your test code and maybe from your development code 
then -- to the extent that works for you -- fine.  I wouldn't do it that 
way, but you're not me (for which I'm sure a great many people are 
thankful).

If you are also using environments for other purposes, however, such as 
different environments for different clients, different departments, or the 
like, then I think you really lose something, or at least incur a lot 
higher cost, by simultaneously using that same dimension to provide for 
testing.  Note in particular that a separate master does not necessarily 
have to have separate CA, certificate, etc.; in fact, if the masters are 
colocated on the same host then it should be pretty easy to make them share.
 


 As far as the point to not exposing the production master to untested 
 code, fair enough. I guess there's a chance that untested Ruby code in a 
 different environment could crash the master. Then again, I'll probably 
 notice that about 10 seconds after deploying the actual code and if an 
 agent can't check in for a few minutes that's not necessarily a problem.



Remember that we're working in Ruby, so code the master loads can 
dynamically modify code that's already loaded and running (subject to some 
constraints).  If I actually *wanted* to crash the master via a custom 
extension, then I'm pretty confident that I could do it.  I don't have any 
doubt that a buggy extension could do it accidentally.  Worse than outright 
crashes, however, would be subtler misbehaviors that you might not 
recognize immediately.  Depending on the nature of the misbehavior, a lot 
of damage could be caused.

 


 The point that we would be able to test Puppet extensions without putting 
 them into production is moot really if Puppet would actually bother to load 
 extensions from a environment specific libdir. There's plenty of ways to 
 work around the fact that extensions in environments don't really work as 
 one would expect them to but, that really ought be fixed in the first 
 place, or environments removed all together. In it's current state the 
 behaviour is slightly unspecified.

 The patch suggested in the ticket seems reasonable enough though I'm 
 guessing one would have to tell Puppet its libdir now looks like 
 /var/lib/puppet/master/lib/%= environment % for it to work.



I haven't examined the patch, but my main concern would be about related 
issue http://projects.puppetlabs.com/issues/12173, which concerns different 
versions of the same extension being relied upon by different environments 
(it doesn't work), and which is explicitly not addressed by the proposed 
patch for issue 13858.  Where different environments want different 
versions of extensions, such as if you're trying to use environments to 
provide a testbed for extension development or for third-party module 
testing, I would think 12173 would be a blocker.


John

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/T342k5WbocIJ.
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 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Installing from alternat repositories with puppet module

2012-08-17 Thread Nan Liu
On Thu, Aug 16, 2012 at 10:41 PM, Benjamin Priestman
benja...@miniverse.me.uk wrote:
 The link doesn't work for me but I see some posts from Ryan about hosting
 local forges. I'll focus on the ticket for that.

Yeah, he will have much better insight about the plans.

 My question was more: if there is no current support for local forges, what
 is the --module_repository switch for?. Can you point it at something less
 than a fully functional forge? Does a simple directory structure, which
 mimcs the layout of the forge's archives, behind a web server do the trick?

No, the server needs to return metadata about the modules. The flag at
the moment is only useful for internal development testing.

Nan

-- 
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 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] puppet kick not working against windows service

2012-08-17 Thread Nan Liu
On Fri, Aug 17, 2012 at 6:55 AM, Matt F mfan2...@gmail.com wrote:
 I am running puppet 2.7.14 - CentOS 6 server, CentOS and windows 2008 R2
 clients.

 I'm having problems with the puppet kick command - it works on linux
 clients, and on my windows box when puppet agent --no-daemonize --verbose
 is run from a command prompt. However, when I run it as a windows service, I
 get Host blah failed: Connection refused - connect(2) and blah finished
 with exit code 2. Any idea why the behaviour might be different when
 running as a service vs running from the Start Command Prompt with Puppet
 window?

 I did  a test with process monitor from the windows resource toolkit and
 it looks like the service is actually running 'ruby  -S -- puppet agent
 --onetime'..?

 Is there a way to force the windows service to use listen mode? I've
 modified C:\ProgramData\PuppetLabs\puppet\etc\puppet.conf to have [agent]
 listen=true but that seems not to be working (at least not when run as a
 service).

The listen option isn't supported yet. See issue #15838.

Nan

-- 
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 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Installing puppet agent on Windows XP

2012-08-17 Thread Jeff Sussna
Understood about XP support. All machines in my environment are either Win7 
or Server 2003...except mine :-(. 

On Thursday, August 16, 2012 5:21:01 PM UTC-5, ad wrote:

 Windows support better in newer versions of Puppet. I run 2.7.18 on XP 
 nodes with no issues. It's not officially supported though.

 hth,

 Adam

 On Monday, November 21, 2011 2:50:37 PM UTC-6, Jeff Sussna wrote:

 Trying to get Puppet 2.7.6/Facter 1.6.2 running on Windows XP SP3.
 Followed the install instructions carefully, got no errors. facter and
 puppet both hang no matter what I try. The only things that don't hang
 are:

 facter operatingsystem (or any other individual facter query)
 facter --version

 facter --debug hangs, as does puppet --version or any other puppet
 command, including 'puppet config print all'.

 Anyone have success getting puppet running on XP?



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/_IctDLJTCmwJ.
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 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: puppet kick not working against windows service

2012-08-17 Thread Matt F
Thanks Nan.




-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/-vaxgyd3qd8J.
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 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Job Listing - Linux Admin in Boulder, CO

2012-08-17 Thread Guy Matz
Anyone interested?

Thanks,
Guy

guymatz at gmail

-- 
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 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] puppet kick not working against windows service

2012-08-17 Thread Matt F
Thanks Nan! Do you know if windows support of -listen is planned for any 
future release? (it's not clear to me reading the bug that you referenced).

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/eAXpK9pMqAsJ.
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 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] puppet-rspec / puppetlabs_spec_helper

2012-08-17 Thread llowder

I am using puppet 2.7.14 on Ubuntu 10.04 LTS. I have the following gems:

*** LOCAL GEMS ***

diff-lcs (1.1.3)
hiera (0.3.0)
hiera-puppet (0.3.0)
metaclass (0.0.1)
mocha (0.12.1)
puppet-lint (0.1.13)
puppetlabs_spec_helper (0.2.0)
rake (0.9.2.2)
rspec (2.11.0)
rspec-core (2.11.1)
rspec-expectations (2.11.2)
rspec-mocks (2.11.1)
rspec-puppet (0.1.3)

When I run rake help I get the following:

$ sudo rake help --trace
(in /etc/puppet/environments/test/modules/ruby)
rake aborted!
uninitialized constant Rake::DSL
/usr/lib/ruby/1.8/rake.rb:2503:in `const_missing'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/tasklib.rb:8
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
/var/lib/gems/1.8/gems/rspec-core-2.11.1/lib/rspec/core/rake_task.rb:4
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
/var/lib/gems/1.8/gems/puppetlabs_spec_helper-0.2.0/lib/puppetlabs_spec_helper/rake_tasks.rb:2
/usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
/usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in `require'
/etc/puppet/environments/test/modules/ruby/Rakefile:2
/usr/lib/ruby/1.8/rake.rb:2383:in `load'
/usr/lib/ruby/1.8/rake.rb:2383:in `raw_load_rakefile'
/usr/lib/ruby/1.8/rake.rb:2017:in `load_rakefile'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:2016:in `load_rakefile'
/usr/lib/ruby/1.8/rake.rb:2000:in `run'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1998:in `run'
/usr/bin/rake:28

I suspect it is something simple, like missing gem, but can't figure it out.

Any ideas?


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/XUL_3dTbJcgJ.
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 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] puppet-rspec / puppetlabs_spec_helper

2012-08-17 Thread Justin Stoller
On Fri, Aug 17, 2012 at 8:42 AM, llowder llowde...@gmail.com wrote:

 I am using puppet 2.7.14 on Ubuntu 10.04 LTS. I have the following gems:

 *** LOCAL GEMS ***

 diff-lcs (1.1.3)
 hiera (0.3.0)
 hiera-puppet (0.3.0)
 metaclass (0.0.1)
 mocha (0.12.1)
 puppet-lint (0.1.13)
 puppetlabs_spec_helper (0.2.0)
 rake (0.9.2.2)
 rspec (2.11.0)
 rspec-core (2.11.1)
 rspec-expectations (2.11.2)
 rspec-mocks (2.11.1)
 rspec-puppet (0.1.3)

 When I run rake help I get the following:

 $ sudo rake help --trace
 (in /etc/puppet/environments/test/modules/ruby)
 rake aborted!
 uninitialized constant Rake::DSL
 /usr/lib/ruby/1.8/rake.rb:2503:in `const_missing'
 /var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/tasklib.rb:8
 /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
 /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
 /var/lib/gems/1.8/gems/rspec-core-2.11.1/lib/rspec/core/rake_task.rb:4
 /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
 /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
 /var/lib/gems/1.8/gems/puppetlabs_spec_helper-0.2.0/lib/puppetlabs_spec_helper/rake_tasks.rb:2
 /usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
 /usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in `require'
 /etc/puppet/environments/test/modules/ruby/Rakefile:2
 /usr/lib/ruby/1.8/rake.rb:2383:in `load'
 /usr/lib/ruby/1.8/rake.rb:2383:in `raw_load_rakefile'
 /usr/lib/ruby/1.8/rake.rb:2017:in `load_rakefile'
 /usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
 /usr/lib/ruby/1.8/rake.rb:2016:in `load_rakefile'
 /usr/lib/ruby/1.8/rake.rb:2000:in `run'
 /usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
 /usr/lib/ruby/1.8/rake.rb:1998:in `run'
 /usr/bin/rake:28

 I suspect it is something simple, like missing gem, but can't figure it out.

This is RSpec using an old way of initializing Rake.
see: 
http://stackoverflow.com/questions/6085610/ruby-on-rails-and-rake-problems-uninitialized-constant-rakedsl
for more discussion and possible solutions.

Lemme know if that doesn't work for you.

HTH,
Justin

 Any ideas?


 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/puppet-users/-/XUL_3dTbJcgJ.
 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
 http://groups.google.com/group/puppet-users?hl=en.

-- 
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 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Job Listing - Linux Admin in Boulder, CO

2012-08-17 Thread Dan White
Is full time telecommuting an available option ?

“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)

- Original Message -
From: Guy Matz guym...@gmail.com
To: puppet-users@googlegroups.com
Sent: Friday, August 17, 2012 11:36:52 AM
Subject: [Puppet Users] Job Listing - Linux Admin in Boulder, CO

Anyone interested? 

Thanks, 
Guy 

guymatz at gmail 


-- 
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 
http://groups.google.com/group/puppet-users?hl=en. 

-- 
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 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] puppet-rspec / puppetlabs_spec_helper

2012-08-17 Thread llowder


On Friday, August 17, 2012 10:58:40 AM UTC-5, Justin Stoller wrote:


 This is RSpec using an old way of initializing Rake. 
 see: 
 http://stackoverflow.com/questions/6085610/ruby-on-rails-and-rake-problems-uninitialized-constant-rakedsl
  
 for more discussion and possible solutions. 

 Lemme know if that doesn't work for you. 


I had seen that prior to posting.  I have another test VM (which is where I 
copied the gems from) where it is working. It has a lot more gems installed 
due to some testing I did with foreman on that box. So I know that the 
version of the gems isn't the problem.

The other main difference between the two boxes is the puppet and ubuntu 
versions (the problem box is running 10.04 + 2.7.14, while the test Vm 
where it works is 12.04 + 2.7.17)

The Rakefile is the same on both boxes, and it is all done as per: 
http://puppetlabs.com/blog/the-next-generation-of-puppet-module-testing/


 

 HTH, 
 Justin 



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/HUyDseEekN0J.
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 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Job Listing - Linux Admin in Boulder, CO

2012-08-17 Thread Ashley Penney
More than that I think we should have a rule that if you want to post
a job listing you have to provide some kind of details about it!

On Fri, Aug 17, 2012 at 12:15 PM, Dan White y...@comcast.net wrote:
 Is full time telecommuting an available option ?

 “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)

 - Original Message -
 From: Guy Matz guym...@gmail.com
 To: puppet-users@googlegroups.com
 Sent: Friday, August 17, 2012 11:36:52 AM
 Subject: [Puppet Users] Job Listing - Linux Admin in Boulder, CO

 Anyone interested?

 Thanks,
 Guy

 guymatz at gmail


 --
 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 
 http://groups.google.com/group/puppet-users?hl=en.

 --
 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 
 http://groups.google.com/group/puppet-users?hl=en.


-- 
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 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Unless/Onlyif vs Subscribe/Refreshonly

2012-08-17 Thread Douglas Garstang
When chaining execs together, and wanting to ensure that exec
resources are not executed on every puppet run, which method is
better? Using unless/onlyif or subscribe/refreshonly?

With unless/onlyif, the exec is evaluated every time. With
subscribe/refreshonly, the exec is only executed when a dependent
resource changes

Doug.

-- 
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 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] puppet kick not working against windows service

2012-08-17 Thread Josh Cooper
Hi Matt,

On Fri, Aug 17, 2012 at 8:41 AM, Matt F mfan2...@gmail.com wrote:
 Thanks Nan! Do you know if windows support of -listen is planned for any
 future release? (it's not clear to me reading the bug that you referenced).

Minor clarification. Puppet supports --listen on Windows, i.e. when
executing `puppet agent --listen`. But not when installed as a service
using the daemon.rb wrapper (which is the out-of-the-box
configuration). The reasons for this are memory usage issues
associated with long running ruby processes[1], security implications
of a network server running as LocalSystem, etc.

So it is possible to change the Puppet Agent service to run
something different, but it's not something that I would encourage due
to the problems mentioned above.

The long term plan is to deprecate puppet kick[2] in favor of using
mcollective (mcollective 2.0 supports Windows)[3]. There is also an
executable installer[4] from the community.

HTH,
Josh

[1] http://projects.puppetlabs.com/issues/11044
[2] http://projects.puppetlabs.com/issues/15735
[3] http://projects.puppetlabs.com/issues/12555
[4] http://www.kermit.fr/documentation/mcollective/windows_install.html

-- 
Josh Cooper
Developer, Puppet Labs

-- 
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 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Class Naming Convention

2012-08-17 Thread Douglas Garstang
On Fri, Aug 17, 2012 at 12:52 AM, Denmat tu2bg...@gmail.com wrote:


 On 17/08/2012, at 17:19, Douglas Garstang doug.garst...@gmail.com wrote:

 On Thu, Aug 16, 2012 at 11:34 PM, Garrett Honeycutt
 garr...@puppetlabs.com wrote:
 On 8/16/12 10:44 PM, Douglas Garstang wrote:
 So, this has always puzzled me a bit. By convention, init.pp contains
 one class, named the same as the module. However, what is the
 convention when the module may have multiple external access points?
 Say you have a module called 'syslog' which provides both a client and
 a server class. I typically have used syslog::server and
 syslog::client. I've ended up using this convention more than init.pp
 because I don't know when I first put the class together exactly what
 it's going to do. In module mymodule, rather than create init.pp with
 class mymodule, I'll call it mymodule::base or something and stick it
 in base.pp. Confused...

 Doug


 Not all classes are meant to be directly included by nodes. A common
 practice would be having a module where you might have a base class,
 such as syslog and other sub classes, such as syslog::client and
 syslog::server. Class syslog would contain resources that were common to
 both syslog::client and syslog::server (ie: they both have a package and
 a config file). Both syslog::client and syslog::server might include (or
 possibly inherit) the syslog class. In this setup, a node might include
 syslog::server or syslog::client, but not syslog directly. When using
 this pattern, be sure to comment in your base class that it is not meant
 to be included directly.

 Garrett, thanks. Aware of all that, but I'm not sure you really answer
 my question. :)

 Doug.

 Well you can leave init.pp blank, ie,
 class name {
 }

 Then you can put whatever you like in the module's manifest dir.

 I tend to write 90% of modules with the following:
 name::config
 name::install
 name::service
 name::client
 name::server

 All of those refer to individual .pp files of course.

 Then something like:
 include name::server

I guess you would normally include ::client or ::server, and it would
in turn, include (inherit?) ::config, ::install and ::service?

Ie:

class foo::client {
include foo::config
include foo::install
include foo::service
}

If variables are defined in ::config, does that cause any issues with scope?

Doug.

-- 
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 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: Installing Java software on Windows using Puppet

2012-08-17 Thread Josh Cooper
Hi Adam

On Thu, Aug 16, 2012 at 3:19 PM, ad adam.denn...@gmail.com wrote:
 Jeff,

 Just to give you more ideas, and as someone who tends to reinvint wheels,
 what I do for this sort of thing on Windows is make custom types and use
 Ruby to handle download, unzip, md5, etc. Here's how a couple custom types I
 use look in a Puppet manifest:

 media_player_msi { 'ensure_msi_version':
 ensure  = present,
 version = $version,
 download_dir= $download_dir,
 schedule= 'msi_upgrades',
 require = Media_Player_Stage_Msi['ensure_msi_download'],
 notify  = Exec['reboot'],
 }

 I have a standardlib type module with generic functions for things like
 download, md5, etc. that are used in other custom types. Lacking a robust
 shell, tools, and package management on Windows, I find this approach
 cleaner than trying to ship binaries and use cmd.exe.


It would be great to get this on the forge, would you be willing to publish it?

 Also, check out Ruby's win32 stuff, or even just wmic. You may find working
 with MSI's easier this way than using the 2.7x type in Puppet.

Be careful with wmic and msi's. Simply enumerating the list of
installed products will cause wmi to perform a consistency check
across all installed products[1]. Probably not what you wanted!

I've made some improvements to the MSI package provider on Windows in
2.7.19[2] (currently in rc and will be out soon). It would be great
if you could give that a try.

Also, we'll have support for executable packages in 3.x[3].

And, Rich has a package provider using chocolately (a la apt-get for
windows)[4][5].

Josh

[1] http://gregramsey.net/2012/02/20/win32_product-is-evil/
[2] http://projects.puppetlabs.com/issues/11868
[3] http://projects.puppetlabs.com/issues/11870
[4] https://github.com/rismoney/puppet-chocolatey
[5] http://projects.puppetlabs.com/issues/15541

-- 
Josh Cooper
Developer, Puppet Labs

-- 
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 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Class Naming Convention

2012-08-17 Thread Douglas Garstang
On Fri, Aug 17, 2012 at 9:33 AM, Douglas Garstang
doug.garst...@gmail.com wrote:
 On Fri, Aug 17, 2012 at 12:52 AM, Denmat tu2bg...@gmail.com wrote:


 On 17/08/2012, at 17:19, Douglas Garstang doug.garst...@gmail.com wrote:

 On Thu, Aug 16, 2012 at 11:34 PM, Garrett Honeycutt
 garr...@puppetlabs.com wrote:
 On 8/16/12 10:44 PM, Douglas Garstang wrote:
 So, this has always puzzled me a bit. By convention, init.pp contains
 one class, named the same as the module. However, what is the
 convention when the module may have multiple external access points?
 Say you have a module called 'syslog' which provides both a client and
 a server class. I typically have used syslog::server and
 syslog::client. I've ended up using this convention more than init.pp
 because I don't know when I first put the class together exactly what
 it's going to do. In module mymodule, rather than create init.pp with
 class mymodule, I'll call it mymodule::base or something and stick it
 in base.pp. Confused...

 Doug


 Not all classes are meant to be directly included by nodes. A common
 practice would be having a module where you might have a base class,
 such as syslog and other sub classes, such as syslog::client and
 syslog::server. Class syslog would contain resources that were common to
 both syslog::client and syslog::server (ie: they both have a package and
 a config file). Both syslog::client and syslog::server might include (or
 possibly inherit) the syslog class. In this setup, a node might include
 syslog::server or syslog::client, but not syslog directly. When using
 this pattern, be sure to comment in your base class that it is not meant
 to be included directly.

 Garrett, thanks. Aware of all that, but I'm not sure you really answer
 my question. :)

 Doug.

 Well you can leave init.pp blank, ie,
 class name {
 }

 Then you can put whatever you like in the module's manifest dir.

 I tend to write 90% of modules with the following:
 name::config
 name::install
 name::service
 name::client
 name::server

 All of those refer to individual .pp files of course.

 Then something like:
 include name::server

 I guess you would normally include ::client or ::server, and it would
 in turn, include (inherit?) ::config, ::install and ::service?

 Ie:

 class foo::client {
 include foo::config
 include foo::install
 include foo::service
 }

 If variables are defined in ::config, does that cause any issues with scope?

So... I just gave this a try, and variables I defined in ::config have
gone out of scope in ::install. *sigh*

Doug.

-- 
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 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Determining the syslog provider

2012-08-17 Thread Julien Cornuwel
Hi,

Sorry for letting this thread die. I ended up enforcing rsyslog
everywhere and waiting for someone/something to complain. Turns out
noone/nothing complained and there wasn't any customisation after
all...

Regards,


2012/8/17 Jason Antman ja...@jasonantman.com:
 Julien,

 What did you end up doing for this? If you wrote a custom fact, would you be
 willing to share it? I've just come up against the identical problem
 (dealing with RHEL and CentOS 5-6 as well as SLES9) and was about to start
 work on a custom fact when I found this thread...

 Thanks for any code/suggestions,
 Jason Antman


 On 06/12/2012 08:12 AM, Julien C. wrote:

 Hi,

 I'm trying to make all my servers send their logs to a central server.
 Which seems quite simple, at first.

 My problem is that my servers are on different versions of different
 operating systems.
 And each of them has a different syslog default provider (syslog, rsyslog,
 syslog-ng...).
 Which of course might have been replaced by an admin who prefered
 another...
 Even funnier, SLES10 has its configuration in syslog-ng-conf.in and SLES11
 in syslog-ng.conf !

 How would you approach such a task ?

 Regards,
 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/puppet-users/-/Qy9c94L9SIgJ.
 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
 http://groups.google.com/group/puppet-users?hl=en.



-- 
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 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Class Naming Convention

2012-08-17 Thread llowder


On Friday, August 17, 2012 11:43:43 AM UTC-5, Douglas wrote:

  
  If variables are defined in ::config, does that cause any issues with 
 scope? 

 So... I just gave this a try, and variables I defined in ::config have 
 gone out of scope in ::install. *sigh* 


Of course they would.. you just have to fully qualify them. 
module::config::variable
 

 Doug. 


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/zs0cajDFH4kJ.
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 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] puppet-rspec / puppetlabs_spec_helper

2012-08-17 Thread llowder
Got this fixed, seems the new box had an old version of rake installed and 
when I did  gem install rake, it did not update the system bin.


On Friday, August 17, 2012 11:16:28 AM UTC-5, llowder wrote:



 On Friday, August 17, 2012 10:58:40 AM UTC-5, Justin Stoller wrote:


 This is RSpec using an old way of initializing Rake. 
 see: 
 http://stackoverflow.com/questions/6085610/ruby-on-rails-and-rake-problems-uninitialized-constant-rakedsl
  
 for more discussion and possible solutions. 

 Lemme know if that doesn't work for you. 


 I had seen that prior to posting.  I have another test VM (which is where 
 I copied the gems from) where it is working. It has a lot more gems 
 installed due to some testing I did with foreman on that box. So I know 
 that the version of the gems isn't the problem.

 The other main difference between the two boxes is the puppet and ubuntu 
 versions (the problem box is running 10.04 + 2.7.14, while the test Vm 
 where it works is 12.04 + 2.7.17)

 The Rakefile is the same on both boxes, and it is all done as per: 
 http://puppetlabs.com/blog/the-next-generation-of-puppet-module-testing/


  

 HTH, 
 Justin 



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/NZWcfy4ZaHcJ.
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 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Hiera, Hashes, and Create_resources

2012-08-17 Thread Darryl Wisneski
Howdy:

I need some help please to get hiera configuration data derived
from YAML, thru puppet.  I have studied Internet search results and
puppet documentation on create_resources and custom defines but
need a little help along.  I can print out the YAML from variables,
arrays, and, finally, hashes too from a puppet manifest.

One thing that is stumping me is how to access from the custom
define only the YAML element of server-a which is I believe is an
object of an array of hashes as I have the YAML laid out.  

When I run this on client host server-a against the manifest this prints out in 
the log:

Aug 17 12:59:09 puppet puppet-master[67407]: (Scope(Sshd_lookup[server-a])) 
setting sshd_type:  local
Aug 17 12:59:09 puppet puppet-master[67407]: (Scope(Sshd_lookup[server-b])) 
setting sshd_type:  local
Aug 17 12:59:09 puppet puppet-master[67407]: (Scope(Sshd_lookup[server-c])) 
setting sshd_type:  local
Aug 17 12:59:09 puppet puppet-master[67407]: (Scope(Sshd_lookup[server-d])) 
setting sshd_type:  local

I want it to print out just server-a's value.  How do I do that?
Also, interestingly, it printed out each of the server names (keys?)
in the hash but the value of the server-a's sshd_auth entry.

My YAML, puppet manifest and error follow.

# cat common.yaml 
---
searchdomain: 'example.com'
ssh_auth: ldap
servers :
  server-a   :
sshd_auth: local
ClientAliveInterval: nil
ClientAliveCountMax: nil
  server-b   :
sshd_auth: local
ClientAliveInterval: nil
ClientAliveCountMax: nil
  server-c   :
sshd_auth: ldap
ClientAliveInterval: nil
ClientAliveCountMax: nil
  server-d   :
sshd_auth: ldap
ClientAliveInterval: 10
ClientAliveCountMax: 3


# cat ../hiera.yaml
---
:backends: 
 - yaml

:logger: console

:hierarchy: 
 - %{hostname}
 - common

:yaml:
 :datadir: /usr/local/etc/puppet/hieradata



# cat Inuit.pp
class user {
$sshd_hash = hiera(servers)
create_resources('sshd_lookup', $sshd_hash)

}

   define sshd_lookup ( $sshd_auth, $ClientAliveInterval, $ClientAliveCountMax,
$server_role, $location ) {

$data = hiera_hash('servers')
$sshd_type = $data[$hostname]['sshd_auth']

notice (setting sshd_type:  $sshd_type )

}


Thanks,
Regards,
-dkw

-- 
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 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: brew and macosx and puppet

2012-08-17 Thread kegstand
I figured out how to get puppet to install nginx through the puppet
provider without running it as root.

someone on IRC suggested I add logoutput = on_failure

exec { brew_install_nginx:
command = /usr/local/bin/brew install nginx,
creates = /usr/local/sbin/nginx,
logoutput = on_failure,
path=
/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/Library/Aliases,
user = push,
}

which gave me lots of handy error output.

thanks IRC.


On Fri, Aug 17, 2012 at 12:38 AM, Daniele Sluijters 
daniele.sluijt...@gmail.com wrote:

 Hello,

 The problem is that you're running 'brew install nginx' as root, since
 Puppet runs as root.

 If you run that command as root on a console it will tell you:

 9:35:11 r...@chell.portal.daenney.net ~ brew install nginx
 Cowardly refusing to `sudo brew install'

 And it exists with an exitcode of:
 9:35:14 r...@chell.portal.daenney.net ~ echo $?
 1 ↵
 1

 So, unless you can run that command as the actual user that owns the brew
 installation this just won't work.

 --
 Daniele Sluijters

 On Friday, 17 August 2012 09:20:53 UTC+2, Dan wrote:

 any hints on installing a package through the 'brew' provider on macosx?

 code:

 exec { brew_install_nginx:
 command = /usr/local/bin/brew install nginx,
 creates = /usr/local/sbin/nginx,
 path= /usr/local/sbin:/usr/local/**bin:/usr/sbin:/usr/bin,
 user = push,
 }

 brew install nginx works from the command line, outside of puppet

 output:

 $ ls /usr/local/sbin/nginx
 ls: /usr/local/sbin/nginx: No such file or directory
 $ /opt/bin/contact_puppet_**server.sh
 info: Retrieving plugin
 info: Caching catalog for dev.push.am
 info: Applying configuration version '1345186944'
 err: /Stage[main]/Nginx::Install/**Exec[brew_install_nginx]/**returns:
 change from notrun to 0 failed: /usr/local/bin/brew install nginx returned
 1 instead of one of [0] at 
 /etc/puppet/modules/nginx/**manifests/install.pp:23


  --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/puppet-users/-/9Ox-OD1_m8QJ.
 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
 http://groups.google.com/group/puppet-users?hl=en.


-- 
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 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Installing Java software on Windows using Puppet

2012-08-17 Thread ad


 Hey Josh,

 On Friday, August 17, 2012 11:38:08 AM UTC-5, Josh Cooper wrote:

  I have a standardlib type module with generic functions for things like 
  download, md5, etc. that are used in other custom types. Lacking a 
 robust 
  shell, tools, and package management on Windows, I find this approach 
  cleaner than trying to ship binaries and use cmd.exe. 

  It would be great to get this on the forge, would you be willing to 
 publish it? 

 It needs some refactoring to get company specific stuff out right now, but 
 sure I'll try to make time to do that.

  Also, check out Ruby's win32 stuff, or even just wmic. You may find 
 working 
  with MSI's easier this way than using the 2.7x type in Puppet. 

  Be careful with wmic and msi's. Simply enumerating the list of 
  installed products will cause wmi to perform a consistency check 
  across all installed products[1]. Probably not what you wanted! 

 Yeah I know, it's crazy! This is why I get product versions from 
 HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall instead.

  I've made some improvements to the MSI package provider on Windows in 
  2.7.19[2] (currently in rc and will be out soon). It would be great 
  if you could give that a try. 

  Also, we'll have support for executable packages in 3.x[3]. 

 Awesome, I'll check it out soon, thanks.

  And, Rich has a package provider using chocolately (a la apt-get for 
  windows)[4][5]. 

 I hadn't even heard of chocolately before, thanks, good stuff.

 Regards,

 Adam



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/P3qR8gi9n_4J.
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 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: Getting all variable occurrences from Hiera

2012-08-17 Thread Tim Mooney

In regard to: [Puppet Users] Re: Getting all variable occurrences from...:


That yaml file should keep alle the specific params of that host. and
every other module should be able to take advantage of that information.
This is not only the case for dhcp, but for dns as well. and of course the
/etc/network/interfaces file of the host itself.

And to avoid needless redundancy of information, certain values should be
written into that file maximum once. so, the ipaddress for example must not
be written in some dns config yaml file as well. and in the hostname.yaml.
Should you decide to change the ipaddress, you definitely forget either the
bind or the dhcp config.



Certainly data duplication should be avoided, and that could be aided by
putting all information for each host into a single hash for that host.
Those per-host hashes could equally well (for this purpose) appear in
separate YAML files or all together as values in a larger hash in one YAML
file.


Agreed, for the original case.

However, the original suggestion matches closely with an issue I've run
into as well, which also had me thinking that something like hiera_all
(I was thinking it should be hiera_merge) would be needed.

Consider:

:hierarchy: - secure/fqdn/%{clientcert}
- fqdn/%{clientcert}
- secure/location/%{location}
- location/%{location}
- secure/common
- common


common.yaml:
---
ntp:
  type: client
  servers:
- 10.0.0.1
- 10.0.0.2

location/datacenter1.yaml:
ntp:
  servers:
- 10.1.0.101
- 10.1.0.102

fqdn/clock1.example.com.yaml:
ntp:
  type: server




Hopefully, the intent is relatively clear: the defaults for all systems
are to be an ntp client and to use ntp servers with the IP addresses from
the common.yaml, however everyone in location=datacenter1 should have
the list of servers overridden, and the one system with
fqdn=clock1.example.com should have its type=server.

As hiera currently works, I don't believe there's any way to merge these
types of nested data from multiple sources in the hierarchy.  If I try
lookup ntp['type'] for any of the systems in location=datacenter1, it
will be empty, because type is not specified (duplicated) for the
location/datacenter1.yaml.

Because of this, what ends up happening is that you instead need to use
a flat namespace, so you design things like this

common.yaml:
ntp_type: client
ntp_servers:
  - 10.0.0.1
  - 10.0.0.2

location/datacenter1.yaml:
ntp_servers:
  - 10.1.0.101
  - 10.1.0.102

fqdn/clock1.example.com.yaml:
ntp_type: server


As I've said before on the list, this strikes me as a bit unnatural.

Tim
--
Tim Mooney tim.moo...@ndsu.edu
Enterprise Computing  Infrastructure  701-231-1076 (Voice)
Room 242-J6, IACC Building 701-231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164

--
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 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Override a file{} directive - is it possible?

2012-08-17 Thread Sean Carolan
Maybe one of you can help with this.  I have a class that's got a
file{} type directive in it.  It populates /etc/security/limits.conf
with specific settings.  I have a small handful of hosts where we want
to manage /etc/security/limits.conf manually.  Is there a simple way
to tell puppet to exclude this file type just on those hosts, without
copying the entire class?

-- 
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 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: Installing Java software on Windows using Puppet

2012-08-17 Thread Josh Cooper
Hi Adam,

On Fri, Aug 17, 2012 at 11:27 AM, ad adam.denn...@gmail.com wrote:
 Hey Josh,

 On Friday, August 17, 2012 11:38:08 AM UTC-5, Josh Cooper wrote:

  I have a standardlib type module with generic functions for things like
  download, md5, etc. that are used in other custom types. Lacking a
  robust
  shell, tools, and package management on Windows, I find this approach
  cleaner than trying to ship binaries and use cmd.exe.

  It would be great to get this on the forge, would you be willing to
  publish it?

 It needs some refactoring to get company specific stuff out right now, but
 sure I'll try to make time to do that.

Awesome, thanks!

  Also, check out Ruby's win32 stuff, or even just wmic. You may find
  working
  with MSI's easier this way than using the 2.7x type in Puppet.

  Be careful with wmic and msi's. Simply enumerating the list of
  installed products will cause wmi to perform a consistency check
  across all installed products[1]. Probably not what you wanted!

 Yeah I know, it's crazy! This is why I get product versions from
 HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall instead.

This is the same approach I'm using in 3.x, including handling
registry redirection for 32 vs 64 bit apps:

https://github.com/puppetlabs/puppet/blob/3.x/lib/puppet/provider/package/windows/package.rb#L32

Josh

-- 
Josh Cooper
Developer, Puppet Labs

-- 
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 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Unless/Onlyif vs Subscribe/Refreshonly

2012-08-17 Thread jcbollinger


On Friday, August 17, 2012 11:23:46 AM UTC-5, Douglas wrote:

 When chaining execs together, and wanting to ensure that exec 
 resources are not executed on every puppet run, which method is 
 better? Using unless/onlyif or subscribe/refreshonly? 

 With unless/onlyif, the exec is evaluated every time. With 
 subscribe/refreshonly, the exec is only executed when a dependent 
 resource changes 



Neither mechanism is better than the other in any general sense.  They 
serve different purposes, and it is uncommon that both are applicable to 
any given configuration objective.

The 'unless' and 'onlyif' (and 'creates') parameters serve as means for an 
Exec to determine whether it is already in sync.  If it is, then its 
command will not be run, in the same way that a File that is already in 
sync will not redundantly download its content.  This should also have 
implications for reports, etc..  The 'unless' and/or 'ifonly' commands must 
run every time, though.

The 'refreshonly' parameter, on the other hand, makes application of the 
Exec conditional on (and subsequent to) one or more other resources 
changing, sort of like an 'on update' trigger in a database.

In any given case, you should use whichever approach makes sense.


John

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/ogvL-ymc10sJ.
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 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Job Listing - Linux Admin in Boulder, CO

2012-08-17 Thread Guy Matz
It's not a telecommute position.  No relocation possible.  Sorry for having
not been explicit about that.

And sorry for not giving more details earlier.  The job is for a senior
RedHat Linux DevOps, WWW Admin, NetApp, VMware, etc.

Thanks,
Guy

On Fri, Aug 17, 2012 at 11:36 AM, Guy Matz guym...@gmail.com wrote:

 Anyone interested?

 Thanks,
 Guy

 guymatz at gmail


-- 
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 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: Unless/Onlyif vs Subscribe/Refreshonly

2012-08-17 Thread Douglas Garstang
On Fri, Aug 17, 2012 at 2:01 PM, jcbollinger john.bollin...@stjude.org wrote:


 On Friday, August 17, 2012 11:23:46 AM UTC-5, Douglas wrote:

 When chaining execs together, and wanting to ensure that exec
 resources are not executed on every puppet run, which method is
 better? Using unless/onlyif or subscribe/refreshonly?

 With unless/onlyif, the exec is evaluated every time. With
 subscribe/refreshonly, the exec is only executed when a dependent
 resource changes



 Neither mechanism is better than the other in any general sense.  They serve
 different purposes, and it is uncommon that both are applicable to any given
 configuration objective.

 The 'unless' and 'onlyif' (and 'creates') parameters serve as means for an
 Exec to determine whether it is already in sync.  If it is, then its command
 will not be run, in the same way that a File that is already in sync will
 not redundantly download its content.  This should also have implications
 for reports, etc..  The 'unless' and/or 'ifonly' commands must run every
 time, though.

 The 'refreshonly' parameter, on the other hand, makes application of the
 Exec conditional on (and subsequent to) one or more other resources
 changing, sort of like an 'on update' trigger in a database.

 In any given case, you should use whichever approach makes sense.

I think...and I might be wrong because I'm a little sleep deprived
today, that it seems like you just said the same thing twice...

Doug.

-- 
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 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Default node

2012-08-17 Thread Douglas Garstang
Seems like nodes are matching the default node before they are
matching the more specific nodes. My site.pp has:

include nodes/*.pp

In the nodes directory are two files, default.pp and nagios_server.pp.

default.pp:
node default {
include role::common
}

nagios_server.pp:
node 'mon01.us1.xxx.com' {
$node_env = production
include nagios::plugins
include nagios::server
}

Puppet is finding the default on mon01.us1.xxx.com. If I comment out
the lines in default.pp, it goes to mon01.us1.bitcasa.com. Shouldn't
it use the default node last?

Doug.

-- 
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 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Class Naming Convention

2012-08-17 Thread Garrett Honeycutt
On 8/17/12 9:43 AM, Douglas Garstang wrote:
 On Fri, Aug 17, 2012 at 9:33 AM, Douglas Garstang
 doug.garst...@gmail.com wrote:
 On Fri, Aug 17, 2012 at 12:52 AM, Denmat tu2bg...@gmail.com wrote:


 On 17/08/2012, at 17:19, Douglas Garstang doug.garst...@gmail.com wrote:

 On Thu, Aug 16, 2012 at 11:34 PM, Garrett Honeycutt
 garr...@puppetlabs.com wrote:
 On 8/16/12 10:44 PM, Douglas Garstang wrote:
 So, this has always puzzled me a bit. By convention, init.pp contains
 one class, named the same as the module. However, what is the
 convention when the module may have multiple external access points?
 Say you have a module called 'syslog' which provides both a client and
 a server class. I typically have used syslog::server and
 syslog::client. I've ended up using this convention more than init.pp
 because I don't know when I first put the class together exactly what
 it's going to do. In module mymodule, rather than create init.pp with
 class mymodule, I'll call it mymodule::base or something and stick it
 in base.pp. Confused...

 Doug


 Not all classes are meant to be directly included by nodes. A common
 practice would be having a module where you might have a base class,
 such as syslog and other sub classes, such as syslog::client and
 syslog::server. Class syslog would contain resources that were common to
 both syslog::client and syslog::server (ie: they both have a package and
 a config file). Both syslog::client and syslog::server might include (or
 possibly inherit) the syslog class. In this setup, a node might include
 syslog::server or syslog::client, but not syslog directly. When using
 this pattern, be sure to comment in your base class that it is not meant
 to be included directly.

 Garrett, thanks. Aware of all that, but I'm not sure you really answer
 my question. :)

 Doug.

 Well you can leave init.pp blank, ie,
 class name {
 }

 Then you can put whatever you like in the module's manifest dir.

 I tend to write 90% of modules with the following:
 name::config
 name::install
 name::service
 name::client
 name::server

 All of those refer to individual .pp files of course.

 Then something like:
 include name::server

 I guess you would normally include ::client or ::server, and it would
 in turn, include (inherit?) ::config, ::install and ::service?

 Ie:

 class foo::client {
 include foo::config
 include foo::install
 include foo::service
 }

 If variables are defined in ::config, does that cause any issues with scope?
 
 So... I just gave this a try, and variables I defined in ::config have
 gone out of scope in ::install. *sigh*
 
 Doug.
 

I would be careful of using imperative terms such as install, configure,
build..

Puppet ensures state, so these words can be misleading.

-g

-- 
Garrett Honeycutt

206.414.8658
http://puppetlabs.com

-- 
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 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Default node

2012-08-17 Thread Garrett Honeycutt
On 8/17/12 2:27 PM, Douglas Garstang wrote:
 Seems like nodes are matching the default node before they are
 matching the more specific nodes. My site.pp has:
 
 include nodes/*.pp
 
 In the nodes directory are two files, default.pp and nagios_server.pp.
 
 default.pp:
 node default {
 include role::common
 }
 
 nagios_server.pp:
 node 'mon01.us1.xxx.com' {
 $node_env = production
 include nagios::plugins
 include nagios::server
 }
 
 Puppet is finding the default on mon01.us1.xxx.com. If I comment out
 the lines in default.pp, it goes to mon01.us1.bitcasa.com. Shouldn't
 it use the default node last?
 
 Doug.
 

Not directly answering your question here, though I wanted to share this
with everyone. If you use a manifest to contain your node
classification, they should all be in the site.pp without an import
statement. Some time ago we saw a slow down around two orders of
magnitude by having to deal with a ton of files caused by one file per node.

-g

-- 
Garrett Honeycutt

206.414.8658
http://puppetlabs.com

-- 
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 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Hiera, Hashes, and Create_resources

2012-08-17 Thread jcbollinger


On Friday, August 17, 2012 12:08:41 PM UTC-5, dkw wrote:

 Howdy: 

 I need some help please to get hiera configuration data derived 
 from YAML, thru puppet.  I have studied Internet search results and 
 puppet documentation on create_resources and custom defines but 
 need a little help along.  I can print out the YAML from variables, 
 arrays, and, finally, hashes too from a puppet manifest. 

 One thing that is stumping me is how to access from the custom 
 define only the YAML element of server-a which is I believe is an 
 object of an array of hashes as I have the YAML laid out.   

 When I run this on client host server-a against the manifest this prints 
 out in the log: 

 Aug 17 12:59:09 puppet puppet-master[67407]: 
 (Scope(Sshd_lookup[server-a])) setting sshd_type:  local 
 Aug 17 12:59:09 puppet puppet-master[67407]: 
 (Scope(Sshd_lookup[server-b])) setting sshd_type:  local 
 Aug 17 12:59:09 puppet puppet-master[67407]: 
 (Scope(Sshd_lookup[server-c])) setting sshd_type:  local 
 Aug 17 12:59:09 puppet puppet-master[67407]: 
 (Scope(Sshd_lookup[server-d])) setting sshd_type:  local 

 I want it to print out just server-a's value.  How do I do that? 



Your focus on what is printed to the log is a bit confusing.  To the extent 
that you are using the log output to track what Puppet is doing it's fine, 
but if your main objective is to extract data from YAML then there are far, 
*far* less convoluted ways to go about it.

 

 Also, interestingly, it printed out each of the server names (keys?) 
 in the hash but the value of the server-a's sshd_auth entry. 



Not that interesting, really.  Puppet is just doing what you told it to 
do.  See below.

 


 My YAML, puppet manifest and error follow. 

 # cat common.yaml 
 --- 
 searchdomain: 'example.com' 
 ssh_auth: ldap 
 servers : 
   server-a   : 
 sshd_auth: local 
 ClientAliveInterval: nil 
 ClientAliveCountMax: nil 
   server-b   : 
 sshd_auth: local 
 ClientAliveInterval: nil 
 ClientAliveCountMax: nil 
   server-c   : 
 sshd_auth: ldap 
 ClientAliveInterval: nil 
 ClientAliveCountMax: nil 
   server-d   : 
 sshd_auth: ldap 
 ClientAliveInterval: 10 
 ClientAliveCountMax: 3 


[...]
 


 # cat Inuit.pp 
 class user { 
 $sshd_hash = hiera(servers) 
 create_resources('sshd_lookup', $sshd_hash) 


In answer to your first question, about declaring only an sshd_lookup 
resource for server-a, you apparently have a key misunderstanding about 
create_resources().  That function creates one resource of the specified 
type for *each* top-level key in the provided hash.  The keys are used as 
the resource titles, and the values are hashes of parameter key/value pairs 
for the corresponding resource instance.

If you only want an sshd_lookup resource for server-a, then either you must 
feed it a hash containing only an entry for server-a, or else you must 
declare the sshd_lookup in the conventional way.  For example, instead of 
the create_resources() call above, use:

$server_a_params = $sshd_hash['server-a']
sshd_lookup { 'server-a':
  sshd_auth = $server_a_params['sshd_auth'],
  ClientAliveInterval = $server_a_params['ClientAliveInterval'],
  ClientAliveCountMax = $server_a_params['ClientAliveCountMax']
}

Alternatively, you could construct a single-entry hash of hashes of the 
correct form for create_resources(); I leave that as an exercise.
 


 } 

define sshd_lookup ( $sshd_auth, $ClientAliveInterval, 
 $ClientAliveCountMax, 
 $server_role, $location ) { 

 $data = hiera_hash('servers') 
 $sshd_type = $data[$hostname]['sshd_auth'] 


There, you are looking up an entry in the hash by the $hostname of the 
client for which you are compiling the catalog.  For any given node, that 
will result in the same piece of data for every sshd_lookup instance.

If you want the value appropriate for the current resource instance then 
you can either add $sshd_type to the parameter list (since you are 
otherwise just re-reading the same data that you passed to 
create_resources()), or else use $name or $title (they are equivalent in 
this context) to look up the desired entry in the outer hash.  ($name and 
$title in a type definition refer to the title of the resource instance).

 


 notice (setting sshd_type:  $sshd_type ) 

 } 


Does that help?


John

 

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/5Iak2tlXMq8J.
To post to this group, send email to puppet-users@googlegroups.com.
To 

[Puppet Users] How to handle ib_logfile size parameter in MySQL

2012-08-17 Thread Byron Appelt
I am trying to use puppet to create and manage mysql instances running 
under Ubuntu, probably using the puppetlabs-mysql module.

I am running into the issue that if you change the innodb_log_file_size 
parameter, mysql will complain and fail to start unless you delete the 
existing ib_logfiles before restarting mysql. 

I am mainly concerned about getting mysql running after an initial install. 
I don't expect to change this paramater much, if at all, after that. 
However, since the debian package starts on install, it is already running 
before I can write the config file containing the innodb_log_file_size. 

I have only been able to think of inelegant and probably dangerous ways to 
deal with this. Has anyone come up with a solution for this? 


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/qGikSlTIinQJ.
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 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Installing Java software on Windows using Puppet

2012-08-17 Thread Jeff Sussna
Hmm..it appears that $::path is returning multiple copies of the Puppet 
paths, along with /user/bin (which as you can imagine causes problems for 
Windows), in addition to the explicitly defined PATH string. Any idea why?


On Thursday, August 16, 2012 2:44:16 PM UTC-5, Jeff Sussna wrote:

 I want to use Puppet to manage Groovy and Gradle on Windows machines. The 
 install process for each looks like:

 1. Download zip file from a URL
 2. Unzip 
 3. Create a Windows environment variable to point to the location where 
 you unzipped
 4. Add that environment variable/bin to the global PATH environment 
 variable.

 As far as I can Puppet for Windows supports none of these actions. I'm 
 guessing I have to write a .bat script to call from Puppet? Any plans on 
 adding support for these seemingly common actions?



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/XaJ6opR1ZdgJ.
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 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Hiera, Hashes, and Create_resources

2012-08-17 Thread llowder


On Friday, August 17, 2012 4:36:13 PM UTC-5, jcbollinger wrote:


 snip

 Does that help?


I don't know how  much it will help the OP, but this has been a great help 
to me. I've never quite been able to figure out the create_resource thing, 
but I think I understand it now and what I was doing wrong.
Thank you.
 


 John

  


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/zjYazVmQURcJ.
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 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] configuring stomp client with authentication

2012-08-17 Thread Miles Monteleone
I'm trying to configure my puppetmaster to use activemq for message 
queueing. ActiveMQ is installed on the same machine as puppet-server and is 
being used for MCollective. Since I am requiring authentication for 
MCollective, I need to set a username/password in puppet.conf. I do not see 
any parameters that control this, but I found this entry in the puppet.conf 
man page:

*queue_source *

*Which type of queue to use for asynchronous processing. If your stomp 
server requires authentication, you can include it in the URI as long as 
your stomp client library is at least 1.1.1*

How do I include auth in the stomp URI?

Also, suppose I want to not have auth for the local puppet stomp 
connection. Can I turn that off in the activemq config? I couldn't find a 
way to do it :(


Thanks

-Miles

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/o-O2qg7uzcoJ.
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 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Override a file{} directive - is it possible?

2012-08-17 Thread Tim Mooney

In regard to: [Puppet Users] Override a file{} directive - is it possible?,...:


Maybe one of you can help with this.  I have a class that's got a
file{} type directive in it.  It populates /etc/security/limits.conf
with specific settings.  I have a small handful of hosts where we want
to manage /etc/security/limits.conf manually.  Is there a simple way
to tell puppet to exclude this file type just on those hosts, without
copying the entire class?


Is there a way that puppet can detect these particular hosts?  For
example, is it true for all hosts that are in a particular datacenter,
or for which some class (or even user) is present?

I ask, because the way you would typically do what you're asking is to
either use facts about systems to trigger the don't manage
/etc/security/limits.conf logic, or to have your manifests key on
external configuration that you keep in something like extlookup(),
hiera(), or your ENC (external node classifier).

So, there are several ways to accomplish what you're looking for, but
which one is best depends on your needs and how you actually detect that
hostB shouldn't have limits.conf managed.

You don't say what version of puppet you're using, whether you're using
an ENC, or whether you're already using either extlookup() or hiera(),
so it's really difficult to suggest something that integrates well with
your current environment.

I can give you two examples from my environment, though.

We're using puppet 2.7.14 without an ENC (we have dashboard but don't
use it for ENC purposes), but we are using hiera.  The absolute easiest
way (but likely *not* best) way to do this would be to do this with
a hiera setting like:

common.yaml:
---
manage_limits_conf: 'yes'


host1.example.com.yaml:
---
manage_limits_conf: 'no'


and then in your manifest that sets up limits.conf, just wrap with the
appropriate logic to check hiera() whether it should be managed or not.


A second example would be if you have a fact (probably a custom fact)
that could be used to determine the exact set of systems for which
limits.conf should not be managed.  For example, we have a custom fact
(location) that returns the name of the datacenter a system is located in.
If you wanted all the systems in location=datacenter1 to not manage
limits.conf, then you could wrap your file{} resource in a conditional
that tests the fact.

Certainly vague answers to your question, but hopefully this gives you
something to go on.  If it's not enough to go on, provide more information
about your environment.  That will hopefully make it easier for someone to
suggest a method that works well for your environment.

Tim
--
Tim Mooney tim.moo...@ndsu.edu
Enterprise Computing  Infrastructure  701-231-1076 (Voice)
Room 242-J6, IACC Building 701-231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164

--
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 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Override a file{} directive - is it possible?

2012-08-17 Thread Sean Carolan
 You don't say what version of puppet you're using, whether you're using
 an ENC, or whether you're already using either extlookup() or hiera(),
 so it's really difficult to suggest something that integrates well with
 your current environment.

Sorry I didn't provide more detail.  We're using puppet 2.6.13.  We
have a single *.pp config file for each and every host, so specifying
additional classes is not hard to do on a host-per-host basis.  Here's
the limits.conf config from the class that has been applied to these
hosts:

file { /etc/security/limits.conf:
   owner   = root,
   group   = root,
   mode= 644,
   content = 
#domain\t\ttype\t\titem\t\tvalue\n*\t\t-\t\tnofile\t\t65000\n*\t\t-\t\tnproc\t\t14\n*\t\thard\t\tcore\t\tunlimited\ncdc-dev\t\t-\t\tpriority\t\t15\nhtc\t\t-\t\tnofile\t\t25\n;
}

Basically I just want this file type to not be active on three
hosts.  I don't need to be able to detect the hosts, as I can specify
the config manually in each of their config files.

-- 
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 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Job Listing - Linux Admin in Boulder, CO

2012-08-17 Thread joe
If I lived on that side of town, I'd be interested, but where I live now 
that commute would be terrible.

On Friday, August 17, 2012 3:13:54 PM UTC-6, guymatz wrote:

 It's not a telecommute position.  No relocation possible.  Sorry for 
 having not been explicit about that.

 And sorry for not giving more details earlier.  The job is for a senior 
 RedHat Linux DevOps, WWW Admin, NetApp, VMware, etc.

 Thanks,
 Guy

 On Fri, Aug 17, 2012 at 11:36 AM, Guy Matz guy...@gmail.com javascript:
  wrote:

 Anyone interested?

 Thanks,
 Guy 

 guymatz at gmail




-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/IXzD2XIV-ooJ.
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 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] How to modify client authentication in passenger based puppet master behind ssl proxy

2012-08-17 Thread opoplawski
I've configured our DMZ apache webserver to proxy connections from our 
roaming users into our internal puppet master running under 
passenger/apache.  Everything is pretty much working but because I am using 
SSL between the proxy server and the puppet master, the master treats the 
connection as authenticated as the proxy.  My current work around is to 
allow access to all catalog and node items to the proxy server in 
auth.conf.  I'd like to try to get the master to use the ssl authentication 
information passed by the proxy as the authentication for the connection 
but so far have been completely unsuccessful.  Does anyone know how this 
can be done?  I've been poking around the code a bit but I haven't been 
able to find out where the authenticated host information comes from, and 
I've unable to modify anything in the apache configuration to change this.

TIA,

 Orion

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/o_ybNHvek7AJ.
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 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: Installing Java software on Windows using Puppet

2012-08-17 Thread Josh Cooper
On Fri, Aug 17, 2012 at 2:38 PM, Jeff Sussna j...@ingineering.it wrote:
 Hmm..it appears that $::path is returning multiple copies of the Puppet
 paths, along with /user/bin (which as you can imagine causes problems for
 Windows), in addition to the explicitly defined PATH string. Any idea why?


So I get:

C:\work\puppet envpuppet puppet apply -e notice($::path)
notice: Scope(Class[main]):
c:\work\puppet\ext\..\bin;c:\work\puppet\ext\..\..\facter\bin;c:\puppetwinbuilder\sys\ruby\bin;c:\ruby187\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\bin;c:\puppetwinbuilder\sys\git\bin;c:\puppetwinbuilder\sys\git\bin;C:\Chocolatey\bin;c:\work\puppet\ext;/usr/sbin;/sbin

The `:path` setting is populated from the environment, but we also add
in /usr/sbin and /sbin (in defaults.rb), obviously not helpful. Filed
as https://projects.puppetlabs.com/issues/16019. With that said it
shouldn't prevent the exec from working.

You can do something like the following to see how puppet resolves
which cmd.exe to run:

C:\work\puppetenvpuppet irb
irb(main):001:0 require 'puppet'
= true
irb(main):002:0 Puppet::Util.which('cmd.exe')
= C:/Windows/system32/cmd.exe

Or is it not finding reg.exe?

Josh

-- 
Josh Cooper
Developer, Puppet Labs

-- 
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 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Default node

2012-08-17 Thread Stuart Cracraft
Doug: I hope you are wrong about that as it would be a bad non-explicit, very 
Ruby-like choice of indirectness
for controlling and detailing what should be plain-and-simple and Iowa-like.

Stuart

On Aug 17, 2012, at 2:27 PM, Douglas Garstang doug.garst...@gmail.com wrote:

 Seems like nodes are matching the default node before they are
 matching the more specific nodes. My site.pp has:
 
 include nodes/*.pp
 
 In the nodes directory are two files, default.pp and nagios_server.pp.
 
 default.pp:
 node default {
include role::common
 }
 
 nagios_server.pp:
 node 'mon01.us1.xxx.com' {
$node_env = production
include nagios::plugins
include nagios::server
 }
 
 Puppet is finding the default on mon01.us1.xxx.com. If I comment out
 the lines in default.pp, it goes to mon01.us1.bitcasa.com. Shouldn't
 it use the default node last?
 
 Doug.
 
 -- 
 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 
 http://groups.google.com/group/puppet-users?hl=en.
 

-- 
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 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Default node

2012-08-17 Thread Douglas Garstang
Totally lost.

On Fri, Aug 17, 2012 at 5:47 PM, Stuart Cracraft smcracr...@me.com wrote:
 Doug: I hope you are wrong about that as it would be a bad non-explicit, very 
 Ruby-like choice of indirectness
 for controlling and detailing what should be plain-and-simple and Iowa-like.

 Stuart

 On Aug 17, 2012, at 2:27 PM, Douglas Garstang doug.garst...@gmail.com wrote:

 Seems like nodes are matching the default node before they are
 matching the more specific nodes. My site.pp has:

 include nodes/*.pp

 In the nodes directory are two files, default.pp and nagios_server.pp.

 default.pp:
 node default {
include role::common
 }

 nagios_server.pp:
 node 'mon01.us1.xxx.com' {
$node_env = production
include nagios::plugins
include nagios::server
 }

 Puppet is finding the default on mon01.us1.xxx.com. If I comment out
 the lines in default.pp, it goes to mon01.us1.bitcasa.com. Shouldn't
 it use the default node last?

 Doug.

 --
 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 
 http://groups.google.com/group/puppet-users?hl=en.


 --
 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 
 http://groups.google.com/group/puppet-users?hl=en.




-- 
Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garst...@gmail.com
Cell: +1-805-340-5627

-- 
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 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] don't push out facter-1.6.11 without testing ; causes puppetd hang

2012-08-17 Thread Jo Rhett
At least on CentOS 5 and CentOS 6, after upgrading to facter 1.6.11 our hosts 
stopped checking in. Stale puppetdlock problem.

-- 
Jo Rhett
Net Consonance : net philanthropy to improve open source and internet projects.



-- 
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 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] don't push out facter-1.6.11 without testing ; causes puppetd hang

2012-08-17 Thread Stuart Cracraft
Can you kick them somehow?

On Aug 17, 2012, at 5:50 PM, Jo Rhett jrh...@netconsonance.com wrote:

 At least on CentOS 5 and CentOS 6, after upgrading to facter 1.6.11 our hosts 
 stopped checking in. Stale puppetdlock problem.
 
 -- 
 Jo Rhett
 Net Consonance : net philanthropy to improve open source and internet 
 projects.
 
 
 
 
 -- 
 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 
 http://groups.google.com/group/puppet-users?hl=en.

-- 
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 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Difference between puppet agent and puppetd

2012-08-17 Thread Stuart Cracraft
I hope the rapidity of change and the quest for newness doesn't render the 
product less stable and predictable.

On Aug 17, 2012, at 4:12 AM, Paul Tötterman paul.totter...@gmail.com wrote:

 Hi Axel,
 
 `puppetd` is the old ( 2.6.0?) way to call the agent, and `puppet agent` is 
 the new way. The old way is still supported, but support will probably be 
 removed at some point.
 
 Cheers,
 Paul
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To view this discussion on the web visit 
 https://groups.google.com/d/msg/puppet-users/-/01TD81g2gIAJ.
 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 
 http://groups.google.com/group/puppet-users?hl=en.

-- 
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 
http://groups.google.com/group/puppet-users?hl=en.