Re: [Puppet Users] Re: Puppet version 2.7 or 3?

2012-11-16 Thread Thomas Bendler
Hi Ohad,

2012/11/16 Ohad Levy 

> [...]
> For the record, Puppet 3 support was added to foreman a couple of days ago.
> [...]
>

do you know when the puppet 3 support will be available in the test RPMs?
I've updated to the current test RPMs yesterday but still had to patch some
files in foreman and foreman-proxy to get it working with Puppet 3.

Regards, Thomas
-- 
Linux ... enjoy the ride!

-- 
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 version 2.7 or 3?

2012-11-16 Thread vioilly
Thanks for the info. I'm going to give 3.0.1 a go. That fact about the 
performance improvement is the killer. Worth a few rough edges. 

Oli
--

On Thursday, November 15, 2012 2:56:41 PM UTC, llowder wrote:
>
>
>
> On Thursday, November 15, 2012 8:47:29 AM UTC-6, vioilly wrote:
>>
>> Hi,
>>
>> I am just rolling out a new puppet deployment. Which version should i go 
>> for, 2.7 or 3.1? I am looking to use the open source version.
>>
>>
> If you plan on using an ENC, specifically TheForeman, or a lot of modules 
> from the Puppet Forge, you might want to start with 2.7
>
> That being said, Foreman is very close to having Puppet 3 support working, 
> and more and more modules on the Forge are being made 3.0 compatible every 
> day.
>
> Puppet 2.7 is currently on 2.7.19 with 2.7.20 in RCs, and Puppet 3 is at 
> 3.0.1, so it is still a little rough around the edges, but the fact that 
> hiera is integrated and it has the databindings is one very nice feature of 
> 3.0.x. It's also considerably faster.
>
> There are advantages and disadvantages to both, and I am sure others will 
> weigh in as well, but hope this helps.
>  
>
>> Many thanks,
>> Oli
>
>

-- 
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/-/HOa8N02HZf0J.
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] Params classes and best practices

2012-11-16 Thread Walter Heck - OlinData.com
Hi all,

I've been wondering what is considered best practice when it comes to
$module_name::params classes? I see for instance the latest versions
of the apache and mysql modules from puppetlabs use static variables
which cannot be overridden:
https://github.com/puppetlabs/puppetlabs-mysql/blob/master/manifests/params.pp
https://github.com/puppetlabs/puppetlabs-apache/blob/master/manifests/params.pp

But what if I want to install apache with ssl disabled? I see a few
options, all horribly bad:
1) change the params.pp file to set $ssl = false
2) change the module to use either hiera or class parameters which
allow setting this configuration flag.
3) In the older days, we used to use a mechanism that allowed for
top-scope variables to set a module level variable. This was also
messy, but at least it worked:
https://github.com/Tribily/puppet-mariadb/blob/master/manifests/params.pp

I'd be happy to hear what 'we' consider industry standard. I'm leaning
towards class parameters for configuration variables that need to be
different from deployment to deployment.

cheers,

-- 
Walter Heck
CEO and Founder @ OlinData (http://olindata.com)
Puppet training and consulting
--
Follow @olindata on Twitter and/or 'Like' our Facebook page at
http://www.facebook.com/olindata

-- 
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] Getting Started with Hiera

2012-11-16 Thread Martin Alfke
Hi,
On 15.11.2012, at 19:20, Worker Bee wrote:

> Hi Everyone;
> 
> Can anyone direct me towards documentation on getting started with Hiera?  
> SPecifically, I ma looking for an easy way to verify post-install 
> functionality.
> 
> I did visit the following page which is is blank...
> http://docs.puppetlabs.com/hiera/1/puppet.html
> 
> Any help would be greatly appreciated!

Here: http://docs.puppetlabs.com/#hierahiera1
you will find a list of links covering hiera installation, configuration and 
examples.

hth,

Martin

-- 
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: Pass Array as param to custom provider...

2012-11-16 Thread Gavin Williams
Ok, after a considerable amount of reading, and some expermentation, I 
think I've got a working netapp_volume type/provider which can handle 
setting volume options! :D

Have branched the code to play with, so it's available here: 
https://github.com/fatmcgav/fatmcgav-netapp/tree/volume_options_testing

Overall, it seems to work quite well. When first creating volumes, it 
correctly creates the volume using *create*, and then drops into *options=*to 
set the volume options, as shown in this log exert:

