[Puppet Users] Re: Puppet NetApp Network device management...

2012-11-09 Thread Gavin Williams
Quick update on the below error... 

I dropped into the #puppet-dev IRC channel, and was able to resolve the 
issue with some assistance from Dominic, so many thanks for that... 

Latest code has been committed to Git, but basically I was missing a couple 
of requires for Puppet libs... 

Now happily creating volumes and qtrees in the same run. 
Onwards to the next functionality requirement now... Exports :D

Cheers
Gav

On Wednesday, 7 November 2012 16:28:46 UTC, Gavin Williams wrote:

 :( Seems to be one step forward and two steps back atm... 

 Following the successful creation and deletion of NetApp filer volumes 
 using puppet earlier in the day, I added the required provider and type to 
 support qtree creation and deletion... 

 However since then, I haven't been able to create either a new volume or a 
 new qtree reliably... 
 It seems that it will intermittently work, but the majority of the time 
 the puppet device run will fail with 

 Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
 Could not autoload puppet/type/netapp_volume: Could not autoload 
 puppet/provider/netapp_volume/netapp_volume: uninitialized constant 
 Puppet::Util::NetworkDevice on node actint-star-nactl01

 This error alternates between provider/netapp_volume/netapp_volume and 
 provider/netapp_qtree/netapp_qtree... 
 It doesn't appear to be due to config, as I've stripped the node config 
 right back to base and still seeing errors... 

 The node config I was trying to work towards is: 

 netapp_qtree { 'q_puppet_test1':
 ensure = present,
 volume = 'v_puppet_test',
 require = Netapp_volume['v_puppet_test1']
 }

 netapp_volume { 'v_puppet_test1':
 ensure = present,
 initsize = 1t,
 aggregate = aggr01,
 spaceres = none,
 }


 I've tried multiple agent runs, multiple master restarts, all to no 
 avail... 

 Any ideas on what could be the issue? 

 As always, latest code is available in Git... 

 Cheers
 Gavin 


 On Wednesday, 7 November 2012 12:06:17 UTC, Gavin Williams wrote:

 Quick update... It looks like all that was needed to resolve the below 
 was a puppetmaster restart. 

 Have successfully managed to create a new volume on the NetApp filer 
 using puppet :) :D

 Now to plough on with adding support for the rest of the bits we need :) 

 Cheers
 Gavin 

 On Tuesday, 6 November 2012 17:40:34 UTC, Gavin Williams wrote:

 Scratch my last, had a bit of a eureka moment... 

 Added ':transport: to the attr_accessor against device.rb, and it 
 started working again... 

 However now failing elsewhere... 
 Have got the following against a relevant node:

 # Test NetApp volume provider
 netapp_volume { 'v_puppet_test':
 ensure = present,
 initsize = 1g,
 aggr = aggr01,
 spaceresv = none,
 }


 The run is failing with:

  Error: Could not retrieve catalog from remote server: Error 400 on 
 SERVER: Invalid parameter aggr at /etc/puppet/manifests/site.pp:30 on node 
 actint-star-nactl01
 Error: Could not set 'present' on ensure: undefined method 
 `result_reason' for #NaElement:0x7ffb9cb5d160 at 
 27:/etc/puppet/manifests/site.pp
 Error: Could not set 'present' on ensure: undefined method 
 `result_reason' for #NaElement:0x7ffb9cb5d160 at 
 27:/etc/puppet/manifests/site.pp
 Wrapped exception:
 undefined method `result_reason' for #NaElement:0x7ffb9cb5d160
 Error: 
 /Stage[main]//Node[actint-star-nactl01]/Netapp_volume[v_puppet_test]/ensure:
  
 change from absent to present failed: Could not set 'present' on ensure: 
 undefined method `result_reason' for #NaElement:0x7ffb9cb5d160 at 
 27:/etc/puppet/manifests/site.pp


  Got some debug logging, which is giving:

 ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: checking existance 
 of Netapp Volume v_puppet_test
 ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: Vol Info: results 
 status=failed reason=No volume named 'v_puppet_test' exists 
 errno=13040/results

 ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: Volume doesn't 
 currently exist.
 ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: creating Netapp 
 Volume v_puppet_test of initial size 1g


 So I can see that the provider exists? is working correctly, and it's 
 trying to fire the create def... 

 The type is defined correctly afaik:

 Puppet::Type.newtype(:netapp_volume) do 
   @doc = Manage Netapp Volume creation, modification and deletion.
   
   apply_to_device
   
   ensurable do
 desc Netapp Volume resource state. Valid values are: present, absent.
 
 defaultto(:present)
 
 newvalue(:present) do 
   provider.create
 end
 
 newvalue(:absent) do 
   provider.destroy
 end
   end
   
   newparam(:name) do
 desc The volume name.
 isnamevar
 #newvalues(/^[[:alpha:][:digit:]\.]+$/)
   end

   

[Puppet Users] Puppet 3.x load balancer

2012-11-09 Thread shell heriyanto
Dear All,

I just plan want to migrate puppetmaster from 2.6 to puppet 3.0 in
production, can you give me some advice about load balancer, because now im
still using mongrel. Somebody have experience migrating puppet 2.6.x or
2.7.x to puppet 3.0.x on production?. Thanks.

Regards,
Heriyanto

-- 
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] Announce: Puppet-Dashboard 1.2.14 Available

2012-11-09 Thread shell heriyanto
Great..!
Its that any RPM for el5? because i don't see on
http://yum.puppetlabs.com/el/5/products/x86_64/.

Thanks


On Thu, Nov 8, 2012 at 5:36 AM, Moses Mendoza mo...@puppetlabs.com wrote:

 Puppet Dashboard 1.2.14 is a bugfix release of Puppet Dashboard.

 This release is available for download at:
 https://downloads.puppetlabs.com/dashboard/puppet-dashboard-1.2.14.tar.gz

 Debian packages are available at https://apt.puppetlabs.com

 RPM packages are available at https://yum.puppetlabs.com

 See the Verifying Puppet Download section at:
 http://projects.puppetlabs.com/projects/puppet/wiki/Downloading_Puppet

 Please report feedback via the Puppet Labs Redmine site, using an
 affected version of 1.2.14:
 http://projects.puppetlabs.com/projects/dashboard

 Documentation is available at:
 http://docs.puppetlabs.com/dashboard/index.html

 ===
 ## Puppet Dashboard 1.2.14 Bug Fixes ##
 ===

 An error in the packaging of Puppet Dashboard 1.2.13 resulted in
 several empty directories normally shipped with Puppet Dashboard
 getting excluded from the source tarball and packages, e.g. 'tmp',
 'log', and 'spool'. This release is a re-packaging of Puppet Dashboard
 1.2.13 to include these directories. It includes no other changes.

 --
 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] Passing an array of user groups to a define

2012-11-09 Thread Erwin Bogaard
As I try to get some flexibility in the creation of users, I switched to a 
define.
problem is, I can't pass an array of user groups anymore. This either 
results in
- wrong group creation: group1,group1group2,group2 (see that group1 and 
group2 are concatenated in the middle, undefined group)
- error: Group names must be provided as an array, not a comma-separated 
list.


I use the following define:

define users::definitions (
$home   = /home/$title,
$usergroups = $title,
$ifensure   = 'present',
) {
user {
$title:
  home   = $home,
  managehome = true,
  ensure = $ifensure,
  groups = $usergroups,
}
...
}

And the following class to call the define:

class users {
users::definitions {
'rsnapshot':
  usergroups = [ 'group1', 'group2' ];
}
}

Does anyone have an idea how to pass an array of groups to a define?

-- 
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/-/ahHYu4WJclkJ.
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] Announce: Puppet-Dashboard 1.2.14 Available

2012-11-09 Thread Stefan Heijmans
el5 was not supported, as it has an dependency on ruby 1.8.7 and el5 comes 
default with ruby 1.8.5.
now that they deliver ruby 1.8.7 with puppet 3 for el5, they perhaps can 
also build them for el5.
 
 
Op vrijdag 9 november 2012 14:11:52 UTC+1 schreef Heriyanto het volgende:

 Great..! 
 Its that any RPM for el5? because i don't see on 
 http://yum.puppetlabs.com/el/5/products/x86_64/.

 Thanks


 On Thu, Nov 8, 2012 at 5:36 AM, Moses Mendoza 
 mo...@puppetlabs.comjavascript:
  wrote:

 Puppet Dashboard 1.2.14 is a bugfix release of Puppet Dashboard.

 This release is available for download at:
 https://downloads.puppetlabs.com/dashboard/puppet-dashboard-1.2.14.tar.gz

 Debian packages are available at https://apt.puppetlabs.com

 RPM packages are available at https://yum.puppetlabs.com

 See the Verifying Puppet Download section at:
 http://projects.puppetlabs.com/projects/puppet/wiki/Downloading_Puppet

 Please report feedback via the Puppet Labs Redmine site, using an
 affected version of 1.2.14:
 http://projects.puppetlabs.com/projects/dashboard

 Documentation is available at:
 http://docs.puppetlabs.com/dashboard/index.html

 ===
 ## Puppet Dashboard 1.2.14 Bug Fixes ##
 ===

 An error in the packaging of Puppet Dashboard 1.2.13 resulted in
 several empty directories normally shipped with Puppet Dashboard
 getting excluded from the source tarball and packages, e.g. 'tmp',
 'log', and 'spool'. This release is a re-packaging of Puppet Dashboard
 1.2.13 to include these directories. It includes no other changes.

 --
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 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/-/v9ywYO1gVOQJ.
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: defined types and enc