^[[0;32mInfo^[[0m: Applying configuration version '1353061861'
> ^[[0;36mDebug^[[0m: 
> /Stage[main]//Node[actint-star-nactl01]/Netapp_export[/vol/v_puppet_test1611120925/q_puppet_test1611120925]/require:
>  
> requires Netapp_qtree[q_puppet_test1611120925]
> ^[[0;36mDebug^[[0m: 
> /Stage[main]//Node[actint-star-nactl01]/Netapp_qtree[q_puppet_test1611120925]/require:
>  
> requires Netapp_volume[v_puppet_test1611120925]
> ^[[0;36mDebug^[[0m: Stage[main]: Skipping host resources because running 
> on a device
> ^[[0;36mDebug^[[0m: Class[Main]: Skipping host resources because running 
> on a device
> ^[[0;36mDebug^[[0m: Node[actint-star-nactl01]: Skipping host resources 
> because running on a device
> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: checking existance of 
> Netapp Volume v_puppet_test1611120925
> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: Vol Info:  errno="13040" reason="No volume named 'v_puppet_test1611120925' exists" 
> status="failed">
> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: Volume doesn't exist.
> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: creating Netapp 
> Volume v_puppet_test1611120925 of initial size 10g in Aggregate aggr01 
> using space reserve of none.
> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: Volume 
> v_puppet_test1611120925 created successfully. Setting options...
> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: Got to options= 
> setter...
> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume_options: Setting = 
> try_first, Value = volume_grow
> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume_options: Volume Option 
> try_first set against Volume v_puppet_test1611120925.
> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume_options: Setting = 
> no_atime_update, Value = on
> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume_options: Volume Option 
> no_atime_update set against Volume v_puppet_test1611120925.
> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume_options: Setting = 
> convert_ucode, Value = on
> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume_options: Volume Option 
> convert_ucode set against Volume v_puppet_test1611120925.
> /Stage[main]//Node[actint-star-nactl01]/Netapp_volume[v_puppet_test1611120925]/ensure:
>  
> created
> ^[[0;36mDebug^[[0m: 
> /Stage[main]//Node[actint-star-nactl01]/Netapp_volume[v_puppet_test1611120925]:
>  
> The container Node[actint-star-nactl01] will propagate my refresh event
> ^[[0;36mDebug^[[0m: Class[Settings]: Skipping host resources because 
> running on a device
> ^[[0;36mDebug^[[0m: Class[Settings]: Skipping host resources because 
> running on a device
>
>
When running against a volume that already exists, I can see it dropping 
into *options*, pulling a list of the current volume options, and then 
comparing that list against the resource *:options *value. 

However I don't think the insync is still quite right... It still appears 
to be going through the whole *:options* list, even if they all match... 

> ^[[0;32mInfo^[[0m: Applying configuration version '1353061861'
> ^[[0;36mDebug^[[0m: 
> /Stage[main]//Node[actint-star-nactl01]/Netapp_qtree[q_puppet_test1611120925]/require:
>  
> requires Netapp_volume[v_puppet_test1611120925]
> ^[[0;36mDebug^[[0m: 
> /Stage[main]//Node[actint-star-nactl01]/Netapp_export[/vol/v_puppet_test1611120925/q_puppet_test1611120925]/require:
>  
> requires Netapp_qtree[q_puppet_test1611120925]
> ^[[0;36mDebug^[[0m: Stage[main]: Skipping host resources because running 
> on a device
> ^[[0;36mDebug^[[0m: Class[Main]: Skipping host resources because running 
> on a device
> ^[[0;36mDebug^[[0m: Node[actint-star-nactl01]: Skipping host resources 
> because running on a device
> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: checking existance of 
> Netapp Volume v_puppet_test1611120925
> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: Vol Info:  status="passed">
> ...
> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: Volume exists.
> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: Vol Options:  status="passed">
> ...
> ^[[0;36mDebug^[[0m: Puppet::Provider::netapp_volume_options: Matched Name 
> convert_ucode. Current value = on. New value = on
> ^[[0;36mDebug^[[0m: Puppet::Provider::netapp_volume_options: Matched Name 
> try_first. Current value = volume_grow. New value = volume_grow
> ^[[0;36mDebug^[[0m: Puppet::Provider::netapp_volume_options: Matched Name 
> no_atime_update. Current value = on. New value =

Re: [Puppet Users] Re: Pass Array as param to custom provider...

2012-11-16 Thread Gavin Williams
Ok, think I've kinda answered my own question... 

Added some additional logging to *insync?*, and spotted a flaw in my *
'options'* logic. I was stripping matching values at that level, rather 
than letting *insync *take care of that. 

So tweaked the *option* as follows:

--- a/lib/puppet/provider/netapp_volume/netapp_volume.rb
> +++ b/lib/puppet/provider/netapp_volume/netapp_volume.rb
> @@ -77,7 +77,7 @@
>  result = {}
>  matched_options.each do |name|
>Puppet.debug("Puppet::Provider::netapp_volume_options: Matched Name 
> #{name}. Current value = #{[current_options[name]]}. New value = 
> #{[set_options[name]]} \n")
> -  result[name] = current_options[name] unless current_options[name] 
> == set_options[name]
> +  result[name] = current_options[name]
>  end
>  Puppet.debug("Puppet::Provider::Netapp_volume: Returning result 
> hash... \n")
>  result
>

Can now see *insync? *correctly iterating through, and where they all match 
*options=* doesn't get called :D

However still looks like if one of the *:options *doesn't match, then the 
whole lot gets set again... I guess that's a reasonable logic in that if 
one doesn't match, it's quite possible other's don't match, so set them all 
to be safe... Unless I missed something? 

Example run of the above is: 

> ^[[0;36mDebug^[[0m: Puppet::Provider::netapp_volume_options: Matched Name 
> try_first. Current value = volume_grow. New value = snap_delete
> ^[[0;36mDebug^[[0m: Puppet::Provider::netapp_volume_options: Matched Name 
> convert_ucode. Current value = on. New value = on
> ^[[0;36mDebug^[[0m: Puppet::Provider::netapp_volume_options: Matched Name 
> no_atime_update. Current value = on. New value = on
> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: Result is a hash.
> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: Returning result...
> ^[[0;36mDebug^[[0m: Checking if is.class and should.class are both 
> Hashes...
> ^[[0;36mDebug^[[0m: Both is.class and should.class are Hashes...
> ^[[0;36mDebug^[[0m: Comparing key values for try_first. Is = volume_grow 
> Should = snap_delete
> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: Got to options= 
> setter...
> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume_options: Setting = 
> try_first, Value = snap_delete
> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume_options: Volume Option 
> try_first set against Volume v_puppet_test1611120925.
> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume_options: Setting = 
> convert_ucode, Value = on
> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume_options: Volume Option 
> convert_ucode set against Volume v_puppet_test1611120925.
> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume_options: Setting = 
> no_atime_update, Value = on
> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume_options: Volume Option 
> no_atime_update set against Volume v_puppet_test1611120925.
> /Stage[main]//Node[actint-star-nactl01]/Netapp_volume[v_puppet_test1611120925]/options:
>  
> options changed '{"convert_ucode"=>"on", "try_first"=>"volume_grow", 
> "no_atime_update"=>"on"}' to '[{"try_first"=>"snap_delete", 
> "convert_ucode"=>"on", "no_atime_update"=>"on"}]'
>
>
Comments welcome. 

Cheers
Gavin  
*
*On Friday, 16 November 2012 11:23:41 UTC, Gavin Williams wrote:
>
> Ok, after a considerable amount of reading, and some expermentation, I 
> think I've got a working netapp_volume type/provider which can handle 
> setting volume options! :D
>
> Have branched the code to play with, so it's available here: 
> https://github.com/fatmcgav/fatmcgav-netapp/tree/volume_options_testing
>
> Overall, it seems to work quite well. When first creating volumes, it 
> correctly creates the volume using *create*, and then drops into *options=
> * to set the volume options, as shown in this log exert:
>
> ^[[0;32mInfo^[[0m: Applying configuration version '1353061861'
>> ^[[0;36mDebug^[[0m: 
>> /Stage[main]//Node[actint-star-nactl01]/Netapp_export[/vol/v_puppet_test1611120925/q_puppet_test1611120925]/require:
>>  
>> requires Netapp_qtree[q_puppet_test1611120925]
>> ^[[0;36mDebug^[[0m: 
>> /Stage[main]//Node[actint-star-nactl01]/Netapp_qtree[q_puppet_test1611120925]/require:
>>  
>> requires Netapp_volume[v_puppet_test1611120925]
>> ^[[0;36mDebug^[[0m: Stage[main]: Skipping host resources because running 
>> on a device
>> ^[[0;36mDebug^[[0m: Class[Main]: Skipping host resources because running 
>> on a device
>> ^[[0;36mDebug^[[0m: Node[actint-star-nactl01]: Skipping host resources 
>> because running on a device
>> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: checking existance 
>> of Netapp Volume v_puppet_test1611120925
>> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: Vol Info: > errno="13040" reason="No volume named 'v_puppet_test1611120925' exists" 
>> status="failed">
>> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: Volume doesn't exist.
>> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: creating Netapp 
>>

[Puppet Users] puppet dashboard

2012-11-16 Thread vioilly
Hi,

Can I have multiple puppet masters speaking to 1 puppet dashboard?

Cheers,
Oli

-- 
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/-/UXpL5_Vk4vcJ.
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 verion 2.7 or 3?

2012-11-16 Thread vioilly
That's a another reason for me to go toward 3.0.1. I assume it is a stable 
release?

On Thursday, November 15, 2012 4:28:03 PM UTC, Jeff McCune wrote:
>
> On Thu, Nov 15, 2012 at 9:45 AM, vioilly > 
> wrote: 
> > Hi, 
> > 
> > I am just rolling out a new puppet deployment. Which version should i go 
> > for, 2.7 or 3.1? I am looking to use the open source version. 
>
> Puppet 3.0 has a lot of performance improvements and some new 
> functionality compared to Puppet 2.7.  For a new deployment I 
> definitely recommend trying Puppet 3.0.  It's fairly easy to install 
> using the packages we publish at yum.puppetlabs.com and 
> apt.puppetlabs.com.  Information is available at: 
> http://docs.puppetlabs.com/guides/puppetlabs_package_repositories.html 
>
> The other thing to keep in mind is that Puppet uses semantic version 
> numbers.  There are some incompatibilities between Puppet 2.7 and 3.0. 
>  We will make every effort to preserve compatibility across the entire 
> 3.x series, so starting with 3.0 should give you a really long 
> "compatibility horizon" so to speak. 
>
> Hope this helps, 
> -Jeff 
>

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

2012-11-16 Thread llowder


On Friday, November 16, 2012 6:10:33 AM UTC-6, vioilly wrote:
>
> Hi,
>
> Can I have multiple puppet masters speaking to 1 puppet dashboard?
>
>
I don't see why not, just need to configure each one to send the reports.

If you are using the inventory service or the ENC it might get a little 
complicated but from what I have seen it shouldn't be too bad.

Just as a disclaimer, I only run with one master, so I could be rather off 
base here.
 

> Cheers,
> Oli
>
 

-- 
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/-/3u80bbRaYYQJ.
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: Params classes and best practices

2012-11-16 Thread jcbollinger


On Friday, November 16, 2012 4:12:13 AM UTC-6, Walter Heck - OlinData.com 
wrote:
>
> Hi all, 
>
> I've been wondering what is considered best practice when it comes to 
> $module_name::params classes? I see for instance the latest versions 
> of the apache and mysql modules from puppetlabs use static variables 
> which cannot be overridden: 
>
> https://github.com/puppetlabs/puppetlabs-mysql/blob/master/manifests/params.pp
>  
>
> https://github.com/puppetlabs/puppetlabs-apache/blob/master/manifests/params.pp
>  
>
>

How odd.

 

> But what if I want to install apache with ssl disabled? I see a few 
> options, all horribly bad: 
> 1) change the params.pp file to set $ssl = false 
> 2) change the module to use either hiera or class parameters which 
> allow setting this configuration flag. 
> 3) In the older days, we used to use a mechanism that allowed for 
> top-scope variables to set a module level variable. This was also 
> messy, but at least it worked: 
> https://github.com/Tribily/puppet-mariadb/blob/master/manifests/params.pp 
>
> I'd be happy to hear what 'we' consider industry standard. I'm leaning 
> towards class parameters for configuration variables that need to be 
> different from deployment to deployment. 
>
>
I would have to say that the standard, to the extent there is one, is to 
rely on hiera for feeding data to modules.  Classes can access 
hiera-provided data in a variety of ways, and foo::params classes can be 
fit into the picture in a variety of ways, but the key thing that the 
examples you pointed out fail to do is to decouple their main classes from 
a particular data source.  That's what hiera brings to the table.

With respect specifically to foo::params or similar classes, I think there 
are two patterns that are widely accepted and respected:

   1. Use a ::params class to provide *default* values in the event that no 
   other value is supplied by hiera (or some other means), or
   2. Use Hiera's puppet back end to integrate data from the class directly 
   into your data hierarchy.

There are different ways to implement those approaches, with somewhat more 
controversy attending them, but I think the basic ideas are pretty solid.

Also, do not be distressed if you were hoping for the One True Pattern for 
this sort of task.  If you look a bit deeper, you will see that those two 
patterns are really variations on the same theme.


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/-/mGSL9RqJJFcJ.
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 run failing

2012-11-16 Thread Pradeep Chhetri
I am using puppet-2.6.6-3.2 version.

$ rpm -qa | grep puppet
puppet-2.6.6-3.2.amzn1.x86_64
puppet-server-2.6.6-3.2.amzn1.x86_64



On Fri, Nov 16, 2012 at 2:20 AM, Jeff McCune  wrote:

> What version of Puppet?  The puppetca command is pretty old.
>
> -Jeff
>
> On Thu, Nov 15, 2012 at 3:17 AM, Pradeep Chhetri
>  wrote:
> > I removed from client only before. Still getting the same error.
> >
> >
> > On Thu, Nov 15, 2012 at 1:19 PM, Nikola Petrov 
> wrote:
> >>
> >> On Wed, Nov 14, 2012 at 11:28:54PM -0800, Pradeep Chhetri wrote:
> >> > Hello Everyone
> >> >
> >> > I was getting the error which running
> >> >
> >> > $ sudo puppet agent -t
> >> >
> >> > err: Could not request certificate: Retrieved certificate does not
> match
> >> > private key; please remove certificate from server and regenerate it
> >> > with
> >> > the current key
> >> >
> >> > To solve this, I first removed the certs from the puppet server for
> this
> >> > host using
> >> >
> >> > $  sudo puppetca --clean 
> >> >
> >> > And then removed the content inside directory /var/lib/puppet/ssl on
> the
> >> > client.
> >> >
> >> > Still it is giving me the same error. Can somebody help me solving
> this.
> >>
> >> Can you please try to cleanup the ssl certificate on the client too. You
> >> can just move the ssl directory(in case you want to revert it). It is in
> >> the same location /var/lib/puppet/ssl
> >>
> >> --
> >> Nikola
> >>
> >> --
> >> 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.
> >>
> >
> >
> >
> > --
> > Pradeep Chhetri
> >
> > In the world of Linux, who needs Windows and Gates...
> >
> > --
> > 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.
>
>


-- 
Pradeep Chhetri

In the world of Linux, who needs Windows and Gates...

-- 
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: Dynamic Collection?

2012-11-16 Thread jcbollinger


On Thursday, November 15, 2012 6:01:24 PM UTC-6, Rajul Vora wrote:
>
>
> I want to do something like this:
>
> class foo ( $collection ) {
>
> User <|  $collection |>
>
> }
>
> where $collection would be a string like "group == admin or group == 
> powerusers"
>
> Doesn't work. Is there an alternative way to do this?
>
> Syntax error at '|>'; expected '}'
>


It depends on what you mean by "this".  As far as I know, there is no way 
to implement so dynamic a collection predicate as you want, though you can 
do this:

define mymodule::usergroup() {
  User<| group == $name |>
}

(Or you could do the something similar with a class, but a defined type is 
probably better for modeling this sort of thing.)  You can augment that in 
various ways, but I think a perceived need to be as generic as you wanted 
reflects a modeling problem.

Consider also whether you need to wrap that collection at all.  Would it be 
a problem to just write

  User<| group == 'admin' |>

instead of

  mymodule::usergroup { 'admin': }

(or a comparable class declaration)?

I suppose you're actually working on something more complex, of which the 
collection is just one part.  I'm inclined to think there is a deeper 
problem with your design if you perceive a need for such a generic 
collection, but unless you explain the real problem you're trying to solve, 
there's not much more I can do for 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/-/r6cP6vML_00J.
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: Initial run problems

2012-11-16 Thread jcbollinger


On Thursday, November 15, 2012 3:04:57 PM UTC-6, Bret Wortman wrote:
>
> Nope. Same outcome. Numerous "No child processes" errors.
>

I'm not up to performing a code dive at the moment to find out where those 
messages may be emitted, but that might be useful information to have.

It might also be illuminating to strace an agent run to get a low-level 
view of what's failing.

I'm inclined to think that this is a provisioning problem, not inherently a 
Puppet problem, but there's not enough information to be sure.


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/-/Cda5Bkajl4kJ.
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] delete a file created with puppet

2012-11-16 Thread Alex Stanhope
I'd like to create a file, use it in a number of other puppetted processes, 
then clean it up.

I can create it:
  file { 'bash-agent-key' :
path => "/home/${user}/.bash_keyautoload.tmp", 
content => template('ssh_agent_add/bash_keyautoload.erb'),
mode => 0700,
owner => $user,
group => $user,
  }

but when I try to delete it with either:
  file { 'bash-agent-key' :
ensure => absent,
  }
or
  file { 'bash-agent-key-delete' :
path => "/home/${user}/.bash_keyautoload.tmp", 
ensure => absent,
  }

I get an error message:
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Duplicate declaration: File[bash-agent-key] is already declared in file 
/etc/puppet/modules/ssh_agent_add/manifests/init.pp at line 47; cannot 
redeclare on node
or
Error: Failed to apply catalog: Cannot alias File[bash-agent-key-delete] to 
["/home/lightenn/.bash_keyautoload.tmp"] at 
/etc/puppet/modules/ssh_agent_add/manifests/init.pp:73; resource ["File", 
"/home/lightenn/.bash_keyautoload.tmp"] already declared at 
/etc/puppet/modules/ssh_agent_add/manifests/init.pp:47

Any guidance much appreciated.

-- 
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/-/7_kAU6lJTNQJ.
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] Scope object available functions and getting the local scope, or node scope variable values

2012-11-16 Thread Jayapandian Ponraj
Is there a way to get the local scope values of puppet variables via 
scope.? wat r all the available functions in scope? can anyone provide a 
working example.

-- 
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/-/zVW-0uI2yMAJ.
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: new puppet client not updating

2012-11-16 Thread jcbollinger


On Thursday, November 15, 2012 7:55:33 PM UTC-6, JGonza1 wrote:
>
> I do see the that the client server pdlnx-pntp02.kareoprod.ent does have a 
> certificate on the master under the directory /etc/puppet/ssl/ca/signed. 
> Also the the puppet master I do not have auto-signing turned on. I have to 
> run the puppet cert --sign  command to create the certificate.
>
>
The question then remains why the master is not associating the new nodes 
with the node block(s) you created for them.  That was the thrust of the 
other question and suggestion in my previous response (about what file the 
node block appears in, and about running the master with the --debug switch 
enabled).  So?

Perhaps it will save some time if I point out that there is only one 
manifest that Puppet reads automatically.  Its name and location are 
configurable, but by default it is manifests/site.pp under your Puppet 
installation directory (often /etc/puppet).  Your node blocks should be 
either in that manifest or in a manifest 'import'ed directly or indirectly 
by it (and that is the only good use I know for the 'import' function).

Furthermore, the puppet master process must be able to read the file 
containing the node block.  That process normally runs without privilege, 
so you must ensure that ownership and permissions (and any other access 
controls) on that file and every directory in the path to it allow access 
to the master process.

If the master cannot or does not load the node block, then the declarations 
in it will not be applied.  If the master does load the node block but does 
not match it to your node, then either the node's certname is not what you 
think it is, or some other node block is matching at higher priority (see 
http://docs.puppetlabs.com/puppet/3/reference/lang_node_definitions.html#matching).


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

2012-11-16 Thread John Dixon


> If you are using the inventory service or the ENC it might get a little 
> complicated but from what I have seen it shouldn't be too bad.
>
> Just as a disclaimer, I only run with one master, so I could be rather off 
> base here.
>  
>
>> Cheers,
>> Oli
>>
>  
>
We use one dashboard and have 3 masters, one per location.  The masters are 
not even using the same ca.  Less than ideal, but it works and leaves us 
some room for improvement.  We do not use the inventory service or ENC with 
dashboard. 

-- 
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/-/m0A-JA4AB5QJ.
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: Initial run problems

2012-11-16 Thread Bret Wortman
I'm absolutely ready for this to be something I've not done properly during
the kickstart process. I'm just getting started with these tools, so that's
definitely a strong probability. I'll do this again shortly with strace and
see what it reveals.

-- 
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] Sending output to debug level log from custom parser function

2012-11-16 Thread Abhijeet R

Thanks. That worked. :)

On Wed 14 Nov 2012 10:11:10 PM IST, Jeff McCune wrote:

On Wed, Nov 14, 2012 at 4:29 AM, Abhijeet R  wrote:

Hi,

I created a custom function by reading the doc from here
http://docs.puppetlabs.com/guides/custom_functions.html

It's a function to return proper filepath for a specific node by looking at
various stuff like facter, absolute path location etc. Now, I have a
requirement to log the actual path returned by the function in
/var/log/puppet/puppet.log.

How can I do that? Does this question better suited for puppet-dev or it can
be done easily? I want to use the function that's used to send debug log in
custom parser function.


You can simply use `debug "Hello World!"` inside the block passed to
the `newfunction` method.  You can see how the built in template()
function logs debug messages at:

https://github.com/puppetlabs/puppet/blob/3.0.1/lib/puppet/parser/functions/template.rb#L11

Hope this helps,
-Jeff



--
Cheers,
Abhijeet R
http://blog.abhijeetr.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] Puppet run failing

2012-11-16 Thread Jeff McCune
On Fri, Nov 16, 2012 at 9:17 AM, Pradeep Chhetri
 wrote:
> I am using puppet-2.6.6-3.2 version.
>
> $ rpm -qa | grep puppet
> puppet-2.6.6-3.2.amzn1.x86_64
> puppet-server-2.6.6-3.2.amzn1.x86_64

Do you still have the problem with 2.7.20 or 3.0.1 ?  Puppet 2.6 is
quite old at this point.

-Jeff

-- 
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] OSX 10.8 - Puppet 3.0.1 fails to start as root

2012-11-16 Thread Trey Ormsbee
Im new to puppet on mac,  so i might be doing something wrong...  However, 
 I cannot get puppet to run as the root user.  I get messages regarding not 
being able to create the required directories.  Here is the debug/trace 
outbput that I am getting:

Debug: Puppet::Type::User::ProviderUser_role_add: file rolemod does not 
exist
Debug: Puppet::Type::User::ProviderUseradd: file userdel does not exist
Debug: Puppet::Type::User::ProviderPw: file pw does not exist
Debug: Failed to load library 'ldap' for feature 'ldap'
Debug: Puppet::Type::User::ProviderLdap: feature ldap is missing
Debug: Executing '/usr/bin/dscl -plist . -list /Users'
Debug: Executing '/usr/bin/dscl -plist . -read /Users/puppet'
Debug: Executing '/usr/bin/plutil -convert xml1 -o /dev/stdout 
/var/db/dslocal/nodes/Default/users/puppet.plist'
Debug: Converting binary plist to XML
Debug: Executing: 'plutil -convert xml1 -o - -'
Debug: Converting XML values to a hash.
Error: Could not create resources for managing Puppet's files and 
directories in sections [:main, :agent, :ssl]: undefined method `string' 
for nil:NilClass
/Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:323:in 
`get_password'
/Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:149:in 
`generate_attribute_hash'
/Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:177:in 
`single_report'
/Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:581:in 
`getinfo'
/Library/Ruby/Site/1.8/puppet/provider/nameservice.rb:200:in `exists?'
/Library/Ruby/Site/1.8/puppet/type/user.rb:355:in `exists?'
/Library/Ruby/Site/1.8/puppet/settings.rb:715:in `service_user_available?'
/Library/Ruby/Site/1.8/puppet/settings/file_setting.rb:45:in 
`use_service_user?'
/Library/Ruby/Site/1.8/puppet/settings/file_setting.rb:40:in `owner'
/Library/Ruby/Site/1.8/puppet/settings/file_setting.rb:93:in `to_resource'
/Library/Ruby/Site/1.8/puppet/settings.rb:834:in `to_catalog'
/Library/Ruby/Site/1.8/puppet/settings.rb:831:in `each'
/Library/Ruby/Site/1.8/puppet/settings.rb:831:in `to_catalog'
/Library/Ruby/Site/1.8/puppet/settings.rb:891:in `use'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/sync.rb:230:in
 
`synchronize'
/Library/Ruby/Site/1.8/puppet/settings.rb:885:in `use'
/Library/Ruby/Site/1.8/puppet/application/agent.rb:451:in `setup'
/Library/Ruby/Site/1.8/puppet/application.rb:344:in `run'
/Library/Ruby/Site/1.8/puppet/application.rb:438:in `plugin_hook'
/Library/Ruby/Site/1.8/puppet/application.rb:344:in `run'
/Library/Ruby/Site/1.8/puppet/util.rb:500:in `exit_on_fail'
/Library/Ruby/Site/1.8/puppet/application.rb:344:in `run'
/Library/Ruby/Site/1.8/puppet/util/command_line.rb:87:in `execute'
/usr/bin/puppet:4
Error: Could not prepare for execution: Could not create resources for 
managing Puppet's files and directories in sections [:main, :agent, :ssl]: 
undefined method `string' for nil:NilClass
undefined method `string' for nil:NilClass
/Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:323:in 
`get_password'
/Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:149:in 
`generate_attribute_hash'
/Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:177:in 
`single_report'
/Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:581:in 
`getinfo'
/Library/Ruby/Site/1.8/puppet/provider/nameservice.rb:200:in `exists?'
/Library/Ruby/Site/1.8/puppet/type/user.rb:355:in `exists?'
/Library/Ruby/Site/1.8/puppet/settings.rb:715:in `service_user_available?'
/Library/Ruby/Site/1.8/puppet/settings/file_setting.rb:45:in 
`use_service_user?'
/Library/Ruby/Site/1.8/puppet/settings/file_setting.rb:40:in `owner'
/Library/Ruby/Site/1.8/puppet/settings/file_setting.rb:93:in `to_resource'
/Library/Ruby/Site/1.8/puppet/settings.rb:834:in `to_catalog'
/Library/Ruby/Site/1.8/puppet/settings.rb:831:in `each'
/Library/Ruby/Site/1.8/puppet/settings.rb:831:in `to_catalog'
/Library/Ruby/Site/1.8/puppet/settings.rb:891:in `use'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/sync.rb:230:in
 
`synchronize'
/Library/Ruby/Site/1.8/puppet/settings.rb:885:in `use'
/Library/Ruby/Site/1.8/puppet/application/agent.rb:451:in `setup'
/Library/Ruby/Site/1.8/puppet/application.rb:344:in `run'
/Library/Ruby/Site/1.8/puppet/application.rb:438:in `plugin_hook'
/Library/Ruby/Site/1.8/puppet/application.rb:344:in `run'
/Library/Ruby/Site/1.8/puppet/util.rb:500:in `exit_on_fail'
/Library/Ruby/Site/1.8/puppet/application.rb:344:in `run'
/Library/Ruby/Site/1.8/puppet/util/command_line.rb:87:in `execute'
/usr/bin/puppet:4


Note that running as a regular user works fine... just not as root.  Maybe 
root is not required to run the puppet agent on mac??  I do not know.  I 
also see there are some bugs on the issue tracker with similar errors,  but 
the posters of those bugs dont seem to have the problem of not being able 
to start puppet as root.

Any idea what 

[Puppet Users] Re: new puppet client not updating

2012-11-16 Thread jcbollinger


On Friday, November 16, 2012 9:05:38 AM UTC-6, jcbollinger wrote:
>
>
> [...] If the master does load the node block but does not match it to your 
> node, then either the node's certname is not what you think it is, or [...].
>
>
One notable possibility along those lines is if your new nodes' ideas of 
their own hostnames are unqualified (e.g. "pdlnx-pntp02" instead of 
"pdlnx-pntp02.kareoprod.ent").  You should be able to check that via the 
'hostname' command.  I think in that in choosing the hostname as certname 
by default, Puppet will in such cases use the unqualified name as 
certname.  That will not match the fully-qualified node name in your node 
declaration.

The reverse is ok, however: if your node's certname is a fully-qualified 
name and Puppet does not match the whole thing, then it will attempt to 
match the just the local part.


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/-/dqgzpqXZuSgJ.
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] Fwd: Call for talks: Configuration/Systems Management DevRoom at FOSDEM 2013

2012-11-16 Thread Dawn Foster
We posted this to the FOSDEM mailing lists, but I wanted to cross post
it here to encourage all of you to submit config/systems mgmt or
DevOps talks for FOSDEM.

Or you might just want to save the date on your calendar to attend the
Configuration/Systems Management DevRoom on Saturday, February 2, 2013
in Brussels, Belgium.

Dawn


-- Forwarded message --
From: Dawn Foster 
Date: Thu, Nov 15, 2012 at 7:40 PM
Subject: Call for talks: Configuration/Systems Management DevRoom at FOSDEM 2013
To: fos...@lists.fosdem.org, config-mgmt-devr...@lists.fosdem.org


FOSDEM 2013 - https://fosdem.org/2013/

Configuration/Systems Management DevRoom -
https://lists.fosdem.org/listinfo/config-mgmt-devroom

Saturday, the 2nd of February 2013, 09:00 to 17:00, Brussels, Belgium

Contact: config-mgmt-devr...@lists.fosdem.org

We will be holding a Configuration/Systems Management DevRoom at
FOSDEM 2013 and are requesting abstracts for structured presentations
now.

Important information, dates:
* Submission deadline for abstracts: 2012-12-15
* Notification of accepted speakers: 2012-12-25
* Final schedule: 2013-01-11

** About this DevRoom **

DevOps has created a renaissance for managing technology.  There is
huge interest in automation, monitoring, performance management,
configuration management, DevOps and the cloud.  We're seeking people
who are working in the field, interested in the field, or just
interested in learning more about how to manage infrastructure better,
cheaper and faster.

We invite you to submit talks on these topics:

* Configuration and Systems Management theory & principles
* Configuration and Systems Management tools - with an emphasis on
real world use cases
* Techniques and case studies
* Audit, Compliance and Security
* Various DevOps topics, including collaboration and training tips.

We're looking for talks on the cutting edge of systems tools and
configuration management. This is your opportunity to show off and
tell us what makes your environment shine! Some examples of things you
might want to cover in your proposed talk:
* how did you collaborate with your developers to integrate configuration mgmt
* how did you make the case for config mgmt
* how do you train people on config mgmt (pitfalls etc..)
* what do developers think about config mgmt
* where do you draw the line between system configs and application configs
* a cost analysis for using configuration management - is it worth it :)
* if you could wave a magic wand, what would you change in the current
mgmt systems

We have a selection committee made up of the following people who will
review the CFPs and decide which sessions will be part of the
Configuration/Systems Management DevRoom:
* Eric Sorenson
* Kris Buytaert
* Brice Figureau
* Patrick Debois
* Alessandro Franceschi
* We may add an additional person or 2

** Your submission must include:**

* Your name

* The title of your talk

* A short abstract of one to two paragraphs (150 words, max.)

* A short biography

* Links to related websites/blogs etc.

Send the abstracts to:

config-mgmt-devr...@lists.fosdem.org

Presentations are to be formal and not longer than 30 minutes, plus 15
extra for questions (45 in total). Panels with more than one speaker
are something we're also seeking, a "My configuration management tools
are the awesomest and I'll debate that!" is possible, as are shorter
presentations of 20 minutes.  We're also exploring some un-conference
style presentations too.

The deadline for submissions is December 15, 2012. If your proposal
has been accepted, you will be informed by email by December 25, 2013.

Please feel free to forward this call for abstracts and papers to
relevant lists, people and sites. We're looking forward to seeing lots
of interested folks, have lots of spirited presentations, debates,
discussion and ... quite possibly drinking.

-- 
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: Dynamic Collection?

2012-11-16 Thread Rajul Vora

Thanks for the effort in explaining these alternatives. I apologize I 
didn't do justice to explaining the bigger picture in the first place.

So here it goes:

Goal: Use hiera to provision different groups of users in different 
environments.

Approach: First create virtual users from hiera that lists all possible 
users and then realizing "collection" of users that are also defined in 
hiera using the <| expression |> to combine various groups. I like this 
approach because I can list every possible user in a single hiera file so I 
can keep the UIDs sequential as I add new users, etc.

So the main problem here is that the thing that goes between the spaceship 
operators is dynamic.

I am using erwbgy/puppet-system module which has been extended to support 
virtual users.

E.g. My hieradata would look like this:


   - common.yaml:
  - system::virt_users:
 - 'user1':
- uid: 1001
- groups: ["A", "B", "C"]
 - 'user2':
- uid: 1002
- groups: [ "A" ]
 - 'user3':
- uid: 1003
- groups: [ "C" ]
 - and so on
  - production.yaml:
  - system::realize_users: group == "A"
   - qa.yaml:
  - system::realize_users: group == "A" or group == "B"
   - dev.yaml:
  - system::realize_users:# empty value that should mean all 
  matching virtual users like <|  |>
   
So the "foo" class in my original post would really be something like this:

# system module does hiera lookup in init.pp but I am simplifying below to 
make code concise for this discussion
class system::realize_users ( $collection=hiera("system::realize_users") {
  User <| $collection |>
}


I am not married to this approach or module. So any other approach to 
achieve my goal listed above would do.

Thanks,

Rajul

On Friday, November 16, 2012 6:38:13 AM UTC-8, jcbollinger wrote:

>
>
> On Thursday, November 15, 2012 6:01:24 PM UTC-6, Rajul Vora wrote:
>>
>>
>> I want to do something like this:
>>
>> class foo ( $collection ) {
>>
>> User <|  $collection |>
>>
>> }
>>
>> where $collection would be a string like "group == admin or group == 
>> powerusers"
>>
>> Doesn't work. Is there an alternative way to do this?
>>
>> Syntax error at '|>'; expected '}'
>>
>
>
> It depends on what you mean by "this".  As far as I know, there is no way 
> to implement so dynamic a collection predicate as you want, though you can 
> do this:
>
> define mymodule::usergroup() {
>   User<| group == $name |>
> }
>
> (Or you could do the something similar with a class, but a defined type is 
> probably better for modeling this sort of thing.)  You can augment that in 
> various ways, but I think a perceived need to be as generic as you wanted 
> reflects a modeling problem.
>
> Consider also whether you need to wrap that collection at all.  Would it 
> be a problem to just write
>
>   User<| group == 'admin' |>
>
> instead of
>
>   mymodule::usergroup { 'admin': }
>
> (or a comparable class declaration)?
>
> I suppose you're actually working on something more complex, of which the 
> collection is just one part.  I'm inclined to think there is a deeper 
> problem with your design if you perceive a need for such a generic 
> collection, but unless you explain the real problem you're trying to solve, 
> there's not much more I can do for 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/-/-ufmqi2Q2gEJ.
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: delete a file created with puppet

2012-11-16 Thread Ellison Marks
You're trying something that's essentially timing based in puppet, which is 
more state based. You can't really tell puppet that a file should exist and 
not exist in the same run. Could you give some more info on what you're 
trying to accomplish with this? That way we might offer some ideas to help.

On Friday, November 16, 2012 4:04:05 AM UTC-8, Alex Stanhope wrote:
>
> I'd like to create a file, use it in a number of other puppetted 
> processes, then clean it up.
>
> I can create it:
>   file { 'bash-agent-key' :
> path => "/home/${user}/.bash_keyautoload.tmp", 
> content => template('ssh_agent_add/bash_keyautoload.erb'),
> mode => 0700,
> owner => $user,
> group => $user,
>   }
>
> but when I try to delete it with either:
>   file { 'bash-agent-key' :
> ensure => absent,
>   }
> or
>   file { 'bash-agent-key-delete' :
> path => "/home/${user}/.bash_keyautoload.tmp", 
> ensure => absent,
>   }
>
> I get an error message:
> Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
> Duplicate declaration: File[bash-agent-key] is already declared in file 
> /etc/puppet/modules/ssh_agent_add/manifests/init.pp at line 47; cannot 
> redeclare on node
> or
> Error: Failed to apply catalog: Cannot alias File[bash-agent-key-delete] 
> to ["/home/lightenn/.bash_keyautoload.tmp"] at 
> /etc/puppet/modules/ssh_agent_add/manifests/init.pp:73; resource ["File", 
> "/home/lightenn/.bash_keyautoload.tmp"] already declared at 
> /etc/puppet/modules/ssh_agent_add/manifests/init.pp:47
>
> Any guidance much appreciated.
>

-- 
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/-/e2emA3vuAhoJ.
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] Sending debug messages from manifests

2012-11-16 Thread Abhijeet R

Hi,

I created a custom function named debug_msg() which could used to send 
different kind of debug messages straight from the manifest.

It can be used something like:

debug_msg("notice","NOTICE message")
debug_msg("debug", "Send as a debug message")

More information can  be found here: 
http://blog.abhijeetr.com/2012/11/execute-ruby-code-from-within-puppet.html


Shouldn't this be included in the standard puppet? Or if it's helpful, 
why isn't it already included? Or is it already there and it's just that 
I don't know it?


--
Cheers,
Abhijeet R
http://blog.abhijeetr.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: delete a file created with puppet

2012-11-16 Thread Alex Stanhope
On Friday, November 16, 2012 5:11:22 PM UTC, Ellison Marks wrote: 

> Could you give some more info on what you're trying to accomplish with 
> this? That way we might offer some ideas to help.
>

Of course.  I use a temporary file to store a private key passphrase.  That 
passphrase is used to allow the client machine to load the private key, and 
clone repositories from github.  After puppet has installed the client 
machine, I'd like it to delete this temporary file, so that future logins 
prompt the user for the password.  It's not the end of the world to leave 
it there, or for me to clean it up manually.  I know I could use 
passwordless private keys, but I think it's better security to have 
passphrases on them.

-- 
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/-/W1WwX2NxqXsJ.
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: OSX 10.8 - Puppet 3.0.1 fails to start as root

2012-11-16 Thread Ellison Marks
Isn't the root account disabled by default on OSX? If you haven't 
explicitly enabled it, that might be the problem...

On Friday, November 16, 2012 7:51:38 AM UTC-8, Trey Ormsbee wrote:
>
> Im new to puppet on mac,  so i might be doing something wrong...  However, 
>  I cannot get puppet to run as the root user.  I get messages regarding not 
> being able to create the required directories.  Here is the debug/trace 
> outbput that I am getting:
>
> Debug: Puppet::Type::User::ProviderUser_role_add: file rolemod does not 
> exist
> Debug: Puppet::Type::User::ProviderUseradd: file userdel does not exist
> Debug: Puppet::Type::User::ProviderPw: file pw does not exist
> Debug: Failed to load library 'ldap' for feature 'ldap'
> Debug: Puppet::Type::User::ProviderLdap: feature ldap is missing
> Debug: Executing '/usr/bin/dscl -plist . -list /Users'
> Debug: Executing '/usr/bin/dscl -plist . -read /Users/puppet'
> Debug: Executing '/usr/bin/plutil -convert xml1 -o /dev/stdout 
> /var/db/dslocal/nodes/Default/users/puppet.plist'
> Debug: Converting binary plist to XML
> Debug: Executing: 'plutil -convert xml1 -o - -'
> Debug: Converting XML values to a hash.
> Error: Could not create resources for managing Puppet's files and 
> directories in sections [:main, :agent, :ssl]: undefined method `string' 
> for nil:NilClass
> /Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:323:in 
> `get_password'
> /Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:149:in 
> `generate_attribute_hash'
> /Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:177:in 
> `single_report'
> /Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:581:in 
> `getinfo'
> /Library/Ruby/Site/1.8/puppet/provider/nameservice.rb:200:in `exists?'
> /Library/Ruby/Site/1.8/puppet/type/user.rb:355:in `exists?'
> /Library/Ruby/Site/1.8/puppet/settings.rb:715:in `service_user_available?'
> /Library/Ruby/Site/1.8/puppet/settings/file_setting.rb:45:in 
> `use_service_user?'
> /Library/Ruby/Site/1.8/puppet/settings/file_setting.rb:40:in `owner'
> /Library/Ruby/Site/1.8/puppet/settings/file_setting.rb:93:in `to_resource'
> /Library/Ruby/Site/1.8/puppet/settings.rb:834:in `to_catalog'
> /Library/Ruby/Site/1.8/puppet/settings.rb:831:in `each'
> /Library/Ruby/Site/1.8/puppet/settings.rb:831:in `to_catalog'
> /Library/Ruby/Site/1.8/puppet/settings.rb:891:in `use'
> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/sync.rb:230:in
>  
> `synchronize'
> /Library/Ruby/Site/1.8/puppet/settings.rb:885:in `use'
> /Library/Ruby/Site/1.8/puppet/application/agent.rb:451:in `setup'
> /Library/Ruby/Site/1.8/puppet/application.rb:344:in `run'
> /Library/Ruby/Site/1.8/puppet/application.rb:438:in `plugin_hook'
> /Library/Ruby/Site/1.8/puppet/application.rb:344:in `run'
> /Library/Ruby/Site/1.8/puppet/util.rb:500:in `exit_on_fail'
> /Library/Ruby/Site/1.8/puppet/application.rb:344:in `run'
> /Library/Ruby/Site/1.8/puppet/util/command_line.rb:87:in `execute'
> /usr/bin/puppet:4
> Error: Could not prepare for execution: Could not create resources for 
> managing Puppet's files and directories in sections [:main, :agent, :ssl]: 
> undefined method `string' for nil:NilClass
> undefined method `string' for nil:NilClass
> /Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:323:in 
> `get_password'
> /Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:149:in 
> `generate_attribute_hash'
> /Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:177:in 
> `single_report'
> /Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:581:in 
> `getinfo'
> /Library/Ruby/Site/1.8/puppet/provider/nameservice.rb:200:in `exists?'
> /Library/Ruby/Site/1.8/puppet/type/user.rb:355:in `exists?'
> /Library/Ruby/Site/1.8/puppet/settings.rb:715:in `service_user_available?'
> /Library/Ruby/Site/1.8/puppet/settings/file_setting.rb:45:in 
> `use_service_user?'
> /Library/Ruby/Site/1.8/puppet/settings/file_setting.rb:40:in `owner'
> /Library/Ruby/Site/1.8/puppet/settings/file_setting.rb:93:in `to_resource'
> /Library/Ruby/Site/1.8/puppet/settings.rb:834:in `to_catalog'
> /Library/Ruby/Site/1.8/puppet/settings.rb:831:in `each'
> /Library/Ruby/Site/1.8/puppet/settings.rb:831:in `to_catalog'
> /Library/Ruby/Site/1.8/puppet/settings.rb:891:in `use'
> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/sync.rb:230:in
>  
> `synchronize'
> /Library/Ruby/Site/1.8/puppet/settings.rb:885:in `use'
> /Library/Ruby/Site/1.8/puppet/application/agent.rb:451:in `setup'
> /Library/Ruby/Site/1.8/puppet/application.rb:344:in `run'
> /Library/Ruby/Site/1.8/puppet/application.rb:438:in `plugin_hook'
> /Library/Ruby/Site/1.8/puppet/application.rb:344:in `run'
> /Library/Ruby/Site/1.8/puppet/util.rb:500:in `exit_on_fail'
> /Library/Ruby/Site/1.8/puppet/application.rb:344:in `run'
> /Library/Ruby/Site/1.8/puppet/util/command_line.rb:87:in `execute'
> 

Re: [Puppet Users] Getting Started with Hiera

2012-11-16 Thread Rajul Vora
http://docs.puppetlabs.com/hiera/1/index.html is the only document I could 
find and some of the pages are empty or light on content. I also did git 
clone of the hiera project from github to read some of the docs / code / 
examples there.

Also, the Puppet function reference has no documentation (says 
"Undocumented") on the hiera, hiera_array, hiera_hash function. The ruby 
code for these functions has absolutely no comments either.

Good luck.

It would be interesting to hear what you had in mind in terms of using 
hiera to help verify post-install functionality.

Rajul

On Friday, November 16, 2012 2:22:22 AM UTC-8, Martin Alfke wrote:
>
> Hi,
> On 15.11.2012, at 19:20, Worker Bee wrote:
>
> Hi Everyone;
>
> Can anyone direct me towards documentation on getting started with Hiera?  
> SPecifically, I ma looking for an easy way to verify post-install 
> functionality.
>
> I did visit the following page which is is blank...
> http://docs.puppetlabs.com/hiera/1/puppet.html
>
> Any help would be greatly appreciated!
>
>
> Here: http://docs.puppetlabs.com/#hierahiera1
> you will find a list of links covering hiera installation, configuration 
> and examples.
>
> hth,
>
> Martin
>
>

-- 
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/-/vVRP4cF_zf0J.
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: Sending debug messages from manifests

2012-11-16 Thread Abhijeet R

Sorry, the code for the custom function is:

Puppet::Parser::Functions::newfunction(:debug_msg, :type => :statement, 
:doc => "

Send messages to a particular debug level
") do |vals|

 $level, $code_to_execute = vals
 $possible_levels = 
["debug","info","notice","warning","err","alert","emerg","crit"]

 if $possible_levels.include? $level
 else
   raise(ArgumentError, 'Must specify proper debug type. It can be 
either "debug","info","notice","warning","err","alert","emerg" or 
"crit" ')

 end
 $dummy = function_inline_template("<% " + "Puppet." + $level + "(\"" 
+  $code_to_execute + "\")" + "%>")

end

On Fri 16 Nov 2012 10:46:38 PM IST, Abhijeet R wrote:

Hi,

I created a custom function named debug_msg() which could used to send
different kind of debug messages straight from the manifest.
It can be used something like:

debug_msg("notice","NOTICE message")
debug_msg("debug", "Send as a debug message")

More information can  be found here:
http://blog.abhijeetr.com/2012/11/execute-ruby-code-from-within-puppet.html


Shouldn't this be included in the standard puppet? Or if it's helpful,
why isn't it already included? Or is it already there and it's just
that I don't know it?



--
Cheers,
Abhijeet R
http://blog.abhijeetr.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: Sending debug messages from manifests

2012-11-16 Thread Rajul Vora
Aren't all of these functions already available?

http://docs.puppetlabs.com/references/latest/function.html

Rajul

On Friday, November 16, 2012 9:22:57 AM UTC-8, Abhijeet Rastogi wrote:
>
> Sorry, the code for the custom function is: 
>
> Puppet::Parser::Functions::newfunction(:debug_msg, :type => :statement, 
> :doc => " 
> Send messages to a particular debug level 
> ") do |vals| 
>
>   $level, $code_to_execute = vals 
>   $possible_levels = 
> ["debug","info","notice","warning","err","alert","emerg","crit"] 
>   if $possible_levels.include? $level 
>   else 
> raise(ArgumentError, 'Must specify proper debug type. It can be 
> either "debug","info","notice","warning","err","alert","emerg" or 
> "crit" ') 
>   end 
>   $dummy = function_inline_template("<% " + "Puppet." + $level + "(\"" 
> +  $code_to_execute + "\")" + "%>") 
> end 
>
> On Fri 16 Nov 2012 10:46:38 PM IST, Abhijeet R wrote: 
> > Hi, 
> > 
> > I created a custom function named debug_msg() which could used to send 
> > different kind of debug messages straight from the manifest. 
> > It can be used something like: 
> > 
> > debug_msg("notice","NOTICE message") 
> > debug_msg("debug", "Send as a debug message") 
> > 
> > More information can  be found here: 
> > 
> http://blog.abhijeetr.com/2012/11/execute-ruby-code-from-within-puppet.html 
> > 
> > 
> > Shouldn't this be included in the standard puppet? Or if it's helpful, 
> > why isn't it already included? Or is it already there and it's just 
> > that I don't know it? 
> > 
>
> -- 
> Cheers, 
> Abhijeet R 
> http://blog.abhijeetr.com 
> http://docs.puppetlabs.com/references/latest/function.html
>

-- 
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/-/-t69u_QMC_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] Re: puppet dashboard

2012-11-16 Thread Oliver Leach
This sounds like what I want. I have different production networks and I
was hoping I could have one master looking after each production network
and all masters using the 1 dashboard. Each of the masters could be their
own ca for their respective production networks which could work well. How
would you point all the masters to the one dashboard? Does the dashboard
display all the puppet nodes for all master?

Thanks for your help!

Oli
--

We use one dashboard and have 3 masters, one per location.  The masters are
> not even using the same ca.  Less than ideal, but it works and leaves us
> some room for improvement.  We do not use the inventory service or ENC with
> dashboard.
>
>
>

-- 
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: Sending debug messages from manifests

2012-11-16 Thread Abhijeet R
Oh, for some reason, I missed that. They are already available. I am 
new to puppet. I should really read all the reference before doing 
things myself.


Sorry for the trouble guys. I wish I could delete the irrelevant post 
but this is a ML. :(


On Fri 16 Nov 2012 11:06:49 PM IST, Rajul Vora wrote:

Aren't all of these functions already available?

http://docs.puppetlabs.com/references/latest/function.html

Rajul


--
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: Initial run problems

2012-11-16 Thread Bret Wortman
On Friday, November 16, 2012 9:47:28 AM UTC-5, jcbollinger wrote:
>
>
>
> On Thursday, November 15, 2012 3:04:57 PM UTC-6, Bret Wortman wrote:
>>
>> Nope. Same outcome. Numerous "No child processes" errors.
>>
>
> I'm not up to performing a code dive at the moment to find out where those 
> messages may be emitted, but that might be useful information to have.
>
> It might also be illuminating to strace an agent run to get a low-level 
> view of what's failing.
>
> I'm inclined to think that this is a provisioning problem, not inherently 
> a Puppet problem, but there's not enough information to be sure.
>
>
> John
>
> I ran this with strace, and it produced 840K of output. It's on another 
network and I can't transfer the file to here for various reasons. Is there 
something I can look for and transcribe that might be illustrative?

-- 
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/-/cbIdN9N983kJ.
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 over passenger: The environment must be purely alphanumeric, not ''

2012-11-16 Thread Andrew Gooding
This is the config.ru file that I have inside the folder 
/usr/share/puppet-dashboard :

# a config.ru, for use with every rack-compatible webserver.
# SSL needs to be handled outside this, though.

# if puppet is not in your RUBYLIB:
# $LOAD_PATH.unshift('/opt/puppet/lib')

$0 = "master"

# if you want debugging:
# ARGV << "--debug"

ARGV << "--rack"

# Rack applications typically don't start as root.  Set --confdir to prevent
# reading configuration from ~/.puppet/puppet.conf
ARGV << "--confdir" << "/etc/puppet"

# NOTE: it's unfortunate that we have to use the "CommandLine" class
#  here to launch the app, but it contains some initialization logic
#  (such as triggering the parsing of the config file) that is very
#  important.  We should do something less nasty here when we've
#  gotten our API and settings initialization logic cleaned up.
#
# Also note that the "$0 = master" line up near the top here is
#  the magic that allows the CommandLine class to know that it's
#  supposed to be running master.
#
# --cprice 2012-05-22

require 'puppet/application/master'
# we're usually running inside a Rack::Builder.new {} block,
# therefore we need to call run *here*.
run Puppet::Application[:master].run


Where should I apply the changes?

On Thursday, October 18, 2012 10:37:54 AM UTC-7, Eric Sorenson wrote:
>
> Hi andrew, that error is one that comes from the puppet master process 
> itself when you connect to it with a regular HTTP client. So it looks like 
> your apache virtualhost setup is pointing connections to that port/host at 
> the puppetmaster config.ru, not dashboard.  Does that help track down the 
> issue?
>
> -=Eric
>
> On Tuesday, October 16, 2012 12:50:59 PM UTC-7, Andrew Gooding wrote:
>>
>> Hello,
>>
>>  
>>
>> I installed puppet-server, passenger and dashboard. I have tested every 
>> step in between to make sure all is running well and not errors are 
>> carrying forward. Dashboard worked well with my test in WEBrick.
>>
>> After configure the dashboard with passenger I got the message” The 
>> environment must be purely alphanumeric, not ''” instead of the dashboard.
>>
>> I verified the configuration files and all look to be in place, but I 
>> should be missing something.
>>
>> This is my current environment:
>>
>> CentOS release 6.3  x86_64
>>
>> puppet-2.7.19-1.el6.noarch
>>
>> puppet-server-2.7.19-1.el6.noarch
>>
>> puppet-dashboard-1.2.12-1.el6.noarch
>>
>>  
>>
>> *** LOCAL GEMS ***
>>
>>  
>>
>> activemodel (3.2.8)
>>
>> activerecord (3.2.8)
>>
>> activesupport (3.2.8)
>>
>> arel (3.0.2)
>>
>> builder (3.0.3)
>>
>> daemon_controller (1.0.0)
>>
>> fastthread (1.0.7)
>>
>> i18n (0.6.1)
>>
>> json (1.4.6)
>>
>> multi_json (1.3.6)
>>
>> passenger (3.0.17)
>>
>> rack (1.4.1)
>>
>> rake (0.9.2.2, 0.8.7)
>>
>> tzinfo (0.3.33)
>>
>>  
>>
>> # rpm -qa | grep ruby
>>
>> ruby-devel-1.8.7.352-7.el6_2.x86_64
>>
>> ruby-mysql-2.8.2-1.el6.x86_64
>>
>> ruby-libs-1.8.7.352-7.el6_2.x86_64
>>
>> ruby-irb-1.8.7.352-7.el6_2.x86_64
>>
>> rubygems-1.3.7-1.el6.noarch
>>
>> ruby-shadow-1.4.1-13.el6.x86_64
>>
>> libselinux-ruby-2.0.94-5.3.el6.x86_64
>>
>> ruby-augeas-0.4.1-1.el6.x86_64
>>
>> rubygem-json-1.4.6-1.el6.x86_64
>>
>> rubygem-rake-0.8.7-2.1.el6.noarch
>>
>> ruby-ri-1.8.7.352-7.el6_2.x86_64
>>
>> ruby-1.8.7.352-7.el6_2.x86_64
>>
>> ruby-rdoc-1.8.7.352-7.el6_2.x86_64
>>
>>  
>>
>> rpm -qa | grep mysql
>>
>> ruby-mysql-2.8.2-1.el6.x86_64
>>
>> mysql-5.1.61-4.el6.x86_64
>>
>> mysql-devel-5.1.61-4.el6.x86_64
>>
>> mysql-libs-5.1.61-4.el6.x86_64
>>
>> mysql-server-5.1.61-4.el6.x86_64
>>
>>  
>>
>>  
>>
>>  
>>
>> Any help will be welcome.
>>
>> Thanks,
>>
>>  
>>
>> Andrew
>>
>

-- 
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/-/uxBa8zyglS4J.
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: Initial run problems

2012-11-16 Thread jcbollinger


On Friday, November 16, 2012 11:44:38 AM UTC-6, Bret Wortman wrote:
>
> On Friday, November 16, 2012 9:47:28 AM UTC-5, jcbollinger wrote:
>>
>>
>>
>> On Thursday, November 15, 2012 3:04:57 PM UTC-6, Bret Wortman wrote:
>>>
>>> Nope. Same outcome. Numerous "No child processes" errors.
>>>
>>
>> I'm not up to performing a code dive at the moment to find out where 
>> those messages may be emitted, but that might be useful information to have.
>>
>> It might also be illuminating to strace an agent run to get a low-level 
>> view of what's failing.
>>
>> I'm inclined to think that this is a provisioning problem, not inherently 
>> a Puppet problem, but there's not enough information to be sure.
>>
>>
>> John
>>
>> I ran this with strace, and it produced 840K of output. It's on another 
> network and I can't transfer the file to here for various reasons. Is there 
> something I can look for and transcribe that might be illustrative?
>


The first thing I would look for is syscalls that return an error code.  
Also keep an eye out for syscall arguments that are obviously wrong -- 
names with wrong domains, IP numbers on the wrong subnet, etc.  Pay 
particular attention to the vicinity of the points where error messages are 
emitted.


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/-/SpxuuBvC9YcJ.
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: Dynamic Collection?

2012-11-16 Thread jcbollinger


On Friday, November 16, 2012 11:07:18 AM UTC-6, Rajul Vora wrote:
>
>
> Thanks for the effort in explaining these alternatives. I apologize I 
> didn't do justice to explaining the bigger picture in the first place.
>
> So here it goes:
>
> Goal: Use hiera to provision different groups of users in different 
> environments.
>
> Approach: First create virtual users from hiera that lists all possible 
> users and then realizing "collection" of users that are also defined in 
> hiera using the <| expression |> to combine various groups. I like this 
> approach because I can list every possible user in a single hiera file so I 
> can keep the UIDs sequential as I add new users, etc.
>
> So the main problem here is that the thing that goes between the spaceship 
> operators is dynamic.
>


Yes, but to support only what you describe, it doesn't need to be nearly as 
dynamic as you're trying to make it.  Inasmuch as you are choosing which 
users to realize based on their groups, the defined type example in my 
previous message should get you most of the way to where you want to go.  
The key to making it work for you would be to change from using the 
'system::realize_users' collection predicate to using a plain array of the 
user groups you want.  For example,

production.yaml:
mymodule::usergroups:
  - A

qa.yaml:
mymodule::usergroups:
  - A
  - B

dev.yaml:
mymodule::usergroups: ALL

Then you realize them with a class such as this one:

class mymodule::systemusers {
  $usergroups = hiera('mymodule::usergroups')

  if $usergroups == 'ALL' {
User <| |>
  } else {
mymodule::usergroup { $usergroups: }
  }
}

If $usergroups is an array then that calls for one mymodule::usergroup 
instance per element; if it is a scalar then you will get just one.  Also, 
be aware that it is not a problem to realize / collect the same virtual 
User multiple times so long as you do not override any properties when you 
collect.  On the other hand, users have only one primary group, so you're 
not going to have collisions selecting only on group.

There are, of course, many other ways to do it, including some involving 
playing various clever tricks with your data.  If all you need is to select 
users based on values of one property (at a time), however, then the above 
is a pretty good way.


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/-/TZydaf0thNIJ.
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: delete a file created with puppet

2012-11-16 Thread jcbollinger


On Friday, November 16, 2012 11:17:23 AM UTC-6, Alex Stanhope wrote:
>
> On Friday, November 16, 2012 5:11:22 PM UTC, Ellison Marks wrote: 
>
>> Could you give some more info on what you're trying to accomplish with 
>> this? That way we might offer some ideas to help.
>>
>
> Of course.  I use a temporary file to store a private key passphrase. 
>  That passphrase is used to allow the client machine to load the private 
> key, and clone repositories from github.  After puppet has installed the 
> client machine, I'd like it to delete this temporary file, so that future 
> logins prompt the user for the password.  It's not the end of the world to 
> leave it there, or for me to clean it up manually.  I know I could use 
> passwordless private keys, but I think it's better security to have 
> passphrases on them.
>


Can you not supply the passphrase directly to your 'git clone' command 
instead of storing it in a file?


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/-/UJfknU4WkEoJ.
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: Dynamic Collection?

2012-11-16 Thread Rajul Vora
Yes, I was actually thinking of doing that after I sent my reply to you - 
based on your mymodule::usergroup defined resource idea. Thanks for 
confirming that idea. I'll implement it and it will work for what I am 
trying to do.

Simple is better.

Rajul

On Friday, November 16, 2012 11:16:36 AM UTC-8, jcbollinger wrote:
>
>
>
> On Friday, November 16, 2012 11:07:18 AM UTC-6, Rajul Vora wrote:
>>
>>
>> Thanks for the effort in explaining these alternatives. I apologize I 
>> didn't do justice to explaining the bigger picture in the first place.
>>
>> So here it goes:
>>
>> Goal: Use hiera to provision different groups of users in different 
>> environments.
>>
>> Approach: First create virtual users from hiera that lists all possible 
>> users and then realizing "collection" of users that are also defined in 
>> hiera using the <| expression |> to combine various groups. I like this 
>> approach because I can list every possible user in a single hiera file so I 
>> can keep the UIDs sequential as I add new users, etc.
>>
>> So the main problem here is that the thing that goes between the 
>> spaceship operators is dynamic.
>>
>
>
> Yes, but to support only what you describe, it doesn't need to be nearly 
> as dynamic as you're trying to make it.  Inasmuch as you are choosing which 
> users to realize based on their groups, the defined type example in my 
> previous message should get you most of the way to where you want to go.  
> The key to making it work for you would be to change from using the 
> 'system::realize_users' collection predicate to using a plain array of the 
> user groups you want.  For example,
>
> production.yaml:
> mymodule::usergroups:
>   - A
>
> qa.yaml:
> mymodule::usergroups:
>   - A
>   - B
>
> dev.yaml:
> mymodule::usergroups: ALL
>
> Then you realize them with a class such as this one:
>
> class mymodule::systemusers {
>   $usergroups = hiera('mymodule::usergroups')
>
>   if $usergroups == 'ALL' {
> User <| |>
>   } else {
> mymodule::usergroup { $usergroups: }
>   }
> }
>
> If $usergroups is an array then that calls for one mymodule::usergroup 
> instance per element; if it is a scalar then you will get just one.  Also, 
> be aware that it is not a problem to realize / collect the same virtual 
> User multiple times so long as you do not override any properties when you 
> collect.  On the other hand, users have only one primary group, so you're 
> not going to have collisions selecting only on group.
>
> There are, of course, many other ways to do it, including some involving 
> playing various clever tricks with your data.  If all you need is to select 
> users based on values of one property (at a time), however, then the above 
> is a pretty good way.
>
>
> 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/-/gwydGuVhR3wJ.
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] OSX 10.8 - Puppet 3.0.1 fails to start as root

2012-11-16 Thread Josh Cooper
Hi Trey,

On Fri, Nov 16, 2012 at 7:51 AM, Trey Ormsbee  wrote:
> Im new to puppet on mac,  so i might be doing something wrong...  However,
> I cannot get puppet to run as the root user.  I get messages regarding not
> being able to create the required directories.  Here is the debug/trace
> outbput that I am getting:
>
> Debug: Puppet::Type::User::ProviderUser_role_add: file rolemod does not
> exist
> Debug: Puppet::Type::User::ProviderUseradd: file userdel does not exist
> Debug: Puppet::Type::User::ProviderPw: file pw does not exist
> Debug: Failed to load library 'ldap' for feature 'ldap'
> Debug: Puppet::Type::User::ProviderLdap: feature ldap is missing
> Debug: Executing '/usr/bin/dscl -plist . -list /Users'
> Debug: Executing '/usr/bin/dscl -plist . -read /Users/puppet'
> Debug: Executing '/usr/bin/plutil -convert xml1 -o /dev/stdout
> /var/db/dslocal/nodes/Default/users/puppet.plist'
> Debug: Converting binary plist to XML
> Debug: Executing: 'plutil -convert xml1 -o - -'
> Debug: Converting XML values to a hash.
> Error: Could not create resources for managing Puppet's files and
> directories in sections [:main, :agent, :ssl]: undefined method `string' for
> nil:NilClass
> /Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:323:in
> `get_password'
> /Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:149:in
> `generate_attribute_hash'
> /Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:177:in
> `single_report'
> /Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:581:in
> `getinfo'
> /Library/Ruby/Site/1.8/puppet/provider/nameservice.rb:200:in `exists?'
> /Library/Ruby/Site/1.8/puppet/type/user.rb:355:in `exists?'
> /Library/Ruby/Site/1.8/puppet/settings.rb:715:in `service_user_available?'
> /Library/Ruby/Site/1.8/puppet/settings/file_setting.rb:45:in
> `use_service_user?'
> /Library/Ruby/Site/1.8/puppet/settings/file_setting.rb:40:in `owner'
> /Library/Ruby/Site/1.8/puppet/settings/file_setting.rb:93:in `to_resource'
> /Library/Ruby/Site/1.8/puppet/settings.rb:834:in `to_catalog'
> /Library/Ruby/Site/1.8/puppet/settings.rb:831:in `each'
> /Library/Ruby/Site/1.8/puppet/settings.rb:831:in `to_catalog'
> /Library/Ruby/Site/1.8/puppet/settings.rb:891:in `use'
> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/sync.rb:230:in
> `synchronize'
> /Library/Ruby/Site/1.8/puppet/settings.rb:885:in `use'
> /Library/Ruby/Site/1.8/puppet/application/agent.rb:451:in `setup'
> /Library/Ruby/Site/1.8/puppet/application.rb:344:in `run'
> /Library/Ruby/Site/1.8/puppet/application.rb:438:in `plugin_hook'
> /Library/Ruby/Site/1.8/puppet/application.rb:344:in `run'
> /Library/Ruby/Site/1.8/puppet/util.rb:500:in `exit_on_fail'
> /Library/Ruby/Site/1.8/puppet/application.rb:344:in `run'
> /Library/Ruby/Site/1.8/puppet/util/command_line.rb:87:in `execute'
> /usr/bin/puppet:4
> Error: Could not prepare for execution: Could not create resources for
> managing Puppet's files and directories in sections [:main, :agent, :ssl]:
> undefined method `string' for nil:NilClass
> undefined method `string' for nil:NilClass
> /Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:323:in
> `get_password'
> /Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:149:in
> `generate_attribute_hash'
> /Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:177:in
> `single_report'
> /Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:581:in
> `getinfo'
> /Library/Ruby/Site/1.8/puppet/provider/nameservice.rb:200:in `exists?'
> /Library/Ruby/Site/1.8/puppet/type/user.rb:355:in `exists?'
> /Library/Ruby/Site/1.8/puppet/settings.rb:715:in `service_user_available?'
> /Library/Ruby/Site/1.8/puppet/settings/file_setting.rb:45:in
> `use_service_user?'
> /Library/Ruby/Site/1.8/puppet/settings/file_setting.rb:40:in `owner'
> /Library/Ruby/Site/1.8/puppet/settings/file_setting.rb:93:in `to_resource'
> /Library/Ruby/Site/1.8/puppet/settings.rb:834:in `to_catalog'
> /Library/Ruby/Site/1.8/puppet/settings.rb:831:in `each'
> /Library/Ruby/Site/1.8/puppet/settings.rb:831:in `to_catalog'
> /Library/Ruby/Site/1.8/puppet/settings.rb:891:in `use'
> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/sync.rb:230:in
> `synchronize'
> /Library/Ruby/Site/1.8/puppet/settings.rb:885:in `use'
> /Library/Ruby/Site/1.8/puppet/application/agent.rb:451:in `setup'
> /Library/Ruby/Site/1.8/puppet/application.rb:344:in `run'
> /Library/Ruby/Site/1.8/puppet/application.rb:438:in `plugin_hook'
> /Library/Ruby/Site/1.8/puppet/application.rb:344:in `run'
> /Library/Ruby/Site/1.8/puppet/util.rb:500:in `exit_on_fail'
> /Library/Ruby/Site/1.8/puppet/application.rb:344:in `run'
> /Library/Ruby/Site/1.8/puppet/util/command_line.rb:87:in `execute'
> /usr/bin/puppet:4
>

These exceptions are due to
https://projects.puppetlabs.com/issues/12833. OSX 10.8 changed how
password hashes are generated. We've 

[Puppet Users] Missing Dependency: libselinux-ruby is needed by package puppet-3.0.1-1.el5.noarch (puppetlabs-products)

2012-11-16 Thread Nishant Jain
Hello Everybody,
   I am trying to install puppet on Red Hat 
Enterprise Linux Server release 5.8 Beta (Tikanga)
I have installed the following rpms
sudo rpm -ivh 
http://yum.puppetlabs.com/el/5/products/i386/puppetlabs-release-5-6.noarch.rpm

I am getting the following error when I am trying to install puppet server
sudo yum install puppet-server

puppet-3.0.1-1.el5.noarch from puppetlabs-products has depsolving problems
  --> Missing Dependency: libselinux-ruby is needed by package 
puppet-3.0.1-1.el5.noarch (puppetlabs-products)
Error: Missing Dependency: libselinux-ruby is needed by package 
puppet-3.0.1-1.el5.noarch (puppetlabs-products)
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
package-cleanup --dupes
rpm -Va --nofiles --nodigest
The program package-cleanup is found in the yum-utils package.


I have installed ruby 
yum install ruby
ruby 1.8.7 (2012-06-29 patchlevel 370) [x86_64-linux]



Can anybody help how to get the libselinux-ruby

-- 
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/-/X7BJ7unZ4DUJ.
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] DevOps and Ruby ... a CFP

2012-11-16 Thread pat eyler
MountainWest RubyConf is in it's 6th year as a leading regional Ruby
conference, and this year we're spreading out a little by adding a full day
of DevOps goodness to an already awesome program.

If you're interested in Ruby and/or DevOps (and as Puppet folks, why
wouldn't you be?) this is the conference for you.

The CFP just went up, so check it out and submit a proposal - we'd love to
hear what you have to say.

http://mtnwestrubyconf.org/


-- 
thanks,
-pate
-
 Don't judge those who choose to sin differently than you do

-- 
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] Missing Dependency: libselinux-ruby is needed by package puppet-3.0.1-1.el5.noarch (puppetlabs-products)

2012-11-16 Thread Matthaus Owens
libselinux-ruby is in base on EL 5. Do you have the base OS repos enabled?

On Fri, Nov 16, 2012 at 12:15 PM, Nishant Jain wrote:

> Hello Everybody,
>I am trying to install puppet on Red Hat
> Enterprise Linux Server release 5.8 Beta (Tikanga)
> I have installed the following rpms
> sudo rpm -ivh
> http://yum.puppetlabs.com/el/5/products/i386/puppetlabs-release-5-6.noarch.rpm
>
> I am getting the following error when I am trying to install puppet server
> sudo yum install puppet-server
>
> puppet-3.0.1-1.el5.noarch from puppetlabs-products has depsolving problems
>   --> Missing Dependency: libselinux-ruby is needed by package
> puppet-3.0.1-1.el5.noarch (puppetlabs-products)
> Error: Missing Dependency: libselinux-ruby is needed by package
> puppet-3.0.1-1.el5.noarch (puppetlabs-products)
>  You could try using --skip-broken to work around the problem
>  You could try running: package-cleanup --problems
> package-cleanup --dupes
> rpm -Va --nofiles --nodigest
> The program package-cleanup is found in the yum-utils package.
>
>
> I have installed ruby
> yum install ruby
> ruby 1.8.7 (2012-06-29 patchlevel 370) [x86_64-linux]
>
>
>
> Can anybody help how to get the libselinux-ruby
>
> --
> 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/-/X7BJ7unZ4DUJ.
> 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.
>



-- 
Matthaus Owens
Release Manager, 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] Missing Dependency: libselinux-ruby is needed by package puppet-3.0.1-1.el5.noarch (puppetlabs-products)

2012-11-16 Thread Nishant Jain
Hello Matthaus,
 I have got following on my os
rpm -qa | grep libselinux
libselinux-1.33.4-5.7.el5
libselinux-1.33.4-5.7.el5
libselinux-utils-1.33.4-5.7.el5
libselinux-python-1.33.4-5.7.el5


It's still giving me the above error.


On Friday, November 16, 2012 3:40:47 PM UTC-5, Matthaus Litteken wrote:
>
> libselinux-ruby is in base on EL 5. Do you have the base OS repos enabled?
>
> On Fri, Nov 16, 2012 at 12:15 PM, Nishant Jain 
> 
> > wrote:
>
>> Hello Everybody,
>>I am trying to install puppet on Red Hat 
>> Enterprise Linux Server release 5.8 Beta (Tikanga)
>> I have installed the following rpms
>> sudo rpm -ivh 
>> http://yum.puppetlabs.com/el/5/products/i386/puppetlabs-release-5-6.noarch.rpm
>>
>> I am getting the following error when I am trying to install puppet server
>> sudo yum install puppet-server
>>
>>  puppet-3.0.1-1.el5.noarch from puppetlabs-products has depsolving 
>> problems
>>   --> Missing Dependency: libselinux-ruby is needed by package 
>> puppet-3.0.1-1.el5.noarch (puppetlabs-products)
>> Error: Missing Dependency: libselinux-ruby is needed by package 
>> puppet-3.0.1-1.el5.noarch (puppetlabs-products)
>>  You could try using --skip-broken to work around the problem
>>  You could try running: package-cleanup --problems
>> package-cleanup --dupes
>> rpm -Va --nofiles --nodigest
>> The program package-cleanup is found in the yum-utils package.
>>
>>
>> I have installed ruby 
>> yum install ruby
>> ruby 1.8.7 (2012-06-29 patchlevel 370) [x86_64-linux]
>>
>>
>>
>> Can anybody help how to get the libselinux-ruby
>>  
>> -- 
>> 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/-/X7BJ7unZ4DUJ.
>> 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.
>>
>
>
>
> -- 
> Matthaus Owens
> Release Manager, Puppet Labs
>

-- 
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/-/Knbl5tGa0bcJ.
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: Dynamic Collection?

2012-11-16 Thread Rajul Vora

Unfortunately, this does not work either. Here's a complete standalone 
puppet manifest you can do "puppet apply" on. No users are actually being 
realized.

I don't believe "User <| group == $name |>" works.

:(

Rajul

node default {
  class { 'usergroups':
  }
}

class virtusers {
  group { 'A': ensure => present }
  group { 'B': ensure => present }
  group { 'C': ensure => present }

  @user { 'one':
ensure => present,
uid => 5001,
groups => [ 'A' ]
  }
  @user { 'two':
ensure => present,
uid => 5002,
groups => [ 'B' ]
  }
  @user { 'three':
ensure => present,
uid => 5003,
groups => [ 'C' ]
  }
}

class usergroups {
  include virtusers

  define realize_helper( ) {
User <| group == $name |>
  }

  ### none of these work
  #$group_list = [ 'A', 'B' ]
  $group_list = 'A'
  
  realize_helper { $group_list: }
}


On Friday, November 16, 2012 11:25:15 AM UTC-8, Rajul Vora wrote:
>
> Yes, I was actually thinking of doing that after I sent my reply to you - 
> based on your mymodule::usergroup defined resource idea. Thanks for 
> confirming that idea. I'll implement it and it will work for what I am 
> trying to do.
>
> Simple is better.
>
> Rajul
>
> On Friday, November 16, 2012 11:16:36 AM UTC-8, jcbollinger wrote:
>>
>>
>>
>> On Friday, November 16, 2012 11:07:18 AM UTC-6, Rajul Vora wrote:
>>>
>>>
>>> Thanks for the effort in explaining these alternatives. I apologize I 
>>> didn't do justice to explaining the bigger picture in the first place.
>>>
>>> So here it goes:
>>>
>>> Goal: Use hiera to provision different groups of users in different 
>>> environments.
>>>
>>> Approach: First create virtual users from hiera that lists all possible 
>>> users and then realizing "collection" of users that are also defined in 
>>> hiera using the <| expression |> to combine various groups. I like this 
>>> approach because I can list every possible user in a single hiera file so I 
>>> can keep the UIDs sequential as I add new users, etc.
>>>
>>> So the main problem here is that the thing that goes between the 
>>> spaceship operators is dynamic.
>>>
>>
>>
>> Yes, but to support only what you describe, it doesn't need to be nearly 
>> as dynamic as you're trying to make it.  Inasmuch as you are choosing which 
>> users to realize based on their groups, the defined type example in my 
>> previous message should get you most of the way to where you want to go.  
>> The key to making it work for you would be to change from using the 
>> 'system::realize_users' collection predicate to using a plain array of the 
>> user groups you want.  For example,
>>
>> production.yaml:
>> mymodule::usergroups:
>>   - A
>>
>> qa.yaml:
>> mymodule::usergroups:
>>   - A
>>   - B
>>
>> dev.yaml:
>> mymodule::usergroups: ALL
>>
>> Then you realize them with a class such as this one:
>>
>> class mymodule::systemusers {
>>   $usergroups = hiera('mymodule::usergroups')
>>
>>   if $usergroups == 'ALL' {
>> User <| |>
>>   } else {
>> mymodule::usergroup { $usergroups: }
>>   }
>> }
>>
>> If $usergroups is an array then that calls for one mymodule::usergroup 
>> instance per element; if it is a scalar then you will get just one.  Also, 
>> be aware that it is not a problem to realize / collect the same virtual 
>> User multiple times so long as you do not override any properties when you 
>> collect.  On the other hand, users have only one primary group, so you're 
>> not going to have collisions selecting only on group.
>>
>> There are, of course, many other ways to do it, including some involving 
>> playing various clever tricks with your data.  If all you need is to select 
>> users based on values of one property (at a time), however, then the above 
>> is a pretty good way.
>>
>>
>> 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/-/lEpYYdoxXO4J.
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] Load Balance Puppet 3 masters with PuppetDB backend

2012-11-16 Thread Felipe Salum
Hi there.

I'm setting up a Puppet 3 + PuppetDB environment with the following 
architecture:

2 x puppetmaster/passenger with apache using Proxy Balance
1 x puppetdb 

Following the Pro Puppet book, I set Apache on both puppetmasters to proxy 
the CA requests to just 1 puppetmaster server, and anything else between 
the 2 puppetmaster servers (call them workers).

Also both puppetmaster servers is set to use the puppetdb storeconfig 
backend.

Everything looks fine when I hit the puppetmaster running as the CA, but if 
my request is balanced to the 2nd puppetmaster worker I got the errors 
below:

root@puppetdb1:/# puppet agent --test --server puppet.puppet.test
Warning: Unable to fetch my node definition, but the agent run will 
continue:
Warning: Error 400 on SERVER: Could not retrieve facts for 
puppetdb1.puppet.test: Failed to submit 'replace facts' command for 
puppetdb1.puppet.test to PuppetDB at puppetdb1.puppet.test:8081: 
SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read finished A
Info: Retrieving plugin
Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb
Info: Loading facts in /var/lib/puppet/lib/facter/iptables.rb
Info: Loading facts in 
/var/lib/puppet/lib/facter/postgres_default_version.rb
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Failed to submit 'replace facts' command for puppetdb1.puppet.test to 
PuppetDB at puppetdb1.puppet.test:8081: SSL_connect SYSCALL returned=5 
errno=0 state=SSLv3 read finished A
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

For some reason when my puppetmaster2 worker receives the request from any 
of my puppet agent nodes the facts fail.

192.168.168.9 - - [16/Nov/2012:13:15:10 -0800] "GET 
/production/node/puppetdb1.puppet.test? HTTP/1.1" 400 513 "-" "-"
192.168.168.9 - - [16/Nov/2012:13:15:16 -0800] "GET 
/production/file_metadatas/plugins?recurse=true&checksum_type=md5&links=manage&ignore=---+%0A++-+%22.svn%22%0A++-+CVS%0A++-+%22.git%22&
 
HTTP/1.1" 200 40597 "-" "-"
192.168.168.9 - - [16/Nov/2012:13:15:18 -0800] "POST 
/production/catalog/puppetdb1.puppet.test HTTP/1.1" 400 461 "-" "-"

Can I use the architecture I described above and still have every 
puppetmaster from my load balance talking to PuppetDB ?

I tried to delete the ssl certificates, generate them again, run 
puppetdb-ssl-setup, etc but still same results.

Thanks,
Felipe

-- 
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/-/Jz9sEtlR35UJ.
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] Missing Dependency: libselinux-ruby is needed by package puppet-3.0.1-1.el5.noarch (puppetlabs-products)

2012-11-16 Thread Matthaus Owens
What is the output of `yum repolist` ?

libselinux-ruby is in the base OS repo for rhel/centos, so the most likely
reason it wouldn't be available to yum would be if the base OS repo weren't
available/enabled.

On Fri, Nov 16, 2012 at 1:02 PM, Nishant Jain wrote:

> Hello Matthaus,
>  I have got following on my os
> rpm -qa | grep libselinux
> libselinux-1.33.4-5.7.el5
> libselinux-1.33.4-5.7.el5
> libselinux-utils-1.33.4-5.7.el5
> libselinux-python-1.33.4-5.7.el5
>
>
> It's still giving me the above error.
>
>
> On Friday, November 16, 2012 3:40:47 PM UTC-5, Matthaus Litteken wrote:
>
>> libselinux-ruby is in base on EL 5. Do you have the base OS repos enabled?
>>
>> On Fri, Nov 16, 2012 at 12:15 PM, Nishant Jain wrote:
>>
>>> Hello Everybody,
>>>I am trying to install puppet on Red Hat
>>> Enterprise Linux Server release 5.8 Beta (Tikanga)
>>> I have installed the following rpms
>>> sudo rpm -ivh http://yum.puppetlabs.com/el/**5/products/i386/puppetlabs-
>>> **release-5-6.noarch.rpm
>>>
>>> I am getting the following error when I am trying to install puppet
>>> server
>>> sudo yum install puppet-server
>>>
>>>  puppet-3.0.1-1.el5.noarch from puppetlabs-products has depsolving
>>> problems
>>>   --> Missing Dependency: libselinux-ruby is needed by package
>>> puppet-3.0.1-1.el5.noarch (puppetlabs-products)
>>> Error: Missing Dependency: libselinux-ruby is needed by package
>>> puppet-3.0.1-1.el5.noarch (puppetlabs-products)
>>>  You could try using --skip-broken to work around the problem
>>>  You could try running: package-cleanup --problems
>>> package-cleanup --dupes
>>> rpm -Va --nofiles --nodigest
>>> The program package-cleanup is found in the yum-utils package.
>>>
>>>
>>> I have installed ruby
>>> yum install ruby
>>> ruby 1.8.7 (2012-06-29 patchlevel 370) [x86_64-linux]
>>>
>>>
>>>
>>> Can anybody help how to get the libselinux-ruby
>>>
>>> --
>>> 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/-/**X7BJ7unZ4DUJ
>>> .
>>> 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
>>> .
>>>
>>
>>
>>
>> --
>> Matthaus Owens
>> Release Manager, Puppet Labs
>>
>  --
> 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/-/Knbl5tGa0bcJ.
>
> 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.
>



-- 
Matthaus Owens
Release Manager, 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] Missing Dependency: libselinux-ruby is needed by package puppet-3.0.1-1.el5.noarch (puppetlabs-products)

2012-11-16 Thread Nishant Jain
Sorry for the post.
Seems like the VM is not subscribed to the RHN , so it was not able to get 
the package from the Red Hat Repository.

Thanks for the reply,
Nishant

On Friday, November 16, 2012 4:55:43 PM UTC-5, Matthaus Litteken wrote:
>
> What is the output of `yum repolist` ? 
>
> libselinux-ruby is in the base OS repo for rhel/centos, so the most likely 
> reason it wouldn't be available to yum would be if the base OS repo weren't 
> available/enabled.
>
> On Fri, Nov 16, 2012 at 1:02 PM, Nishant Jain 
> 
> > wrote:
>
>> Hello Matthaus,
>>  I have got following on my os
>> rpm -qa | grep libselinux
>> libselinux-1.33.4-5.7.el5
>> libselinux-1.33.4-5.7.el5
>> libselinux-utils-1.33.4-5.7.el5
>> libselinux-python-1.33.4-5.7.el5
>>
>>
>> It's still giving me the above error.
>>
>>
>> On Friday, November 16, 2012 3:40:47 PM UTC-5, Matthaus Litteken wrote:
>>
>>> libselinux-ruby is in base on EL 5. Do you have the base OS repos 
>>> enabled?
>>>
>>> On Fri, Nov 16, 2012 at 12:15 PM, Nishant Jain wrote:
>>>
 Hello Everybody,
I am trying to install puppet on Red Hat 
 Enterprise Linux Server release 5.8 Beta (Tikanga)
 I have installed the following rpms
 sudo rpm -ivh http://yum.puppetlabs.com/el/**
 5/products/i386/puppetlabs-**release-5-6.noarch.rpm

 I am getting the following error when I am trying to install puppet 
 server
 sudo yum install puppet-server

  puppet-3.0.1-1.el5.noarch from puppetlabs-products has depsolving 
 problems
   --> Missing Dependency: libselinux-ruby is needed by package 
 puppet-3.0.1-1.el5.noarch (puppetlabs-products)
 Error: Missing Dependency: libselinux-ruby is needed by package 
 puppet-3.0.1-1.el5.noarch (puppetlabs-products)
  You could try using --skip-broken to work around the problem
  You could try running: package-cleanup --problems
 package-cleanup --dupes
 rpm -Va --nofiles --nodigest
 The program package-cleanup is found in the yum-utils package.


  I have installed ruby 
 yum install ruby
 ruby 1.8.7 (2012-06-29 patchlevel 370) [x86_64-linux]



 Can anybody help how to get the libselinux-ruby
  
 -- 
 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/-/**X7BJ7unZ4DUJ
 .
 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
 .

>>>
>>>
>>>
>>> -- 
>>> Matthaus Owens
>>> Release Manager, Puppet Labs
>>>
>>  -- 
>> 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/-/Knbl5tGa0bcJ.
>>
>> 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.
>>
>
>
>
> -- 
> Matthaus Owens
> Release Manager, Puppet Labs
>  

-- 
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/-/dj9XDCa5t4UJ.
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] Missing Dependency: libselinux-ruby is needed by package puppet-3.0.1-1.el5.noarch (puppetlabs-products)

2012-11-16 Thread Matthaus Owens
CentOS has the packages at
http://mirror.centos.org/centos/5/os/x86_64/CentOS/libselinux-ruby-1.33.4-5.7.el5.x86_64.rpmand
http://mirror.centos.org/centos/5/os/i386/CentOS/libselinux-ruby-1.33.4-5.7.el5.i386.rpm

On Fri, Nov 16, 2012 at 1:57 PM, Nishant Jain wrote:

> Sorry for the post.
> Seems like the VM is not subscribed to the RHN , so it was not able to get
> the package from the Red Hat Repository.
>
> Thanks for the reply,
> Nishant
>
> On Friday, November 16, 2012 4:55:43 PM UTC-5, Matthaus Litteken wrote:
>
>> What is the output of `yum repolist` ?
>>
>> libselinux-ruby is in the base OS repo for rhel/centos, so the most
>> likely reason it wouldn't be available to yum would be if the base OS repo
>> weren't available/enabled.
>>
>> On Fri, Nov 16, 2012 at 1:02 PM, Nishant Jain wrote:
>>
>>> Hello Matthaus,
>>>  I have got following on my os
>>> rpm -qa | grep libselinux
>>> libselinux-1.33.4-5.7.el5
>>> libselinux-1.33.4-5.7.el5
>>> libselinux-utils-1.33.4-5.7.**el5
>>> libselinux-python-1.33.4-5.7.**el5
>>>
>>>
>>> It's still giving me the above error.
>>>
>>>
>>> On Friday, November 16, 2012 3:40:47 PM UTC-5, Matthaus Litteken wrote:
>>>
 libselinux-ruby is in base on EL 5. Do you have the base OS repos
 enabled?

 On Fri, Nov 16, 2012 at 12:15 PM, Nishant Jain wrote:

> Hello Everybody,
>I am trying to install puppet on Red Hat
> Enterprise Linux Server release 5.8 Beta (Tikanga)
> I have installed the following rpms
> sudo rpm -ivh http://yum.puppetlabs.com/el/**5**
> /products/i386/puppetlabs-**rele**ase-5-6.noarch.rpm
>
> I am getting the following error when I am trying to install puppet
> server
> sudo yum install puppet-server
>
>  puppet-3.0.1-1.el5.noarch from puppetlabs-products has depsolving
> problems
>   --> Missing Dependency: libselinux-ruby is needed by package
> puppet-3.0.1-1.el5.noarch (puppetlabs-products)
> Error: Missing Dependency: libselinux-ruby is needed by package
> puppet-3.0.1-1.el5.noarch (puppetlabs-products)
>  You could try using --skip-broken to work around the problem
>  You could try running: package-cleanup --problems
> package-cleanup --dupes
> rpm -Va --nofiles --nodigest
> The program package-cleanup is found in the yum-utils package.
>
>
>  I have installed ruby
> yum install ruby
> ruby 1.8.7 (2012-06-29 patchlevel 370) [x86_64-linux]
>
>
>
> Can anybody help how to get the libselinux-ruby
>
> --
> 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/*
> *ms**g/puppet-users/-/**X7BJ7unZ4DUJ
> .
> 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
> .
>



 --
 Matthaus Owens
 Release Manager, Puppet Labs

>>>  --
>>> 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/-/**Knbl5tGa0bcJ
>>> .
>>>
>>> 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
>>> .
>>>
>>
>>
>>
>> --
>> Matthaus Owens
>> Release Manager, Puppet Labs
>>
>  --
> 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/-/dj9XDCa5t4UJ.
>
> 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.
>



-- 
Matthaus Owens
Release Manager, 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

[Puppet Users] migrating puppetmasters & the console database (puppet enterprise)

2012-11-16 Thread Mike Skint
Hi group,

I'm in the process of migrating a puppetmaster to a new host, and didn't 
want to have to manually add in my classes and group configs in the console.
So I was looking into the console db, and it appears to hold all the info 
on nodes classes and groups.  So my question is this:  Is it feasible to 
dump the console db on the old master and restore it on the new master?   
Yes this is puppet enterprise.

thanks for taking the time to read this..

-mike

-- 
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/-/ZRX_bpNWrhYJ.
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] Issue with service => disabled and stopped

2012-11-16 Thread Forrie
I have a simple manifest that I'm using to keep unwanted services from
running on an array of Linux systems.  On my test host, I see these
two services repeatedly come up in the puppet.log, even tho they are
not running and are chkconfig set to off:

service { "cups":
enable => false,
ensure => stopped,
}

service { "cups-config-daemon":
enable => false,
ensure => stopped,
}

The log:

Nov 16 19:11:39 test-fms puppet-agent[6530]: (/Stage[main]/Disabled-
services/Service[cups-config-daemon]/ensure) ensure changed 'running'
to 'stopped'
Nov 16 19:11:40 test-fms puppet-agent[6530]: (/Stage[main]/Disabled-
services/Service[hidd]/ensure) ensure changed 'running' to 'stopped'

verify in chkconfig:

cups-config-daemon  0:off   1:off   2:off   3:off   4:off   5:off   6:off
hidd0:off   1:off   2:off   3:off   4:off   5:off   6:off

This shows up every time puppet agent runs for this host.  Why would
this be happening?

This is using puppet 2.7.19 and the latest ruby 1.8.7.



Thanks.

-- 
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] Issue with service => disabled and stopped

2012-11-16 Thread Steven Nemetz

If it is happening every time, it is usually an issue with init script. Puppet 
is not understanding the output of the init script, so it is not saving the 
correct state.Run the init script manually and see what it is returning. If it 
is not obvious, run puppet with --debug and see the exact command puppet is 
running

Steven
 > Date: Fri, 16 Nov 2012 16:15:42 -0800
> Subject: [Puppet Users] Issue with service => disabled and stopped
> From: for...@gmail.com
> To: puppet-users@googlegroups.com
> 
> I have a simple manifest that I'm using to keep unwanted services from
> running on an array of Linux systems.  On my test host, I see these
> two services repeatedly come up in the puppet.log, even tho they are
> not running and are chkconfig set to off:
> 
> service { "cups":
> enable => false,
> ensure => stopped,
> }
> 
> service { "cups-config-daemon":
> enable => false,
> ensure => stopped,
> }
> 
> The log:
> 
> Nov 16 19:11:39 test-fms puppet-agent[6530]: (/Stage[main]/Disabled-
> services/Service[cups-config-daemon]/ensure) ensure changed 'running'
> to 'stopped'
> Nov 16 19:11:40 test-fms puppet-agent[6530]: (/Stage[main]/Disabled-
> services/Service[hidd]/ensure) ensure changed 'running' to 'stopped'
> 
> verify in chkconfig:
> 
> cups-config-daemon0:off   1:off   2:off   3:off   4:off   5:off   6:off
> hidd  0:off   1:off   2:off   3:off   4:off   5:off   6:off
> 
> This shows up every time puppet agent runs for this host.  Why would
> this be happening?
> 
> This is using puppet 2.7.19 and the latest ruby 1.8.7.
> 
> 
> 
> Thanks.
> 
> -- 
> 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] Creating files from array?

2012-11-16 Thread Jakov Sosic

Hi.

I have the following array in the hiera:

files: - a
   - b
   - c

and I want to create files:

file_a
file_b
file_c

from template "file".


Is there a clean way to do it because as far as i know puppet DL doesn't 
support loops...



--
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] Creating files from array?

2012-11-16 Thread Steven Nemetz

Change your yaml file to: files:  - a  - b  - c Then puppet will read it in as 
an array. Pass the array to a define and the define will run once for each 
element of the array

Steven
 > Date: Sat, 17 Nov 2012 03:27:20 +0100
> From: jso...@srce.hr
> To: puppet-users@googlegroups.com
> Subject: [Puppet Users] Creating files from array?
> 
> Hi.
> 
> I have the following array in the hiera:
> 
> files: - a
> - b
> - c
> 
> and I want to create files:
> 
> file_a
> file_b
> file_c
> 
> from template "file".
> 
> 
> Is there a clean way to do it because as far as i know puppet DL doesn't 
> support loops...
> 
> 
> -- 
> 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.
> 
  

-- 
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: puppet failing to run

2012-11-16 Thread Asif Iqbal
On Wed, Nov 14, 2012 at 6:18 PM, Jeff McCune  wrote:

> On Fri, Nov 9, 2012 at 12:11 AM, Asif Iqbal  wrote:
> >
> > Here is another simple one
> >
> >  # puppet apply --trace --evaltrace -e 'user {"dummy": ensure =>
> present}'
> >
> >  http://paste.ubuntu.com/1344435/
>
> These definitely seem like bugs.  Could you please file a bug report
> at http://projects.puppetlabs.com/projects/puppet/issues/new with
> these links, or copies of them in the ticket?  If you add me as a
> watcher, I'll try my best to get this resolved as quickly as we can.
> It seems similar to #13429, but not the exact same problem.
>
>
submitted it in the bug and assigned it to you.

thanks a lot for your help.


> Thanks,
> -Jeff
>
> --
> 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.
>
>


-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

-- 
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: puppet failing to run

2012-11-16 Thread Asif Iqbal
On Fri, Nov 16, 2012 at 10:55 PM, Asif Iqbal  wrote:

>
>
>
> On Wed, Nov 14, 2012 at 6:18 PM, Jeff McCune  wrote:
>
>> On Fri, Nov 9, 2012 at 12:11 AM, Asif Iqbal  wrote:
>> >
>> > Here is another simple one
>> >
>> >  # puppet apply --trace --evaltrace -e 'user {"dummy": ensure =>
>> present}'
>> >
>> >  http://paste.ubuntu.com/1344435/
>>
>> These definitely seem like bugs.  Could you please file a bug report
>> at http://projects.puppetlabs.com/projects/puppet/issues/new with
>> these links, or copies of them in the ticket?  If you add me as a
>> watcher, I'll try my best to get this resolved as quickly as we can.
>> It seems similar to #13429, but not the exact same problem.
>>
>>
> submitted it in the bug and assigned it to you.
>
> thanks a lot for your help.
>
>

oops! forgot to add the bug id. it is #17709

thanks


 Thanks,
>> -Jeff
>>
>> --
>> 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.
>>
>>
>
>
> --
> Asif Iqbal
> PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
>
>
>


-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

-- 
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: OSX 10.8 - Puppet 3.0.1 fails to start as root

2012-11-16 Thread Trey Ormsbee
Hmm...   it's enabled on mine,  this is an upgrade from 10.7 if that 
matters.

On Friday, November 16, 2012 11:18:03 AM UTC-6, Ellison Marks wrote:
>
> Isn't the root account disabled by default on OSX? If you haven't 
> explicitly enabled it, that might be the problem...
>
> On Friday, November 16, 2012 7:51:38 AM UTC-8, Trey Ormsbee wrote:
>>
>> Im new to puppet on mac,  so i might be doing something wrong... 
>>  However,  I cannot get puppet to run as the root user.  I get messages 
>> regarding not being able to create the required directories.  Here is the 
>> debug/trace outbput that I am getting:
>>
>> Debug: Puppet::Type::User::ProviderUser_role_add: file rolemod does not 
>> exist
>> Debug: Puppet::Type::User::ProviderUseradd: file userdel does not exist
>> Debug: Puppet::Type::User::ProviderPw: file pw does not exist
>> Debug: Failed to load library 'ldap' for feature 'ldap'
>> Debug: Puppet::Type::User::ProviderLdap: feature ldap is missing
>> Debug: Executing '/usr/bin/dscl -plist . -list /Users'
>> Debug: Executing '/usr/bin/dscl -plist . -read /Users/puppet'
>> Debug: Executing '/usr/bin/plutil -convert xml1 -o /dev/stdout 
>> /var/db/dslocal/nodes/Default/users/puppet.plist'
>> Debug: Converting binary plist to XML
>> Debug: Executing: 'plutil -convert xml1 -o - -'
>> Debug: Converting XML values to a hash.
>> Error: Could not create resources for managing Puppet's files and 
>> directories in sections [:main, :agent, :ssl]: undefined method `string' 
>> for nil:NilClass
>> /Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:323:in
>>  
>> `get_password'
>> /Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:149:in
>>  
>> `generate_attribute_hash'
>> /Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:177:in
>>  
>> `single_report'
>> /Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:581:in
>>  
>> `getinfo'
>> /Library/Ruby/Site/1.8/puppet/provider/nameservice.rb:200:in `exists?'
>> /Library/Ruby/Site/1.8/puppet/type/user.rb:355:in `exists?'
>> /Library/Ruby/Site/1.8/puppet/settings.rb:715:in `service_user_available?'
>> /Library/Ruby/Site/1.8/puppet/settings/file_setting.rb:45:in 
>> `use_service_user?'
>> /Library/Ruby/Site/1.8/puppet/settings/file_setting.rb:40:in `owner'
>> /Library/Ruby/Site/1.8/puppet/settings/file_setting.rb:93:in `to_resource'
>> /Library/Ruby/Site/1.8/puppet/settings.rb:834:in `to_catalog'
>> /Library/Ruby/Site/1.8/puppet/settings.rb:831:in `each'
>> /Library/Ruby/Site/1.8/puppet/settings.rb:831:in `to_catalog'
>> /Library/Ruby/Site/1.8/puppet/settings.rb:891:in `use'
>> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/sync.rb:230:in
>>  
>> `synchronize'
>> /Library/Ruby/Site/1.8/puppet/settings.rb:885:in `use'
>> /Library/Ruby/Site/1.8/puppet/application/agent.rb:451:in `setup'
>> /Library/Ruby/Site/1.8/puppet/application.rb:344:in `run'
>> /Library/Ruby/Site/1.8/puppet/application.rb:438:in `plugin_hook'
>> /Library/Ruby/Site/1.8/puppet/application.rb:344:in `run'
>> /Library/Ruby/Site/1.8/puppet/util.rb:500:in `exit_on_fail'
>> /Library/Ruby/Site/1.8/puppet/application.rb:344:in `run'
>> /Library/Ruby/Site/1.8/puppet/util/command_line.rb:87:in `execute'
>> /usr/bin/puppet:4
>> Error: Could not prepare for execution: Could not create resources for 
>> managing Puppet's files and directories in sections [:main, :agent, :ssl]: 
>> undefined method `string' for nil:NilClass
>> undefined method `string' for nil:NilClass
>> /Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:323:in
>>  
>> `get_password'
>> /Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:149:in
>>  
>> `generate_attribute_hash'
>> /Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:177:in
>>  
>> `single_report'
>> /Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:581:in
>>  
>> `getinfo'
>> /Library/Ruby/Site/1.8/puppet/provider/nameservice.rb:200:in `exists?'
>> /Library/Ruby/Site/1.8/puppet/type/user.rb:355:in `exists?'
>> /Library/Ruby/Site/1.8/puppet/settings.rb:715:in `service_user_available?'
>> /Library/Ruby/Site/1.8/puppet/settings/file_setting.rb:45:in 
>> `use_service_user?'
>> /Library/Ruby/Site/1.8/puppet/settings/file_setting.rb:40:in `owner'
>> /Library/Ruby/Site/1.8/puppet/settings/file_setting.rb:93:in `to_resource'
>> /Library/Ruby/Site/1.8/puppet/settings.rb:834:in `to_catalog'
>> /Library/Ruby/Site/1.8/puppet/settings.rb:831:in `each'
>> /Library/Ruby/Site/1.8/puppet/settings.rb:831:in `to_catalog'
>> /Library/Ruby/Site/1.8/puppet/settings.rb:891:in `use'
>> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/sync.rb:230:in
>>  
>> `synchronize'
>> /Library/Ruby/Site/1.8/puppet/settings.rb:885:in `use'
>> /Library/Ruby/Site/1.8/puppet/application/agent.rb:451:in `setup'
>> /Library/Ruby/Site/1.8/puppet/application.rb:344:in `run'
>> /Library/Ruby/Site/1.8/puppet/application.rb:4

Re: [Puppet Users] OSX 10.8 - Puppet 3.0.1 fails to start as root

2012-11-16 Thread Trey Ormsbee
Sounds good,  I will give that a go sometime this weekend and let you know.

Thanks,
Trey

On Friday, November 16, 2012 1:29:30 PM UTC-6, Josh Cooper wrote:
>
> Hi Trey, 
>
> On Fri, Nov 16, 2012 at 7:51 AM, Trey Ormsbee 
> > 
> wrote: 
> > Im new to puppet on mac,  so i might be doing something wrong... 
>  However, 
> > I cannot get puppet to run as the root user.  I get messages regarding 
> not 
> > being able to create the required directories.  Here is the debug/trace 
> > outbput that I am getting: 
> > 
> > Debug: Puppet::Type::User::ProviderUser_role_add: file rolemod does not 
> > exist 
> > Debug: Puppet::Type::User::ProviderUseradd: file userdel does not exist 
> > Debug: Puppet::Type::User::ProviderPw: file pw does not exist 
> > Debug: Failed to load library 'ldap' for feature 'ldap' 
> > Debug: Puppet::Type::User::ProviderLdap: feature ldap is missing 
> > Debug: Executing '/usr/bin/dscl -plist . -list /Users' 
> > Debug: Executing '/usr/bin/dscl -plist . -read /Users/puppet' 
> > Debug: Executing '/usr/bin/plutil -convert xml1 -o /dev/stdout 
> > /var/db/dslocal/nodes/Default/users/puppet.plist' 
> > Debug: Converting binary plist to XML 
> > Debug: Executing: 'plutil -convert xml1 -o - -' 
> > Debug: Converting XML values to a hash. 
> > Error: Could not create resources for managing Puppet's files and 
> > directories in sections [:main, :agent, :ssl]: undefined method `string' 
> for 
> > nil:NilClass 
> > 
> /Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:323:in 
>
> > `get_password' 
> > 
> /Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:149:in 
>
> > `generate_attribute_hash' 
> > 
> /Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:177:in 
>
> > `single_report' 
> > 
> /Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:581:in 
>
> > `getinfo' 
> > /Library/Ruby/Site/1.8/puppet/provider/nameservice.rb:200:in `exists?' 
> > /Library/Ruby/Site/1.8/puppet/type/user.rb:355:in `exists?' 
> > /Library/Ruby/Site/1.8/puppet/settings.rb:715:in 
> `service_user_available?' 
> > /Library/Ruby/Site/1.8/puppet/settings/file_setting.rb:45:in 
> > `use_service_user?' 
> > /Library/Ruby/Site/1.8/puppet/settings/file_setting.rb:40:in `owner' 
> > /Library/Ruby/Site/1.8/puppet/settings/file_setting.rb:93:in 
> `to_resource' 
> > /Library/Ruby/Site/1.8/puppet/settings.rb:834:in `to_catalog' 
> > /Library/Ruby/Site/1.8/puppet/settings.rb:831:in `each' 
> > /Library/Ruby/Site/1.8/puppet/settings.rb:831:in `to_catalog' 
> > /Library/Ruby/Site/1.8/puppet/settings.rb:891:in `use' 
> > 
> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/sync.rb:230:in
>  
>
> > `synchronize' 
> > /Library/Ruby/Site/1.8/puppet/settings.rb:885:in `use' 
> > /Library/Ruby/Site/1.8/puppet/application/agent.rb:451:in `setup' 
> > /Library/Ruby/Site/1.8/puppet/application.rb:344:in `run' 
> > /Library/Ruby/Site/1.8/puppet/application.rb:438:in `plugin_hook' 
> > /Library/Ruby/Site/1.8/puppet/application.rb:344:in `run' 
> > /Library/Ruby/Site/1.8/puppet/util.rb:500:in `exit_on_fail' 
> > /Library/Ruby/Site/1.8/puppet/application.rb:344:in `run' 
> > /Library/Ruby/Site/1.8/puppet/util/command_line.rb:87:in `execute' 
> > /usr/bin/puppet:4 
> > Error: Could not prepare for execution: Could not create resources for 
> > managing Puppet's files and directories in sections [:main, :agent, 
> :ssl]: 
> > undefined method `string' for nil:NilClass 
> > undefined method `string' for nil:NilClass 
> > 
> /Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:323:in 
>
> > `get_password' 
> > 
> /Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:149:in 
>
> > `generate_attribute_hash' 
> > 
> /Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:177:in 
>
> > `single_report' 
> > 
> /Library/Ruby/Site/1.8/puppet/provider/nameservice/directoryservice.rb:581:in 
>
> > `getinfo' 
> > /Library/Ruby/Site/1.8/puppet/provider/nameservice.rb:200:in `exists?' 
> > /Library/Ruby/Site/1.8/puppet/type/user.rb:355:in `exists?' 
> > /Library/Ruby/Site/1.8/puppet/settings.rb:715:in 
> `service_user_available?' 
> > /Library/Ruby/Site/1.8/puppet/settings/file_setting.rb:45:in 
> > `use_service_user?' 
> > /Library/Ruby/Site/1.8/puppet/settings/file_setting.rb:40:in `owner' 
> > /Library/Ruby/Site/1.8/puppet/settings/file_setting.rb:93:in 
> `to_resource' 
> > /Library/Ruby/Site/1.8/puppet/settings.rb:834:in `to_catalog' 
> > /Library/Ruby/Site/1.8/puppet/settings.rb:831:in `each' 
> > /Library/Ruby/Site/1.8/puppet/settings.rb:831:in `to_catalog' 
> > /Library/Ruby/Site/1.8/puppet/settings.rb:891:in `use' 
> > 
> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/sync.rb:230:in
>  
>
> > `synchronize' 
> > /Library/Ruby/Site/1.8/puppet/settings.rb:885:in `use' 
> > /Library/Ruby/Site/1.8/puppet/application/agent.rb:451:in `setup' 
> > /Library/Ruby/Site/1.8/puppet/application.r

[Puppet Users] Re: OSX 10.8 - Puppet 3.0.1 fails to start as root

2012-11-16 Thread Trey Ormsbee
Looks like that worked,  I pulled down the commit listed in the bug report 
installed it an all is good.  I'll keep an eye for the official release of 
3.0.2  Thank you!

-- 
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/-/7pGtdFm5QhIJ.
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: Puppet version 2.7 or 3?

2012-11-16 Thread Ohad Levy
On Fri, Nov 16, 2012 at 10:10 AM, Thomas Bendler
wrote:

> Hi Ohad,
>
> 2012/11/16 Ohad Levy 
>
>> [...]
>> For the record, Puppet 3 support was added to foreman a couple of days
>> ago.
>> [...]
>>
>
> do you know when the puppet 3 support will be available in the test RPMs?
> I've updated to the current test RPMs yesterday but still had to patch some
> files in foreman and foreman-proxy to get it working with Puppet 3.
>

You would need the nightly rpms, hopefully we'll get a RC soon.

Ohad

>
> Regards, Thomas
> --
> Linux ... enjoy the ride!
>
>
>  --
> 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.