2012-11-09 Thread jcbollinger


On Thursday, November 8, 2012 6:29:47 PM UTC-6, erkules wrote:

 Hi, Im still confused: 

 On Fri, Oct 26, 2012 at 12:24:52PM -0700, jcbollinger wrote: 
  
  
  On Friday, October 26, 2012 11:32:36 AM UTC-5, erkules wrote: 
   
  
   If not is there a trick to call a class many times for a node. (Maybe 
 by 
   manipulating the name?) 
   
   
  You can create classes with different names but similar content, or you 
 can 
  use one class that wraps all the resources you want.  For example, 
  
  class mymodule::lxc_application_containers { 
mymodule::lxc_application_container { 'container1: 
  application = 'Awesomeness1.1' 
  # other parameters 
} 
mymodule::lxc_application_container { 'container2: 
  application = 'Moneymaker3.2' 
  # other parameters 
} 
# other containers ... 
  } 
  
  Supposing that the point is to select a subset of the available 
  applications for each target node, using the one-class approach, you can 
 do 
  that via global variables (yuck), class parameters (meh), or data from 
 an 
  external source (best bet). 

 So you got a fixed number in here where you filter the right ones? 



Ideally, you know what the right ones are and your class declares only 
those.  You can, however, use one or another sort of conditional to choose 
which of the possible ones to declare.

 

 I would like to call the class with parameters  and for each parameter 
 the defined type is called. Where a parameter is a hash with 3 keys (where 
 one is the name). 



That sounds a lot like the behavior of the built-in create_resources() 
function.  Look it up in the Puppet function reference.

 

 With this I could decide to run more or less containers just by adding 
 parameters. 



Puppet classes and definitions do not have varargs support.  All the 
parameters they can accept must be pre-defined, though you can assign 
default values to them so that you don't need to declare each one each 
time.  Puppet does support arrays and hashes, however, and these can be 
assigned as parameter values.
 


 I don't know if this is a possible way to implement my needs *kopfkraz* 


It would help if you were clearer about what your actual needs *are*.  I 
have given you rather a lot of information about how you can approach your 
task with Puppet, but you remain unsatisfied.  If I have not been speaking 
to your issue then it is because I don't know what your issue is.



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/-/8omI8AxRD7wJ.
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: PuppetDB: gather nodes changed recently

2012-11-09 Thread ak0ska
Thanks for the info!
Sounds nice, looking forward to it! :)

On Thursday, November 8, 2012 6:24:15 PM UTC+1, Chris Price wrote:

 ak0ska,

 You are correct--right now the timestamps we return only indicate the last 
 submission of catalogs/facts.  We don't actually check to see if the 
 catalogs or facts have changed, we just replace the old ones with the new 
 ones.  (We do some de-duplication checks to prevent us from storing tons of 
 identical resources in the db, but we don't actually store any info about 
 what changed on a given host.)

 Yet.  :)

 We are actually working on some new features as we speak that will allow 
 you to query for events, rather than just resources.  I believe that our 
 next major release will provide you with the capability that you are 
 looking for.  If you have a second to visit our issue tracker and file a 
 ticket with any specific info about how you'd like to be able to query, 
 that will definitely help us make sure we have you covered!  
 http://projects.puppetlabs.com/projects/puppetdb/issues

 We don't have an official release date for those features just yet, but it 
 is one of the major things that we are actively working on and it shouldn't 
 be too far down the road.

 On Thursday, November 8, 2012 1:24:53 AM UTC-8, ak0ska wrote:

 Hello,

 Is it possible to (efficiently) gather those nodes from PuppetDB which 
 have changed recently? Either their facts or their catalogues. In case we 
 want to do something with the nodes that have changed, and quickly collect 
 them using PuppetDB.
 If I understood correctly, Puppetdb checks if the newly received 
 catalogues/facts are the same as the ones stored, but it seems there's no 
 way to take advantage of that from outside. The timestamps returned when 
 querying a node's status reflect the times when catalogues/facts were last 
 received, not when they were changed. 



-- 
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/-/xcBpDdnKxssJ.
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] Usage of puppet to deploy and configuration manage software patches

2012-11-09 Thread Christian
I have some questions in terms of how to use puppet of configuration 
management for software patches. My previous approach was it to create a 
puppet module for each patch ... Like Patch1 includes (FileA, FileB, 
FileC), Patch2 includes (FileD, FileE)... So far so good and that works but 
now i have to create a Patch3 with lets say FileF and FileA included. As 
you can see there will be a puppet conflict as i can't deploy the same 
files within different modules. What is the right architecture and method 
to manage software patches? Is it to use rpms instead of? Or are there 
other ideas how to manage that with puppet.


-- 
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/-/YNceAdQNZr4J.
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 - Postfix - How-To edit generic.db

2012-11-09 Thread Brian Dunbar
New-ish to Puppet.  I'm just getting beyond the basics, now.

Got a postfix module defined.  But there is a wrinkle: the server needs to 
send mail from root as r...@domain.com not r...@hostname.domain.com

Because our service desk accepts tickets from servers BUT the counts as 
'spam' anything NOT from domain.com.

This is easy with postfix:

edit /etc/postfix/generic - add r...@hostname.domain.com 
hostn...@domain.com
$ postmap /etc/postfix/generic
restart service postfix

How do I tell puppet do 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/-/pYu9vRELtQwJ.
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] MAJOR BUG: package requirements are ignored when schedules are used.

2012-11-09 Thread jcbollinger


On Thursday, November 8, 2012 5:21:51 PM UTC-6, Jo wrote:

  This is now https://projects.puppetlabs.com/issues/17507 

 On Nov 8, 2012, at 2:55 PM, R.I.Pienaar wrote: 
  also see http://projects.puppetlabs.com/issues/5286 I think the 
  hard part here is figuring out what is right behaviour 


Consider also issue 
http://projects.puppetlabs.com/issues/5876http://projects.puppetlabs.com/issues/5286,
 
which is related.
 


 I don't think either situation is hard to determine what the expected 
 behavior should be. I updated 5286 with some thoughts.



Me, too.

 



 For package installs, either one of the following behaviors is 
 correct/intuitive. I prefer the first one: 

 1. Check if the package is installed. If it is installed and has a 
 schedule, don't check the version for update or removal. If it isn't 
 installed and should be, install it outside of the schedule. 

 *OR* 

 2. Do not run things which fail dependency on a package which is not 
 installed. 



Although it would produce more favorable behavior for the particular 
manifests at issue here, I can't agree with option (1).  The question 
should be about whether Puppet applies the Package resource, not about the 
details of what is involved in applying it under one set of circumstances 
vs. another.

I more or less agree with (2), but I would couch it in different terms:

2'. Do not attempt to apply a resource that has a 'require' relationship 
(or equivalent) with a resource that is not successfully applied, and
2'a. Do not consider resources to have been successfully applied when they 
are excluded from application by a schedule.

The first is a Puppet invariant, so the second is the key. 


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/-/FyX3f4Ciz_gJ.
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] Usage of puppet to deploy and configuration manage software patches

2012-11-09 Thread Nikola Petrov
On Fri, Nov 09, 2012 at 08:04:44AM -0800, Christian wrote:
 I have some questions in terms of how to use puppet of configuration 
 management for software patches. My previous approach was it to create a 
 puppet module for each patch ... Like Patch1 includes (FileA, FileB, 
 FileC), Patch2 includes (FileD, FileE)... So far so good and that works but 
 now i have to create a Patch3 with lets say FileF and FileA included. As 
 you can see there will be a puppet conflict as i can't deploy the same 
 files within different modules. What is the right architecture and method 
 to manage software patches? Is it to use rpms instead of? Or are there 
 other ideas how to manage that with puppet.
 

Hi,

If you should decompose them you can define them as different
classes. That however as you know will lead to an explosion of different
classes which can become pretty unmaintainable with time ...

The question is if you *should* do it this way. I don't know
so much about your system so I can't tell. We are mostly updating with
proper package management and build our software for upgrades.

Maybe if you tell us more about your system/setup, we can give you a better 
advice?

Best, Nikola

 
 -- 
 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/-/YNceAdQNZr4J.
 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: Puppet dashboard shows all hosts unresponsive

2012-11-09 Thread Ellison Marks
The actual display of unresponsive nodes in dashboard is indeed based on 
the last time a node ran, but it's controlled by a setting in dashboard's 
settings.yaml file. Not sure what you're on, but on centos, that would be 
/usr/share/puppet-dashboard/config/settings.yaml, and look for the 
no_longer_reporting_cutoff setting. If that's set too low, you'll get a lot 
of unresponsive nodes in dashboard.

On Thursday, November 8, 2012 5:51:36 AM UTC-8, Karim wrote:

 Hi guys,

 I have a strange situation. I've got 1 dashboard MySQL DB accessed from 3 
 different dashboard hosts. Strangely enough, 2 of them show the right node 
 statuses, and the third one just shows all nodes as unresponsive.

 As far as I know, the status comes from the nodes table in the DB, so 
 how can this happen? Is there some cache I need to clear? Is there another 
 source for this information?

 Dashboard version is 1.2.5.

 Thanks!
 Karim


-- 
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/-/ImxezjeiNo8J.
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 - Postfix - How-To edit generic.db

2012-11-09 Thread Tim Mooney

In regard to: [Puppet Users] Puppet - Postfix - How-To edit generic.db,...:


New-ish to Puppet.  I'm just getting beyond the basics, now.

Got a postfix module defined.  But there is a wrinkle: the server needs to
send mail from root as r...@domain.com not r...@hostname.domain.com


So the big question is whether this config needs to be applied to *all*
the systems where you might run postfix, or whether it's specific to
one particular system or set of systems.


Because our service desk accepts tickets from servers BUT the counts as
'spam' anything NOT from domain.com.

This is easy with postfix:

edit /etc/postfix/generic - add r...@hostname.domain.com
hostn...@domain.com


You need to modify a file, so you'll want to have a file resource
defined somewhere.  Are there other settings in that file you typically
customize?  If so, you may want the source for the file to be a
template().  If not, there are other ways you might handle it.

So, the file resource is going to look something like

file { '/etc/postfix/generic':
ensure = file,
owner  = 'some_user',
group  = 'some_group',
mode   = '0somethingsomethingsomething',
source = yet_to_be_determined,
notify = Exec['postmap-generic'],
}

The real question is what goes in the yet_to_be_determined area for
the source.  It could be a template

source = template('postfix/generic.erb'),

or perhaps it's a list of files (first one that matches is used):

source = [
puppet:///modules/postfix/generic.${::fqdn},
'puppet:///modules/postfix/generic',
],

Determining how you pick the source for the file is going to be the
most difficult part of this, and it depends on how much customization
you need to do.


$ postmap /etc/postfix/generic


For that, you need an exec resource to execute your command after the file
is modified:

exec { 'postmap-generic':
cwd = '/etc/postfix',
path= '/bin:/usr/bin:/sbin:/usr/sbin',
command = 'postmap generic',
refreshonly = true,
notify  = Service['postfix'],
}


restart service postfix


service { 'postfix':
ensure = running,
enable = true,
}

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] Re: Passing an array of user groups to a define

2012-11-09 Thread Eric Sorenson
Erwin, the variable is probably coming into the define correctly, but 
you're quoting $usergroups in the user resource which will concatenate 
the values together... remove the quotes and all should be well..

On Friday, November 9, 2012 5:19:31 AM UTC-8, Erwin Bogaard wrote:

 As I try to get some flexibility in the creation of users, I switched to a 
 define.
 problem is, I can't pass an array of user groups anymore. This either 
 results in
 - wrong group creation: group1,group1group2,group2 (see that group1 and 
 group2 are concatenated in the middle, undefined group)
 - error: Group names must be provided as an array, not a comma-separated 
 list.


 I use the following define:

 define users::definitions (
 $home   = /home/$title,
 $usergroups = $title,
 $ifensure   = 'present',
 ) {
 user {
 $title:
   home   = $home,
   managehome = true,
   ensure = $ifensure,
   groups = $usergroups,
 }
 ...
 }

 And the following class to call the define:

 class users {
 users::definitions {
 'rsnapshot':
   usergroups = [ 'group1', 'group2' ];
 }
 }

 Does anyone have an idea how to pass an array of groups to a define?


-- 
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/-/HQGmI46087UJ.
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] Announce: Puppet-Dashboard 1.2.14 Available

2012-11-09 Thread Moses Mendoza
On Fri, Nov 9, 2012 at 5:34 AM, Stefan Heijmans heijm...@rechtspraak.nl wrote:
 el5 was not supported, as it has an dependency on ruby 1.8.7 and el5 comes
 default with ruby 1.8.5.
 now that they deliver ruby 1.8.7 with puppet 3 for el5, they perhaps can
 also build them for el5.

That is indeed true, you're right. So we did:) You should now be able
to `yum install puppet-dashboard` on el5 hosts from the Puppet Labs
yum repo, yum.puppetlabs.com. I also noticed dashboard wasn't quite
happy with the older rubygems in el5, so we built rubygems-1.3.7 for
el5 and added it to the dependencies repo on yum.puppetlabs.com as
well (el5 has rubygems-1.3.1, el6 has 1.3.7). Worked great for me.
Enjoy.

Moses

-- 
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: Passing an array of user groups to a define

2012-11-09 Thread Erwin Bogaard
Hi Eric.
removing the quotes fixed it! If only all problems were that easy to fix ;-)
Thanks, Erwin

On Friday, November 9, 2012 9:26:11 PM UTC+1, Eric Sorenson wrote:

 Erwin, the variable is probably coming into the define correctly, but 
 you're quoting $usergroups in the user resource which will concatenate 
 the values together... remove the quotes and all should be well..

 On Friday, November 9, 2012 5:19:31 AM UTC-8, Erwin Bogaard wrote:

 As I try to get some flexibility in the creation of users, I switched to 
 a define.
 problem is, I can't pass an array of user groups anymore. This either 
 results in
 - wrong group creation: group1,group1group2,group2 (see that group1 and 
 group2 are concatenated in the middle, undefined group)
 - error: Group names must be provided as an array, not a comma-separated 
 list.


 I use the following define:

 define users::definitions (
 $home   = /home/$title,
 $usergroups = $title,
 $ifensure   = 'present',
 ) {
 user {
 $title:
   home   = $home,
   managehome = true,
   ensure = $ifensure,
   groups = $usergroups,
 }
 ...
 }

 And the following class to call the define:

 class users {
 users::definitions {
 'rsnapshot':
   usergroups = [ 'group1', 'group2' ];
 }
 }

 Does anyone have an idea how to pass an array of groups to a define?



-- 
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/-/K4nVjDO1l94J.
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] Announce: Puppet-Dashboard 1.2.14 Available

2012-11-09 Thread Moses Mendoza
On Fri, Nov 9, 2012 at 12:54 PM, Moses Mendoza mo...@puppetlabs.com wrote:
 On Fri, Nov 9, 2012 at 5:34 AM, Stefan Heijmans heijm...@rechtspraak.nl 
 wrote:
 el5 was not supported, as it has an dependency on ruby 1.8.7 and el5 comes
 default with ruby 1.8.5.
 now that they deliver ruby 1.8.7 with puppet 3 for el5, they perhaps can
 also build them for el5.

 That is indeed true, you're right. So we did:) You should now be able
 to `yum install puppet-dashboard` on el5 hosts from the Puppet Labs
 yum repo, yum.puppetlabs.com. I also noticed dashboard wasn't quite
 happy with the older rubygems in el5, so we built rubygems-1.3.7 for
 el5 and added it to the dependencies repo on yum.puppetlabs.com as
 well (el5 has rubygems-1.3.1, el6 has 1.3.7). Worked great for me.

Just a side note to avoid confusion: rubygems-1.3.1 is in EPEL for
el5, not core.

 Enjoy.

 Moses

-- 
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: Puppet 3.0: Not authorized to call find on /file_metadata, more issues?

2012-11-09 Thread Forrie
Ugh, thank you for taking the time to point all of that out.   It took me a 
little while, but I think it's working now in test mode.

Question, so for every directory underneath /etc/puppet/files, I need a 
separate stanza in fileserver.conf, so a new directory called 
/etc/puppet/files/blah would be in fileserver.conf

[blah]
path /etc/puppet/files/blah
allow *

AND in auth.conf

path ~ ^/file_(metadata|content)/blah/
auth yes
allow /^(.+\.)?harvard.edu$/
allow_ip 127.0.0.0/8
allow_ip 10.0.0.0/8

Then my [etc]

path ~ ^/file_(metadata|content)/etc/
auth yes
allow /^(.+\.)?harvard.edu$/
allow_ip 127.0.0.0/8
allow_ip 10.0.0.0/8

However, is /this/ necessary, too?

path ~ ^/file_(metadata|content)/
auth yes
allow /^(.+\.)?harvard.edu$/
allow_ip 127.0.0.0/8
allow_ip 10.0.0.0/8



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/-/DwROgTImZekJ.
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 3.0: Not authorized to call find on /file_metadata, more issues?

2012-11-09 Thread Nick Fagerlund


On Friday, November 9, 2012 2:34:38 PM UTC-8, Forrie wrote:


 However, is /this/ necessary, too?

 path ~ ^/file_(metadata|content)/
 auth yes
 allow /^(.+\.)?harvard.edu$/
 allow_ip 127.0.0.0/8
 allow_ip 10.0.0.0/8


No. And it might interfere with some things. (For example, it would mean 
ONLY those machines could ever retrieve plugins or files from modules. 
Currently, the rule in auth.conf labeled path file allows all 
authenticated nodes to fetch plugins and module-served files.) 

It sounds like you may want to read up again on how auth.conf works. 
http://docs.puppetlabs.com/guides/rest_auth_conf.html The salient part is 
that lookup proceeds linearly, and it stops at the first rule that matches 
the request. If that rule were above the other rules, no requests would 
ever reach them; the broad one on top would catch them all. If that rule 
were below the other rules, none of the requests relevant to the other 
rules would reach IT, since they'd catch them; it would only catch requests 
irrelevant to the other similar rules, such as pluginsync and module-served 
files. 

Final addendum is that if you do want all of your mount points to have the 
exact same authorization rules, you can use a more complicated regex to do 
that, as long as it's matching the correct URLs. For example: 

path ~ ^/file_(metadata|content)/(blah|etc|foo|bar|baz)/



-- 
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/-/5nS9b8qGTqoJ.
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 Dashboard for Rails 3

2012-11-09 Thread Aaron Stone
Hi all,

Over the past few weeks, I ported the Puppet Dashboard to run on Rails 3
with Ruby 1.8.7. I'm down to only three unit test failures, so I think it's
a good time to share the work and see if anybody else is interested in
continuing Dashboard with me.

http://github.com/sodabrew/puppet-dashboard

https://travis-ci.org/sodabrew/puppet-dashboard/jobs/3095051

What's new here?
 - Rails 3.2.8!
 - Model protection against mass-assignment attacks.
 - Prototype JS is removed.
 - URLs for Groups and Classes by name, not only ID number.
 - Bundler 1.x, Gemfile, runs under Thin.

My next plans:
 - Use PaperTrail to provide change histories for everything (way more than
fact reports, I need who changed this parameter?).
 - Use Devise for AAA, integration with company Auth and view/edit
permissions (e.g. Devs can view, Ops can edit).
 - Make it prettier? Bootstrap perhaps?
 - Unit tests passing ;)

Cheers,
Aaron

-- 
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] Announce: Puppet 2.7.20-rc1 Available

2012-11-09 Thread Moses Mendoza
Puppet 2.7.20-rc1 is a maintenance release candidate for Puppet in the
2.7.x series with bug fixes and some performance improvements
back-ported from the 3.0.x series.

Downloads are available at:
 * Source https://downloads.puppetlabs.com/puppet/puppet-2.7.20-rc1.tar.gz

Windows package is available at
https://downloads.puppetlabs.com/windows/puppet-2.7.20-rc1.msi

RPMs are available at https://yum.puppetlabs.com/el or /fedora

Debs are available at  https://apt.puppetlabs.com

Mac package is available at
https://downloads.puppetlabs.com/mac/puppet-2.7.20-rc1.dmg

See the Verifying Puppet Download section at:
https://projects.puppetlabs.com/projects/puppet/wiki/Downloading_Puppet

Please report feedback via the Puppet Labs Redmine site, using an
affected puppet version of 2.7.20-rc1:
http://projects.puppetlabs.com/projects/puppet/

To take a look at fixes targeted for this release, check out
http://projects.puppetlabs.com/versions/307

## Special notes about 2.7.20-rc1 ##

Puppet 2.7.20-rc1 address http://projects.puppetlabs.com/issues/15560,
which means if you had specifically enabled `managehome = true` for
user resources expecting it not to work on Windows, be aware that it
**works now** for both creation with `ensure = present` AND deletion
with `ensure = absent`. Previously deleted users will not have their
orphaned home directories removed, however.


Puppet 2.7.20-rc1 also addresses concerns regarding a change
introduced in Puppet 2.7.16, b26699a (#10146) `-` is not legal in
variable names., which disallowed the use of dashes in variable
names. Puppet 2.7.20-rc1 introduces a configuration option,
`allow_variables_with_dashes`,
(http://docs.puppetlabs.com/references/2.7.latest/configuration.html#allowvariableswithdashes)
which can be set to `true` to restore earlier behavior, although this
is strongly discouraged. The option is set to false by default to
maintain current behavior.

 (#10146) `-` in variable names should be deprecated!

 In commit b26699a2 I fixed an accidentally introduced change to the lexer,
 allowing `-` to be part of a variable name.  That had lasted for
a while and
 was surprisingly popular.  It was also hugely ambiguous around
`-` as minus,
 and led to all sorts of failures - unexpected interpolations to nothing -
 because of that.

 A much better strategy would have been to deprecate the feature,
issue proper
 warnings, and include an option to allow users to toggle the behaviour.

 Initially defaulting that to permit, and eventually toggling
over to deny,
 would have made the whole experience much smoother - even if this
was totally
 documented as not working, and was a clear bug that it changed.

 So, thanks to prompting from Benjamin Irizarry, we do just that:
introduce the
 configuration option, default it to deny to match current behaviour, but
 allow users the choice to change this back.

 Please be aware that allowing variables with `-` might break all sorts of
 things around, for example, Forge modules though.  Most people
write code to
 the documented standard, and their code might well totally fail
to work with
 this changed away from the default!

 Signed-off-by: Daniel Pittman dan...@puppetlabs.com

## Puppet 2.7.20-rc1 Changelog ##

Adrien Thebo (1):
  367926a (#15264) Custom title patterns can fail cryptically.

Andrew Parker (15):
  65b35a8 (Maint) Simplify CONTRIBUTING.md
  9e26fe0 (#10915) Fix tests to work with new parameter checking
  d2e5268 (#10915) Add test for provider throwing NoMethodError
  b48a172 (Maint) Fix syntax and semantic erros in test
  5e3fbca (Maint) Remove fragile test
  dc50ec7 (#16922) Quote strings that contain :
  13ab956 (#16791) Revert Merge branch
'perf/2.7.x/backport-activesupport-hook-disabling' of
https://github.com/daniel-pittman/puppet into 2.7.x
  1e5baee (#16791) Revert Maint: Fix intermittently failing spec test
  3cda4f4 (#16791) Revert Merge branch
'feature/2.7.x/json-terminus-backport' of
https://github.com/daniel-pittman/puppet into 2.7.x
  aba3c67 (#16791) Re-instate deprecated symbolize and symbolizehash!
  d892859 (#16791) Remove tests for unused behavior
  bd0caf5 (#17260) Warn when variables contain hyphens
  5c61f32 (#17260) Include link to information about deprecation
  b5ed15b (#17458) Load 'puppet' at the right time
  d16d357 (#17458) Add acceptance test for executing external subcommands

Ashley Penney (1):
  5ceb55c (Maint) Add logging for when Puppet is enabled/disabled.

Branan Purvine-Riley (1):
  dff6e53 (maint) Confine pty-based test to non-Windows hosts.

Dan Bode (1):
  0524a0a (#7422) Support arrow syntax with metaparams

Daniel Pittman (43):
  b8ca748 (#11727) Support STDIN for `puppet parser validate`
  536b68c Check that function loading worked correctly.
  f10d364 maint: remove .rspec entirely
  8fa6575 Make SELinux internal 

Re: [Puppet Users] Re: defined types and enc

2012-11-09 Thread erkan yanar

Thx for your patience.
On Fri, Nov 09, 2012 at 06:23:21AM -0800, jcbollinger wrote:
 
 
 On Thursday, November 8, 2012 6:29:47 PM UTC-6, erkules wrote:
 
  Hi, Im still confused: 
 
  On Fri, Oct 26, 2012 at 12:24:52PM -0700, jcbollinger wrote: 
   
   
   On Friday, October 26, 2012 11:32:36 AM UTC-5, erkules wrote: 

   
If not is there a trick to call a class many times for a node. (Maybe 
  by 
manipulating the name?) 


   You can create classes with different names but similar content, or you 
  can 
   use one class that wraps all the resources you want.  For example, 
   
   class mymodule::lxc_application_containers { 
 mymodule::lxc_application_container { 'container1: 
   application = 'Awesomeness1.1' 
   # other parameters 
 } 
 mymodule::lxc_application_container { 'container2: 
   application = 'Moneymaker3.2' 
   # other parameters 
 } 
 # other containers ... 
   } 
   
   Supposing that the point is to select a subset of the available 
   applications for each target node, using the one-class approach, you can 
  do 
   that via global variables (yuck), class parameters (meh), or data from 
  an 
   external source (best bet). 
 
  So you got a fixed number in here where you filter the right ones? 
 
 
 
 Ideally, you know what the right ones are and your class declares only 
 those.  You can, however, use one or another sort of conditional to choose 
 which of the possible ones to declare.
 
  
 
  I would like to call the class with parameters  and for each parameter 
  the defined type is called. Where a parameter is a hash with 3 keys (where 
  one is the name). 
 
 
 
 That sounds a lot like the behavior of the built-in create_resources() 
 function.  Look it up in the Puppet function reference.

++

 
  
 
  With this I could decide to run more or less containers just by adding 
  parameters. 
 
 
 
 Puppet classes and definitions do not have varargs support.  All the 
 parameters they can accept must be pre-defined, though you can assign 
 default values to them so that you don't need to declare each one each 
 time.  Puppet does support arrays and hashes, however, and these can be 
 assigned as parameter values.

great

  
 
 
  I don't know if this is a possible way to implement my needs *kopfkraz* 
 
 
 It would help if you were clearer about what your actual needs *are*.  I 
 have given you rather a lot of information about how you can approach your 
 task with Puppet, but you remain unsatisfied.  If I have not been speaking 
 to your issue then it is because I don't know what your issue is.

Ups sorry for the confusion.
Right now Ive got defines like:

 lxc_builder{'starter01': ensure = 'define', ipadd='10.0.3.101/24' }
 lxc_builder{'starter02': ensure = 'define', ipadd='10.0.3.102/24' }
 lxc_builder{'starter03': ensure = 'define', ipadd='10.0.3.103/24' }
 lxc_builder{'starter04': ensure = 'define', ipadd='10.0.3.104/24' }

The build an LXC application container on the host.
This works sufficient. Depending of the host there can be easily 100 Containers 
on 
every host. (It is no KVM :)

So adding a container is writing a new line.

My intention was to put my configuration into an ENC.
Thats where the trouble started, as no place for defined types in ENC.

And now I wonder how a class would look like to transform my defined types into 
a representation suitable for ENC


thx a lot
Erkan


-- 
über den grenzen muß die freiheit wohl wolkenlos sein

-- 
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.