Re: [Puppet Users] Re: Please explain need for multiple .ppm files in a single module

2016-02-19 Thread Denmat


> On 20 Feb 2016, at 00:28, warron.french  wrote:
> 
> Denmant, so, if I wanted to write my own module for the Audit configurations 
> on a Solaris 10 {x86|sparc} and CentOS {x86_64} and I knew I needed to break 
> it down (in my mind) as the following:
> Configure audit rules (Solaris [audit_control] CentOS [audit.rules]) through 
> auditMonitor.pp
> Configure audit reporting (Solaris [audit_warn] CentOS [auditd.conf]) through 
> auditReport.pp
> Something like that would be appropriate, and a reason for separating 
> functionality out to separate .PP files?
Yep, sounds about right. Not trying to confuse you but they might be better 
expressed as 'profiles' which is just a further abstraction of modules. Depends 
on how different the conf data becomes. 

In that case you might end up having a profile (just another module) that 
collects data for Solaris ('profiles::audit_solaris') and and another for 
CentOS ('profiles::audit_centos').

They might call in 'audit::audit_monitor' or 'audit::audit_report' and pass 
config data collected there. (It is much more common to snake_case your modules 
- but not mandatory).

In that case you can have a blank init.pp file like:
class audit { }

Your best module layout inspiration should probably come from puppetlabs own 
forge modules. But how you write your manifests is pretty flexible. Just aim to 
be consistent :)

> 
> Does that mean the init.pp would call the other .PP files as I wanted them to 
> be enabled or not?
See above, it depends on what you do. It now common to include parameter 
lookups in your class like so:
class audit (
 $some_var = 'some_default'
 $some_other = 'some_other'
) {
  ...some logic working on vars...
}

You can then abstract lookup data in things like hiera by setting 
'audit::some_var: avalue' in your hiera data.

https://docs.puppetlabs.com/hiera/3.0/puppet.html

This also might be helpful in your considerations:
https://docs.puppetlabs.com/puppet/latest/reference/lang_classes.html#appendix-smart-parameter-defaults
 

HTH
Den

> 
> --
> Warron French
> 
> 
>> On Thu, Feb 18, 2016 at 4:41 PM, Denmat  wrote:
>> Here's what puppet docs say.
>> https://docs.puppetlabs.com/puppet/latest/reference/modules_fundamentals.html#manifests
>> 
>> One single .pp for complex modules are a nightmare. Better to separate into 
>> smaller chunks.
>> 
>>> On 19 Feb 2016, at 07:51, warron.french  wrote:
>>> 
>>> JCBollinger, in my training classes over the last 3 years, we always wrote 
>>> modules with a single init.pp; that's why I am surprised.
>>> 
>>> Thanks JC,
>>> 
>>> --
>>> Warron French
>>> 
>>> 
>>>> On Thu, Feb 18, 2016 at 9:08 AM, jcbollinger  
>>>> wrote:
>>>> 
>>>> 
>>>>> On Wednesday, February 17, 2016 at 7:01:32 PM UTC-6, Warron French wrote:
>>>>> Where I work a great of the Puppet Modules employed are downloaded from 
>>>>> the Puppet Forge; however, some are created by my teammates.
>>>>> 
>>>>> What I can't figure out is WHY are some modules written with multiple .pp 
>>>>> files in the manifest directory.
>>>>> 
>>>>> Can someone please tutor me on this point, or point me to a document/link?
>>>>> 
>>>> 
>>>> 
>>>> What I can't figure out is what you find surprising about Puppet modules 
>>>> comprising multiple manifests.  If you help me out there, then perhaps I 
>>>> can help you out in return.
>>>> 
>>>> 
>>>> John
>>>> 
>>>> -- 
>>>> You received this message because you are subscribed to the Google Groups 
>>>> "Puppet Users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>>> email to puppet-users+unsubscr...@googlegroups.com.
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/puppet-users/e8ab98c0-64ec-4c10-8bb2-7ca833e424a4%40googlegroups.com.
>>>> 
>>>> For more options, visit https://groups.google.com/d/optout.
>>> 
>>> -- 
>>> You received this message because you are subscribed to the Google Groups 
>>> "Puppet Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to puppet-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.g

Re: [Puppet Users] Re: Please explain need for multiple .ppm files in a single module

2016-02-18 Thread Denmat
Here's what puppet docs say.
https://docs.puppetlabs.com/puppet/latest/reference/modules_fundamentals.html#manifests

One single .pp for complex modules are a nightmare. Better to separate into 
smaller chunks.

> On 19 Feb 2016, at 07:51, warron.french  wrote:
> 
> JCBollinger, in my training classes over the last 3 years, we always wrote 
> modules with a single init.pp; that's why I am surprised.
> 
> Thanks JC,
> 
> --
> Warron French
> 
> 
>> On Thu, Feb 18, 2016 at 9:08 AM, jcbollinger  
>> wrote:
>> 
>> 
>>> On Wednesday, February 17, 2016 at 7:01:32 PM UTC-6, Warron French wrote:
>>> Where I work a great of the Puppet Modules employed are downloaded from the 
>>> Puppet Forge; however, some are created by my teammates.
>>> 
>>> What I can't figure out is WHY are some modules written with multiple .pp 
>>> files in the manifest directory.
>>> 
>>> Can someone please tutor me on this point, or point me to a document/link?
>>> 
>> 
>> 
>> What I can't figure out is what you find surprising about Puppet modules 
>> comprising multiple manifests.  If you help me out there, then perhaps I can 
>> help you out in return.
>> 
>> 
>> John
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to puppet-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/puppet-users/e8ab98c0-64ec-4c10-8bb2-7ca833e424a4%40googlegroups.com.
>> 
>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/CAJdJdQk%2BP2M8CWawowJaBdwbn06fzo19PbT%2BFg-B12qKDMfdeg%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/0C7EA191-B366-4C53-819E-E2A5624535FC%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Passing a generated variable inside a template...how?

2015-11-25 Thread denmat
No, it is the same for the this test. You do need to have a resolvable IP
address for each interface IP it finds or it will error. For example I had
to add hostnames in my /etc/hosts file for my vagrant IPs (10.0.2.15,
172.28.128.5).

That maybe the error you're seeing there, "cannot interpret as address".

On Thu, Nov 26, 2015 at 8:54 AM, Dayton Jones 
wrote:

> First, thanks for the help - I've been banging my head against the wall
> too much on this.
>
> Unfortunately, it's still not working for me..
>
> I'm not using an inline template, I have an actual .erb file called out in
> my manifest - though I don't see why this would be any different.
>
> my erb now looks like:
>
> <% scope.lookupvar("interfaces").split(",").each do |interface| %>
> <% @int_ip = scope.lookupvar("ipaddress_" + interface) %>
> <% @int_name = Resolv.new.getname @int_ip %>
> <%= "#{@int_ip}  #{@int_name}" %>
> <% end %>
>
> (thanks, didn't realize I'd mixed up the single/double quotes)
>
> and here is the result when puppet runs and the class is applied:
>
>   Filepath: /usr/lib/ruby/1.8/resolv.rb
>   Line: 429
>   Detail: cannot interpret as address:
>
>
> Is there a difference in using an inline template inside of the class
> defintion as opposed to using an erb file called as a resource?
>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/f15d30b2-2be4-4267-a8eb-9c19bbb63034%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAJsPER0VK81hmbFLcuSRxCTMQ086x5kM9V5%3DT1Mp%3DdEvSR%3DwSA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Passing a generated variable inside a template...how?

2015-11-25 Thread denmat
okay, this works.

test.pp
class a {

  $inline = inline_template(
'<% scope.lookupvar("interfaces").split(",").each do |interface| %>
 <% @int_ip = scope.lookupvar("ipaddress_" + interface) %>
 <% @int_name = Resolv.new.getname @int_ip %>
 <%= "#{@int_ip}  #{@int_name}" %>
 <% end %>')

notify { $inline: }

}

include a


$ puppet apply test.pp

Notice: /Stage[main]/A/Notify[
 10.0.2.15  fake.name.net
 172.28.128.5  another.faker.net
 127.0.0.1  localhost
 ]/

Sorry to mess you around before. Maybe it was your mixing of "'" and """?



On Thu, Nov 26, 2015 at 8:21 AM, Dayton Jones 
wrote:

> Right, that works -- but I want to get the IP by using the scope.lookup
> var and not hardcode an IP in the template.  I know both the
> "scope.lookupvar('ipaddress_'+interface)" and "@int_name =
> Resolv.new.getname " works, but I'm struggling on how to send the IP
> gained from the lookupvar to the Resolv.new.getname function inside the
> template.. It should just be a syntax issue, but I'm new to ruby/erb  so
> I'm not sure the correct way to pass a generated string to a function
> within the same structure...
>
> On Wednesday, November 25, 2015 at 3:10:55 PM UTC-6, denmat wrote:
>>
>> Sorry, rushing around on trains. Try this:
>>
>> irb(main):002:0> require 'resolv'
>> => true
>> irb(main):003:0> Resolv.new.getname('127.0.0.1')
>> => "localhost"
>>
>> On Thu, Nov 26, 2015 at 7:54 AM, Denmat  wrote:
>>
>>> Sorry, ignore my suggestion. That won't work.
>>>
>>> On 26 Nov 2015, at 06:57, Dayton Jones  wrote:
>>>
>>> I'm writing a template to populate a file - easy enough...
>>>
>>> What I want is to to grab the list of interfaces, get the ip assigned to
>>> that interface and then do a lookup of the ip to get the dns name.
>>>
>>> I'm able to get the interfaces/ips just fine, but can't figure out how
>>> to then pass the IP to the function to do the lookup.  Any help is greatly
>>> appreciated...
>>>
>>> ===
>>> start ERB
>>>
>>> <% scope.lookupvar('interfaces').split(",").each do |interface| %>
>>> <% @int_ip = scope.lookupvar('ipaddress_'+interface) %>
>>> <% @int_name = Resolv.new.getname @int_ip %>
>>> ...
>>> <% end %>
>>>
>>> end ERB
>>> 
>>>
>>> @int_ip gets popluated and I can manipulate it as needed, but how do I
>>> properly pass it to 'Resolv.new.getname' to set the int_name string?
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Puppet Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to puppet-users...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/puppet-users/6bf51a8e-eb7f-4bcd-ac77-2451bcbec5ce%40googlegroups.com
>>> <https://groups.google.com/d/msgid/puppet-users/6bf51a8e-eb7f-4bcd-ac77-2451bcbec5ce%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/14fe0e25-b0b6-4118-8212-87734e580029%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/14fe0e25-b0b6-4118-8212-87734e580029%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAJsPER0kBDxCpkdZqWoav_EJqmDeCtLFPU4Z6wh1uU_WL%2BTVXg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Passing a generated variable inside a template...how?

2015-11-25 Thread denmat
Sorry, rushing around on trains. Try this:

irb(main):002:0> require 'resolv'
=> true
irb(main):003:0> Resolv.new.getname('127.0.0.1')
=> "localhost"

On Thu, Nov 26, 2015 at 7:54 AM, Denmat  wrote:

> Sorry, ignore my suggestion. That won't work.
>
> On 26 Nov 2015, at 06:57, Dayton Jones  wrote:
>
> I'm writing a template to populate a file - easy enough...
>
> What I want is to to grab the list of interfaces, get the ip assigned to
> that interface and then do a lookup of the ip to get the dns name.
>
> I'm able to get the interfaces/ips just fine, but can't figure out how to
> then pass the IP to the function to do the lookup.  Any help is greatly
> appreciated...
>
> ===
> start ERB
>
> <% scope.lookupvar('interfaces').split(",").each do |interface| %>
> <% @int_ip = scope.lookupvar('ipaddress_'+interface) %>
> <% @int_name = Resolv.new.getname @int_ip %>
> ...
> <% end %>
>
> end ERB
> 
>
> @int_ip gets popluated and I can manipulate it as needed, but how do I
> properly pass it to 'Resolv.new.getname' to set the int_name string?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/6bf51a8e-eb7f-4bcd-ac77-2451bcbec5ce%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/6bf51a8e-eb7f-4bcd-ac77-2451bcbec5ce%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAJsPER2DYP5ma%2B_KUA8FA1rxKZBfm%3DWWyyhZ%2BZV%2B%3DApnU-cjbg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Passing a generated variable inside a template...how?

2015-11-25 Thread Denmat
Sorry, ignore my suggestion. That won't work.

> On 26 Nov 2015, at 06:57, Dayton Jones  wrote:
> 
> I'm writing a template to populate a file - easy enough...
> 
> What I want is to to grab the list of interfaces, get the ip assigned to that 
> interface and then do a lookup of the ip to get the dns name.
> 
> I'm able to get the interfaces/ips just fine, but can't figure out how to 
> then pass the IP to the function to do the lookup.  Any help is greatly 
> appreciated...
> 
> ===
> start ERB
> 
> <% scope.lookupvar('interfaces').split(",").each do |interface| %>
> <% @int_ip = scope.lookupvar('ipaddress_'+interface) %>
> <% @int_name = Resolv.new.getname @int_ip %>
> ...
> <% end %>
> 
> end ERB
> 
> 
> @int_ip gets popluated and I can manipulate it as needed, but how do I 
> properly pass it to 'Resolv.new.getname' to set the int_name string?
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/6bf51a8e-eb7f-4bcd-ac77-2451bcbec5ce%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/51F5321E-2ED9-40C0-AB2B-1B26DC639C1B%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Passing a generated variable inside a template...how?

2015-11-25 Thread Denmat
> <%= @int_name = Resolv.new.getname @int_ip %>
??

Maybe this would work better as a custom fact though?

HTH
Den

> On 26 Nov 2015, at 06:57, Dayton Jones  wrote:
> 
> I'm writing a template to populate a file - easy enough...
> 
> What I want is to to grab the list of interfaces, get the ip assigned to that 
> interface and then do a lookup of the ip to get the dns name.
> 
> I'm able to get the interfaces/ips just fine, but can't figure out how to 
> then pass the IP to the function to do the lookup.  Any help is greatly 
> appreciated...
> 
> ===
> start ERB
> 
> <% scope.lookupvar('interfaces').split(",").each do |interface| %>
> <% @int_ip = scope.lookupvar('ipaddress_'+interface) %>
> <% @int_name = Resolv.new.getname @int_ip %>
> ...
> <% end %>
> 
> end ERB
> 
> 
> @int_ip gets popluated and I can manipulate it as needed, but how do I 
> properly pass it to 'Resolv.new.getname' to set the int_name string?
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/6bf51a8e-eb7f-4bcd-ac77-2451bcbec5ce%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/70A7C917-8436-4688-A6FD-44DC88ED984D%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] hiera-gpg, end of life.

2015-08-19 Thread Denmat
Thanks for going to the effort of providing it and making it available in the 
first place. Good job :)

> On 19 Aug 2015, at 19:44, Craig Dunn  wrote:
> 
> Hi all,
> 
> For anyone that is interested, I've decided to officially bring to an
> end the hiera-gpg[0] project and will not be maintaining it going
> forward.
> 
> hiera-gpg was one of the first additional backends written for Hiera
> and was released 4 years ago (was it *really* that long ago?).  It
> gained a lot of popularity solving the problem of storing sensitive
> information in hieras YAML repo.  Some time ago, Tom Poulton released
> a new encryption based backend called hiera-eyaml[1] which aimed, and
> succeeded, to provide a better implementation of hiera data encryption
> with support for inline encryption rather than whole-file, and remove
> the reliance on GPG and related libraries.
> 
> There hasn't been any activity around hiera-gpg for a while, but I'm
> aware of a couple of people still using it in production.  If you are
> still using it I highly recommend changing over to hiera-eyaml.
> 
> If anyone _really_ wants to keep hiera-gpg alive then please contact
> me privately
> 
> Regards
> Craig
> [0]:  https://github.com/crayfishx/hiera-gpg
> [1]: https://github.com/TomPoulton/hiera-eyaml
> 
> 
> -- 
> Enviatics | Automation and configuration management
> http://www.enviatics.com | @Enviatics
> Puppet Training http://www.enviatics.com/training/
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/CACxdKhGzaPaPBgdOKnVR-Bgb8L5m3GxxXgAwc2Ve_DhKhhYydA%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/A4E6388C-BBDA-4276-B5DC-811CF355EF70%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Top scope variables and hiera

2015-08-16 Thread Denmat
Hi,

The way I see it you have two options.

The hiera function like you said or a profile/parent class that you can use to 
do the lookup.

class profile::provisioning (
  $server
  {
  class {someclass: server => $server}
  
  more
  ...
 }

Then common.yaml has only
profile::provisioning::server: blah.node

Which ever floats your boat will work.

HTH
Den


> On 16 Aug 2015, at 14:10, puppeteer123  wrote:
> 
> After using hiera for a few months, I started to find a lot of keys with the 
> same value in my common.yam:
> 
> ---
> provisioning::server: 'same.old.node'
> kickstart::server: 'same.old.node'
> puppet::server: 'same.old.node'
> 
> Contextually they are fine, however it seems a little redundant.
> 
> Is there a way I can call provisioning server from my kickstart class without 
> having to use the hiera lookup function? And is that acceptable practice?
> 
> Doesn't seem like this is possible due to scope.
> class kickstart {
>   $server = $provisioning::server
> 
> 
> This doesn't seem to work either:
> $server = $provisioning::server
> class kickstart {
> 
> I know I can use the hiera() function, but checking to see if this is the 
> only way.
> 
> Thanks!
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/50946780-d02d-4146-b7ae-1ed6ec31e463%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/45131B8B-8C3B-4EEC-85FB-5A1D870C2C62%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: Check service running with flag file

2015-06-11 Thread Denmat
Hi,

May not be the best solution but you can specify the command to run when 
starting a service, you could use that instead.

service {blah:
  start => 'test  && service blah start'
}

Alternatively you might want to put logic in the init file, into a facter value 
or some other way.

Cheers
Den

> On 11 Jun 2015, at 16:13, Eddie Mashayev  wrote:
> 
> Anyone?!
> 
>> On Wednesday, June 10, 2015 at 2:30:33 PM UTC+3, Eddie Mashayev wrote:
>> Hi All,
>> 
>> I want to check that my service "nails" running on all my servers only if 
>> file "/etc/NONAILS" not exists on this server.
>> 
>> If it exists don’t start this process, this file works like a flag.
>> 
>> I wrote script in puppet to check that and it works. 
>> 
>> 
>> 
>> Still it throes error when this file do exists:
>> 
>> 
>> 
>> [root@test ~]# puppet  agent -t
>> 
>> Info: Retrieving pluginfacts
>> 
>> Info: Retrieving plugin
>> 
>> Info: Loading facts
>> 
>> Info: Loading facts
>> 
>> Info: Caching catalog for test
>> 
>> Info: Applying configuration version '1433921081'
>> 
>> Error: Could not find command 'checkForFile'
>> 
>> Error: /Stage[main]/Check_service/Exec[checkForFile]/returns: change from 
>> notrun to 0 failed: Could not find command 'checkForFile'
>> 
>> Notice: /Stage[main]/Check_service/Service[nails]: Dependency 
>> Exec[checkForFile] has failures: true
>> 
>> Warning: /Stage[main]/Check_service/Service[nails]: Skipping because of 
>> failed dependencies
>> 
>> 
>> Question can I do it in cleaner way without throwing errors??
>> 
>>   
>> 
>> This is my script:
>> 
>> 
>> 
>> class check_service {
>> 
>> service { "nails":
>> ensure => "running",
>> enable => true,
>> hasstatus  => false,
>> hasrestart => true,
>> require => exec['checkForFile'],
>> }
>> 
>> exec {"checkForFile":
>> path => "/usr/bin/",
>> onlyif => "test -e /etc/NONAILS",
>> }
>> }
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/6cc13de4-eeba-44d7-8bd6-15af22d775fc%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/571C832C-A48A-43D0-9179-6A937FE3800B%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppet cron jobs overwhelming host

2015-05-01 Thread Denmat
Also you could consider wrapping these in a flock to prevent actions piling up 
behind each other - like described here:
http://www.elevatedcode.com/2013/05/07/flock-for-cron-jobs.html

Many other examples on the net.

Den

On 2 May 2015, at 04:15, Tim Dunphy  wrote:

>> In addition to Peter's excellent catch of the scheduling issue, depending on 
>> how many files you have in /var/www and how much other contention there is 
>> for disk I/O, your find commands could simply be getting bogged down 
>> traversing the directory tree. They are pretty inefficient, as written, so 
>> you should optimize them to minimize their impact.
>> 
>> Instead of this command, which will run one chmod command for each matching 
>> file,
>> 
>> /bin/find /var/www -type f -exec chmod -v 664 {} \;
>> 
>> consider using the following command, which will exclude files that already 
>> have the correct permissions and will batch the found files into a single 
>> chmod command (note the plus sign instead of a semicolon):
>> 
>> /bin/find /var/www -type f ! -perm 0644 -exec chmod -v 644 {} +
>> 
>> The directory chmod command would look pretty much the same:
>> 
>> /bin/find /var/www -type d ! -perm 0775 -exec chmod -v 775 {} +
> 
> 
> That's some pretty wonderful advice! I'll admit that my use of the find 
> command may not have been that sophisticated. But I think you're example will 
> help me with a better approach that I hope to learn from!
> 
> Thanks!
> 
> Tim 
> 
> On Fri, May 1, 2015 at 1:06 PM, Peter Bukowinski  wrote:
 On May 1, 2015, at 12:52 PM, Tim Dunphy  wrote:
 
 This isn't really a Puppet problem, but regardless:
 Those cron entries are for "every minute during the zeroth hour". So at 
 00:00 it will run, then at 00:01, then 00:02, and so
  on all the way to 00:59, then will stop until 00:00 the next day. 
 Therefore, if the chmod/chown processes take more than 1 minute to run, 
 they will stack up during that period of time.
 The entry you want is "0 0 * * *" -- that will run exactly once, at 00:00 
 each day.  In your manifest, you can express this with "hour => 0, minute 
 => 0,".
>>> 
>>> Ok got it! I've corrected it and this is what I have now:
>>> 
>>>  cron { "apache-chown":
>>>   command => "/bin/chown -R apache:ftpgroup /var/www",
>>>   user=> 'root',
>>>   hour=> 0,
>>>   minute  => '0'
>>>   }
>>> 
>>>   cron { "chmod-files":
>>>   command => "/bin/find /var/www -type f -exec chmod -v 664 {} \;",
>>>   user=> 'root',
>>>   hour=> 0,
>>>   minute  => '0'
>>>   }
>>> 
>>>cron { "chmod-directories":
>>>   command => "/bin/find /var/www -type d -exec chmod -v 775 {} \;",
>>>   user=> 'root',
>>>   hour=> 0,
>>>   minute  => '0'
>>>   } 
>>> 
>>> Thanks for your input!
>>> 
>>> Tim
>> 
>> In addition to Peter's excellent catch of the scheduling issue, depending on 
>> how many files you have in /var/www and how much other contention there is 
>> for disk I/O, your find commands could simply be getting bogged down 
>> traversing the directory tree. They are pretty inefficient, as written, so 
>> you should optimize them to minimize their impact.
>> 
>> Instead of this command, which will run one chmod command for each matching 
>> file,
>> 
>> /bin/find /var/www -type f -exec chmod -v 664 {} \;
>> 
>> consider using the following command, which will exclude files that already 
>> have the correct permissions and will batch the found files into a single 
>> chmod command (note the plus sign instead of a semicolon):
>> 
>> /bin/find /var/www -type f ! -perm 0644 -exec chmod -v 644 {} +
>> 
>> The directory chmod command would look pretty much the same:
>> 
>> /bin/find /var/www -type d ! -perm 0775 -exec chmod -v 775 {} +
>> 
>> --
>> Peter Bukowinski
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to puppet-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/puppet-users/CB45AA5E-A8C1-4422-BA4E-2B8D8FEBB7F4%40gmail.com.
>> 
>> For more options, visit https://groups.google.com/d/optout.
> 
> 
> 
> -- 
> GPG me!!
> 
> gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/CAOZy0emPCpHn1pdU_-38W5AMO-%2B%2BXVdOmsUpHMwdw%3DEUF74Ggg%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to t

Re: [Puppet Users] Re: Hiera testing

2015-03-19 Thread Denmat
Yes, I think it's a good way to go, Alfredo.

I would normally have a hierarchy like the following.
- secrets (e-yaml-gpg)
- nodes
- environment 
- roles
- common

Gets by in most setups. You'll still need a site.pp file but in can just have:
hiera_include('classes') (pretty sure that's the call, not at a my laptop).

You can also do something to handle default nodes (ones that don't match the 
hiera data yet) by having one default node specified in your site.pp Up to you.

HTH,
Den


> On 19 Mar 2015, at 23:35, Alfredo De Luca  wrote:
> 
> Hi all.
> Anyone on this question?
> 
> 
> 
> On Thu, Mar 19, 2015 at 10:07 AM, Alfredo De Luca
>  wrote:
>> Hi all.
>> I am testing hiera in our enviroment and I wonder if I can manage
>> everything from hiera without using the main site.pp.
>> 
>> Do you think is the right way? or I should use site.pp as well?
>> 
>> 
>> Here is what I am testing and so far so good.
>> 
>> - hiera.yaml
>> ---
>> :backends:
>> - yaml
>> 
>> :hierarchy:
>> - "environments/%{::environment}"
>> - "nodes/%{::fqdn}"
>> - common
>> 
>> :yaml:
>> :datadir: /etc/puppet/hieradata/
>> 
>> 
>> - hiera.yaml
>> 
>> - common.yaml
>> ---
>> classes:
>> - ntp
>> - resolver
>> - yum
>> - motd
>> 
>> ntp::restrict:
>> ntp::autoupdate: false
>> ntp::service_enable: true
>> ntp::service_ensure: running
>> ntp::servers:
>> - 10.4.123.3
>> - 10.4.123.4
>> - 10.5.123.3
>> - 10.5.123.4
>> 
>> resolver::search:
>> - xxx.xxx.com
>> resolver::dns_servers:
>> - 10.4.17.18
>> - 10.4.17.20
>> - 10.5.17.18
>> - 10.5.17.20
>> 
>> yum::source_repo_dir: 'puppet:///REPO_FILES/'
>> yum::clean_repos: true
>> 
>> motd::content: '# TEST #'
>> - common.yaml
>> 
>> 
>> 
>> --
>> Alfredo
> 
> 
> 
> -- 
> Alfredo
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/CAAWpFTFRCjdGWPiap_%3D8ZoxyPvuc50a-aLLKSpjjQTF-1jxD9Q%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/14723D8F-141A-4F5A-805F-845292F4C65E%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] anifests can now be written in pure Ruby. Example please?

2015-03-14 Thread Denmat
As of 3.1 this functionality has been deprecated and replaced by 'future 
parser' in  3.2.

See release notes for full detail.
https://puppetlabs.com/blog/puppet-3-2-introduces-an-experimental-parser-and-new-iteration-features

HTH
Den

> On 14 Mar 2015, at 19:05, spare.sl...@gmail.com wrote:
> 
> Hi,
> According to official Puppet documenttion:
> 
> https://docs.puppetlabs.com/guides/faq.html#why-does-puppet-have-its-own-language
> 
> 
>> As for just using Ruby as the input format, Puppet 2.6.0 actually added this 
>> functionality, and manifests can now be written in pure Ruby. However, this 
>> capability should be used carefully and avoided where possible: the full 
>> grammar of Ruby is often too much functionality, and we believe systems 
>> administrators should be able to model their datacenters in a higher-level 
>> system
> 
> Is above statement true for latest version of puppet as well ? 
> Can somebody give a  simple example please ?
> 
> Thanks.
>  
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/db8fa575-10da-4f8b-be97-124c2d9550f3%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/8386258F-6570-4A27-818B-2CCEA6C5F0DB%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Is trusting the agents a bad thing?

2015-02-12 Thread Denmat
One thing to consider is using hiera e-yaml gpg based on certnames. You can put 
secrets (db passwords etc) here and they are matched to the SSL certname. In 
this configuration an attacker can change their role/profile but still cant 
access secrets for a particular node that doesn't match its certname.

That is not the only way but a fairly reasonable compromise.

Den



> On 13 Feb 2015, at 09:43, Alex Elman  wrote:
> 
> I don't think you should limit your agent's ability to dictate what resources 
> should be configured and served. The Puppet client-server trust model is 
> fairly flat and this provides a decent trade-off between flexibility and 
> security. If your agent is owned, then as you mention, you have bigger 
> concerns.
> 
> You do have some decently granular control over which agents get access to 
> which resources by using auth.conf. See 
> https://docs.puppetlabs.com/guides/rest_auth_conf.html. Configuring auth.conf 
> on the master side, you can lock down certain resources using allow/deny 
> directives or ACLs for things other than facter facts like hostnames and ip 
> addresses. I would make sure you lock things down against unauthenticated 
> agents at the very least. Also be judicious about how you design your 
> auto-signing configuration if you're worried about rouge agents. See 
> https://docs.puppetlabs.com/puppet/3.7/reference/ssl_autosign.html.
> 
> -Alex
> 
>> On Thu, Feb 12, 2015 at 4:10 PM, UK_beginner  wrote:
>> I'm new to puppet and have been exploring different ways of configuring 
>> manifests, ranging from huge single manifests, through per-node and am 
>> currently looking at the role/profile patterns.
>> 
>> One thing I've been looking at is using a mix of puppet and hiera to set up 
>> a hierarchy based around server roles (i.e. web. database, logging etc.) 
>> using the environment and a custom fact set on the agents using 
>> /etc/facter/facts.d. For me this seems an efficient way to describe a 
>> configuration since it can avoid a lot of duplication.
>> 
>> However, some of the team I'm working with have concerns around the fact 
>> that we're letting the agents dictate what manifests get passed to them 
>> since they define the role & environment facts. I've been told that if 
>> someone found a 'root-level' exploit they could change the facts to retrieve 
>> whatever manifest they want - my response is if we get to that stage, all 
>> bets are off since they can just stop puppet, download rpm's etc.
>> 
>> However I wanted to gauge the feeling of the experts - is this a risky 
>> solution, or do others feel that as we implement other security factors 
>> (firewalls, correct file permissions, certificates) that this is an 
>> acceptable route to investigate?
>> 
>> Thanks in advance for you thoughts.
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to puppet-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/puppet-users/b24c11a0-1e0a-459f-9873-de80fccd41a9%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
> 
> 
> 
> -- 
> Alex Elman
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/CAD-8G_pnMVcpK76OaKWVNcw6PM%3Dsv8enSDX_SHxxXyhUXg1fCg%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/57237023-2022-40F7-B508-56FD3830EB08%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Hi Team

2014-11-26 Thread Denmat
Hi,

You need:
puppet:///modules/...

https://docs.puppetlabs.com/guides/file_serving.html
for details.
Den

> On 26 Nov 2014, at 17:43, Jegadeesh Kumar  wrote:
> 
> source => "puppet://modules/files/etc/motd"

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/C2BAA92D-5348-44F7-AF50-7055ED753665%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Error on puppet agent after upgrade to 3.7.1.

2014-11-08 Thread Denmat
Hmmm. Not sure but here's what I would do..

I would ensure all rpm packages and any gems relating to puppet and facter are 
uninstalled, then install again from whatever package manager you prefer.

It feels like an unclean gem/rpm issue.

Den

> On 9 Nov 2014, at 7:51, Schofield  wrote:
> 
> After upgrading a puppet agent from v3.0.1 to v3.7.1 on a CentOS 6.5 server  
> I get the following error during a puppet agent run.
> 
> [junk-01: SU: lib/facter 455] puppet agent -t
> Info: Retrieving pluginfacts
> Info: Retrieving plugin
> Info: Loading facts
> /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31: command not found: 
> /etc/blkid /dev/sda1
> /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31: command not found: 
> /etc/blkid /dev/sda2
> /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31: command not found: 
> /etc/blkid /dev/sda3
> Info: Caching catalog for junk-01
> 
> Any thoughts on the cause? I'm open to troubleshooting tips as well?
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/aa24ff17-7d32-4921-9152-41edbdc48f42%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/ADA36CAC-C2E6-40DD-912D-6D9DDD3E8E9E%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: creating hashes from other hashes

2014-11-07 Thread Denmat
You don't need to disable lint entirely, you could just disable that check 
condition.
http://puppet-lint.com/checks/documentation/

Den

> On 8 Nov 2014, at 9:43, Tim Mooney  wrote:
> 
> In regard to: [Puppet Users] Re: creating hashes from other hashes, Luke...:
> 
>> Huh, at first glance that to me looks like a parser bug.
> 
> That's what I was thinking too.
> 
>> Now that I think
>> more on it I seem to recall this coming up before. The $name of a Defined
>> Type is not of type String, and Puppet Hash keys are always strings,
>> according to the docs:
>> 
>> https://docs.puppetlabs.com/puppet/latest/reference/lang_datatypes.html#hashes
>> 
>> This code works, explicitly enclosing $name in a string:
> 
> Ok, thanks.  Unfortunately, we have puppet-lint hooked into our pre-commit
> hook, and puppet-lint objects to a variable that is enclosed in double
> quotes for no reason:
> 
>  WARNING: string containing only a variable on line 39
>  WARNING: variable not enclosed in {} on line 39
> 
> I even tried doing this, to get around puppet-lint:
> 
>$my_key = strip(" ${name } ")
>$new_pool = {
>  $my_key => $fpm_pool,
>}
> 
> Still no joy, as now the parser objects to $my_key.  This really does
> seem like a bug in the parser.
> 
> It looks like I'm going to have to temporarily disable our pre-commit
> hook, and check in the code using "$name".
> 
> Thanks again Luke, your insight on this is much appreciated!
> 
> Tim
> 
> 
>>> On Thursday, November 6, 2014 10:04:00 PM UTC, Tim.Mooney wrote:
>>> 
>>> 
>>> All-
>>> 
>>> We're using puppet (opensource) 3.4.2 master and clients.  We've been
>>> using puppet a few years, including create_resources, but this is my
>>> first foray into creating complicated nested hashes.
>>> 
>>> I've boiled the problem I'm running into down to this example:
>>> 
>>> $ cat /tmp/foo.pp
>>> class foo {
>>>   foo::bar { 'somevalue':
>>> stuff => {
>>>   'one' => 'doesnt_matter',
>>>   'two' => 'doesnt_matter',
>>> }
>>>   }
>>> }
>>> 
>>> define foo::bar (
>>>   $stuff = {},
>>> ) {
>>> 
>>>   #
>>>   # not valid: fails with a parser validation error on the key $name:
>>>   #
>>>   # Error: Could not parse for environment production: Syntax error at
>>>   # 'name';
>>>   # expected '}' at /tmp/foo.pp:21
>>>   #
>>>   $new_hash = {
>>> $name => $stuff,
>>>   }
>>> 
>>>   #
>>>   # this works, using a constant key
>>>   #
>>>   $new_hash = {
>>> 'a_constant' => $stuff,
>>>   }
>>> }
>>> 
>>> 
>>> This comes from a larger, more complicated example, but what I'm trying to
>>> do is
>>> 
>>> - take a hash ($stuff) that has all the parameters I need
>>> - create a new hash with a single key that's the $name/$title for the
>>> define,
>>>   and a value that contains the hash $stuff that I was passed.
>>> 
>>> As you might guess, this is to make $new_hash suitable for passing
>>> to create_resources.
>>> 
>>> Is there some other way to create a new hash, give it a single top-level
>>> key that is a variable, and assign a separate (passed-in as a parameter)
>>> hash as the value for that key?  I would be fine with using stdlib::merge,
>>> but I don't see any obvious way to accomplish this task with stdlib::merge
>>> either.
>>> 
>>> Thanks,
>>> 
>>> Tim
>>> --
>>> Tim Mooney tim.m...@ndsu.edu
>>> 
>>> Enterprise Computing & Infrastructure  701-231-1076
>>> (Voice)
>>> Room 242-J6, Quentin Burdick Building  701-231-8541 (Fax)
>>> North Dakota State University, Fargo, ND 58105-5164
> 
> -- 
> Tim Mooney tim.moo...@ndsu.edu
> Enterprise Computing & Infrastructure  701-231-1076 (Voice)
> Room 242-J6, Quentin Burdick Building  701-231-8541 (Fax)
> North Dakota State University, Fargo, ND 58105-5164
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/alpine.SOC.2.11.1411071622310.23044%40dogbert.cc.ndsu.NoDak.edu.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/12034C69-267C-48D8-B5B9-70F37276AD0A%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppet web serve is not working

2014-10-11 Thread Denmat
Hi,

Firstly, you're using http rather than https - but in any case, don't expect 
any web pages to appear when you hit the url in your browser. You should try 
running your puppet agent against the master.

I know you've said you have read the docs but PuppetLabs do offers great 
documentation. Maybe starting at the start is a good place for you with the 
PuppetLabs VM and introduction:
https://docs.puppetlabs.com/learning/introduction.html

Den

> On 11 Oct 2014, at 14:03, Irfan Sayed  wrote:
> 
> hi,
> 
> i am newbie in puppet and just started
> 
> i have installed the puppet master along with passenger. i referred all the 
> documentation steps  twice but still the web-server is not coming when i hit 
> the url : http://:8140/
> in the log i have following 
> 
> Directory index forbidden by Options directive: 
> /usr/share/puppet/rack/puppetmasterd/public/
> File does not exist: /var/www/icons/powered_by_rh.png,
> 
> please please suggest 
> i am stuck 
> 
> regards
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/d9d2e3da-397d-4036-baf8-bfe1641156bd%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/D73B99B9-8A7D-4D60-9EEA-E9C2A5B53402%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Looking to Learn - mjhas::postfix

2014-10-11 Thread Denmat
Hi,

That $::hostname is a fact.
https://docs.puppetlabs.com/puppet/latest/reference/lang_facts_and_builtin_vars.html

The $:: represents something in the top scope.
https://docs.puppetlabs.com/puppet/latest/reference/lang_scope.html#top-scope

It will resolve to the hostname of the node running to the postfix agent.

Den

> On 11 Oct 2014, at 6:21, Eric Hart  wrote:
> 
> Hey, how's it goin Puppet Masters?  I'm Puppet Novice over here.  I'm looking 
> to up my game and so I'm working on setting up SMTP relay config for my hosts 
> to fire off their local SMTP traffic to my one designated SMTP Relay host.  
> 
> I'm hoping to find someone who's familiar with the mjhas::postfix, as I've 
> been digging into this module for a few hours now just gaining some 
> understanding.  
> 
> Some basic questions to start.
> 
> class postfix::relay (
>   $relayhost = 'myrelayserver.example.com',
>   $masquerade_domains = $::hostname,
>   $sender_hostname = $::fqdn,
> ) {
>   include postfix
> 
>   postfix::config::maincfhelper { 'append_dot_mydomain': value => 'yes', }
> 
>   postfix::config::maincfhelper { 'myhostname': value => $sender_hostname, }
> 
>   postfix::config::maincfhelper { 'myorigin': value => $sender_hostname, }
> 
>   postfix::config::maincfhelper { 'mydestination': value => 
> "${sender_hostname}, ${::hostname}", }
> 
>   postfix::config::maincfhelper { 'relayhost': value => $relayhost, }
> 
>   postfix::config::maincfhelper { 'mynetworks': value => '192.168.1.0/24', }
> 
>   postfix::config::maincfhelper { 'mailbox_size_limit': value => '0', }
> 
>   postfix::config::maincfhelper { 'masquerade_domains': value => 
> $masquerade_domains, }
> 
>   postfix::config::maincfhelper { 'inet_interfaces': value => 'localhost', }
> }
> 
> 
> Taking a look at that code.  At the declaration of postfix::relay, when 
> defining what I'd consider variables:
> $masquerade_domains = $::hostname,
> 
> What's happening at the $::hostname?  Is that referencing a previous 
> decleration within postfix or some other module?  Or is that a sort of 
> universal reference?  
> 
> Thanks for your time.
> 
> Eric
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/246c3931-7181-4bc6-b4e6-ba7d66e6d4a0%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/DA3DFF05-D363-4D1B-B44D-89DDF261E211%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Multiple puppet agents with the same name

2014-10-07 Thread denmat
Hi,

that depends on your manifest and if they need to talk to a puppet master
or you are just doing a puppet apply (masterless).

Have a look at the Vagrantfile docs on puppet provisioners and you may get
inspired. Also you can pass in 'puppet_node' names and facts at run time
(with a puppet master).
https://docs.vagrantup.com/v2/provisioning/puppet_apply.html
https://docs.vagrantup.com/v2/provisioning/puppet_agent.html

There are other ways to change the hostnames of the machines in Vagrant too:
https://docs.vagrantup.com/v2/vagrantfile/tips.html

Den

On Tue, Oct 7, 2014 at 10:17 PM, Markus Bischof 
wrote:

> Hi there,
>
> I'm pretty new to puppet and have a general question.
>
> I will have multiple (vagrant) machines wich i want to manage via puppet.
> The "problem" is that all the machines will have the same name because they
> are development machines wich are run by different developers. Is it a
> problem for puppet if all the machines have the same name?
>
>
> Markus
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/c4db0889-793d-4edc-86e6-8c6ca9e3c3e7%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAJsPER2%2B%2BKv8ivV4kDr3BPPDCpY6vxbk%3Dy4MG2VhRnvuqTQqfg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Syntax error

2014-09-22 Thread Denmat
Hi,

Try $config_file = 'value'.

You need to assign the value. 

https://docs.puppetlabs.com/puppet/latest/reference/lang_conditional.html#case-statements

Cheers
Den
> On 22 Sep 2014, at 11:53, David Logan  wrote:
> 
> Syntax error at '=>'; expected '}' at /etc/puppet/modules/time

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/20C73C84-E00A-4B36-BF86-2A83A4E4A14D%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] [security] GPG signing key collision

2014-09-12 Thread Denmat
And they call themselves evil?? It's a slap in the face to evil doers 
everywhere ;)

> On 12 Sep 2014, at 7:49, Matthaus Owens  wrote:
> 
> and
> to evil32 for revoking their colliding key.
But thanks for the heads up.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/6F8AE74C-D967-4402-BFB8-1C8ED124C8A4%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] issue understanding site modules

2014-07-29 Thread Denmat
Okay, could be a couple of things here: 

Environments still require normal module layout. You have 'profile' set in 
manifests.
Check modules section here:
http://docs.puppetlabs.com/pe/latest/puppet_modules_manifests.html

Also when using environments you have to set --environment test when doing the 
agent run (otherwise it looks for production)

Den


> On 29 Jul 2014, at 16:46, Wijnand Wiersma  wrote:
> 
> Hi,
> 
> thank you for the responses. I should have pasted the relevant configs 
> instead of pointing to somewhere externally.
> 
> Some more information:
> /etc/puppet/puppet.conf
> 
> [main]
> logdir=/var/log/puppet
> vardir=/var/lib/puppet
> ssldir=/var/lib/puppet/ssl
> rundir=/var/run/puppet
> factpath=$vardir/lib/facter
> templatedir=$confdir/templates
> environmentpath = $confdir/environments
> ca_server = geppetto.mycorp.nl
> report_server = geppetto.mycorp.nl
> server = geppetto.mycorp.nl
> 
> [master]
> # These are needed when the puppetmaster is run by passenger
> # and can safely be removed if webrick is used.
> ssl_client_header = SSL_CLIENT_S_DN
> ssl_client_verify_header = SSL_CLIENT_VERIFY
> 
> [agent]
> usecacheonfailure = true
> configtimeout = 360
> show_diff = true
> report = true
> certname = geppetto.mycorp.nl
> splay = false
> environment = test
> runinterval = 600
> 
> 
> # ls -ald /etc/puppet/
> drwxr-xr-x 5 puppet puppet 4096 Jul 29 06:32 /etc/puppet/
> # ls -ald /etc/puppet/environments/
> drwxr-xr-x 6 puppet puppet 4096 Jul 29 06:31 /etc/puppet/environments/
> # ls -ald /etc/puppet/environments/test/
> drwxr-xr-x 6 puppet puppet 4096 Jul 29 06:32 /etc/puppet/environments/test/
> # ls -ald /etc/puppet/environments/test/manifests/
> drwxr-xr-x 3 puppet puppet 4096 Jul 29 06:31 
> /etc/puppet/environments/test/manifests/
> # ls -ald /etc/puppet/environments/test/manifests/profile/
> drwxr-xr-x 2 puppet puppet 4096 Jul 29 06:31 
> /etc/puppet/environments/test/manifests/profile/
> # ls -ald /etc/puppet/environments/test/manifests/profile/base.pp
> -rw-r--r-- 1 puppet puppet 45 Jul 29 06:31 
> /etc/puppet/environments/test/manifests/profile/base.pp
> # cat /etc/puppet/environments/test/manifests/profile/base.pp
> class profile::base {
>  class { '::ntp': }
> }
> 
> # cat /etc/puppet/environments/test/environment.conf
> manifest = site.pp
> modulepath = modules:site
> 
> # cat /etc/puppet/environments/test/site.pp
> hiera_include('classes')
> 
> # cat /etc/puppet/environments/test/hiera/common.yaml
> ---
> classes:
> - 'profile::base'
> 
> ntp::servers:
>  - 0.us.pool.ntp.org
>  - 1.us.pool.ntp.org
> 
> 
> # puppet agent -t
> Warning: Setting templatedir is deprecated. See 
> http://links.puppetlabs.com/env-settings-deprecations
>   (at /usr/lib/ruby/vendor_ruby/puppet/settings.rb:1095:in `block in 
> issue_deprecations')
> Info: Retrieving pluginfacts
> Info: Retrieving plugin
> Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
> Could not find class profile::base for geppetto.mycorp.nl on node 
> geppetto.mycorp.nl
> Warning: Not using cache on failed catalog
> Error: Could not retrieve catalog; skipping run
> 
> 
> I have read the documentation but it just doesn't click why this setup does 
> not work. I am getting more confused by the minute (but that might be due to 
> the stress of course ;-) )
> 
> -- Wijnand
> 
> - Oorspronkelijk bericht -
>> You might like to read this:
>> http://docs.puppetlabs.com/puppet/latest/reference/config_file_environment.html
>> Also this:
>> http://docs.puppetlabs.com/puppet/latest/reference/environments.html
>> 
>> If you provide relevant puppet master puppet.conf and directory structure we
>> may be able to help further.
>> 
>> THT
>> Den
>> 
>>> On 29 Jul 2014, at 5:23, Christopher Wood 
>>> wrote:
>>> 
 On Mon, Jul 28, 2014 at 11:54:34AM -0700, Wijnand Wiersma wrote:
  Hi all,
  I am a bit in distress right now. I have to replicate a dead puppet
  server
  on a new server. I have all hiera files and manifests etc in git but I
  am
  not able to get a new puppet server to compile catalogs.
  The old server was 3.4 and the new server is 3.6.2 with directory
  environments enabled.
  To understand the whole process I even created a empty environment
  exactly
  like
  
 https://github.com/adrienthebo/r10k/blob/master/doc/dynamic-environments/quickstart.mkd
  I really copied and pasted everything in that quickstart. The tutorial
  misses a default node definition but that's ok, I understand that part.
  However, it fails to even load the one class I try to load:
  Error: Could not retrieve catalog from remote server: Error 400 on
  SERVER:
  Could not find class profile::base for geppetto.mycorp.nl on node
  geppetto.mycorp.nl
>>> 
>>> I haven't read that tutorial and haven't yet used directory environments.
>>> To find out what paths your puppetmaster is using to find files, run your
>>> puppetmaster in the foreground in debu

Re: [Puppet Users] issue understanding site modules

2014-07-28 Thread Denmat
You might like to read this:
http://docs.puppetlabs.com/puppet/latest/reference/config_file_environment.html
Also this:
http://docs.puppetlabs.com/puppet/latest/reference/environments.html

If you provide relevant puppet master puppet.conf and directory structure we 
may be able to help further.

THT
Den

> On 29 Jul 2014, at 5:23, Christopher Wood  wrote:
> 
>> On Mon, Jul 28, 2014 at 11:54:34AM -0700, Wijnand Wiersma wrote:
>>   Hi all,
>>   I am a bit in distress right now. I have to replicate a dead puppet server
>>   on a new server. I have all hiera files and manifests etc in git but I am
>>   not able to get a new puppet server to compile catalogs.
>>   The old server was 3.4 and the new server is 3.6.2 with directory
>>   environments enabled. 
>>   To understand the whole process I even created a empty environment exactly
>>   like 
>> https://github.com/adrienthebo/r10k/blob/master/doc/dynamic-environments/quickstart.mkd
>>   I really copied and pasted everything in that quickstart. The tutorial
>>   misses a default node definition but that's ok, I understand that part.
>>   However, it fails to even load the one class I try to load:
>>   Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
>>   Could not find class profile::base for geppetto.mycorp.nl on node
>>   geppetto.mycorp.nl
> 
> I haven't read that tutorial and haven't yet used directory environments. To 
> find out what paths your puppetmaster is using to find files, run your 
> puppetmaster in the foreground in debug mode (add the path to your 
> puppetmaster config):
> 
> su - puppet
> puppet master --config /etc/puppet/puppet.conf --debug --no-daemonize 2>&1 | 
> tee /var/tmp/pm1.log
> 
> That may give you some hints?
> 
> http://docs.puppetlabs.com/guides/troubleshooting.html
> 
>>   What is this really minimal config missing for this to work? I fail to see
>>   where to put all my old manifests now and I have been trying for 2 days
>>   now.
>>   What piece of documentation did I miss? I am sorry if this is a frequently
>>   asked question, it currently is a bit hard to find anything regarding
>>   directory environments.
>>   -- Wijnand
>> 
>>   --
>>   You received this message because you are subscribed to the Google Groups
>>   "Puppet Users" group.
>>   To unsubscribe from this group and stop receiving emails from it, send an
>>   email to [1]puppet-users+unsubscr...@googlegroups.com.
>>   To view this discussion on the web visit
>>   
>> [2]https://groups.google.com/d/msgid/puppet-users/7a2d7480-65b0-4400-98ca-d20c4cb4a62a%40googlegroups.com.
>>   For more options, visit [3]https://groups.google.com/d/optout.
>> 
>> References
>> 
>>   Visible links
>>   1. mailto:puppet-users+unsubscr...@googlegroups.com
>>   2. 
>> https://groups.google.com/d/msgid/puppet-users/7a2d7480-65b0-4400-98ca-d20c4cb4a62a%40googlegroups.com?utm_medium=email&utm_source=footer
>>   3. https://groups.google.com/d/optout
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/20140728192330.GB30396%40iniquitous.heresiarch.ca.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/FA3C0B27-3496-4576-B4A3-AF0BA663F362%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] use client_data/catalog/.json for nagios check?

2014-07-22 Thread Denmat
This one from RIP works ok for me:
https://github.com/ripienaar/monitoring-scripts/blob/master/puppet/check_puppet.rb


> On 23 Jul 2014, at 5:47, Atom Powers  wrote:
> 
> I use a script that checks if the puppet client is running and parses the 
> lastrunreport for last run time and if any errors were reported applying the 
> catalog.
> 
> 
>> On Tue, Jul 22, 2014 at 12:36 PM, Bernard Clark  
>> wrote:
>> We need to be alerted whenever a puppet report from any puppet client is 
>> late. We were thinking of having Nagios monitor the last modification time 
>> of a client's /var/lib/puppet/client_data/catalog/.json and alert us 
>> when that file ages too much. Anyone have a better idea?
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to puppet-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/puppet-users/5d8181b7-6911-4af1-95dd-24331425d80e%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
> 
> 
> 
> -- 
> Perfection is just a word I use occasionally with mustard.
> --Atom Powers--
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/CAF-H%3DOkfzUo9JD9Jt_s8z3zr-w5f5M%3DGrZACWc_s%2B52E0DrE4g%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/FF386C74-4A77-4EE4-BE09-62D0ACB129A1%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Making a node use a different manifest

2014-07-06 Thread Denmat
Hi Roger,

Yes you can copy the critical node configuration into the spare node's. 

However, it really does depend on what that critical node does and any special 
requirements it has. It may have services that might need to be managed across 
one by one. Or it may require one node to be shutdown before the other come up. 

Anyway, short answer is yes, you can copy the node definitions if that makes 
sense to do so.

HTH
Den

> On 7 Jul 2014, at 4:44, Roger Sherman  wrote:
> 
> Hi,
> 
> I've inherited an environment that is using Puppet 2.7. We're migrating from 
> one datacenter to another, but we're still running out of the old datacenter. 
> Some of our hardware there is reaching EOL, and it's creating a situation 
> that I, with my limited Puppet experience, am not really sure how to procede. 
> 
> We have a node that is fairly critical, that may be dying. Long story short, 
> we have a a server there that has the same resource setup (CPU, RAM, etc), 
> that isn't doing anything, and we want the spare node to take over for the 
> critical node. After much discussion, we think the easiest way to make that 
> happen is by running the puppet manifest for the critical node, on the spare 
> node.
> 
> This raises a couple of questions - the one that I'm having the most trouble 
> wrapping my head around is, what is the best method for making the spare node 
> use the critical nodes manifest? I don't think I can just copy and paste it 
> into the spare nodes manifest (it used to be part of a different group of 
> servers), can I? I assume I need to change the hostname...if so, what is the 
> best method for doing so?
> 
> Both nodes are running Debain 6 - any and all help would be greatly 
> appreciated.
> 
> Thank you,
> 
> Roger
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/b888c8d1-e541-43e3-bb97-d8245651b38a%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/D44FE81A-EFA4-40AD-85BB-8ED13BACF5E9%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet 3.6.2 + Vagrant

2014-07-01 Thread Denmat
I've just been working with it and noticed that warning too. 

I believe it will require an update to puppet.rb in vagrant - and be patched to 
work with the older versions. 

Haven't looked too closely yet.

Den

> On 1 Jul 2014, at 23:26, Sergey Arlashin  wrote:
> 
> Hi!
> 
> Does anybody use puppet 3.6.x with Vagrant? 
> Is there any way to specify manifests dir instead of site.pp file ? 
> 
> Thanks in advance.
> 
> --
> Best regards,
> Sergey Aralashin
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/B3B8C5FA-6DD7-4A9D-8439-6CA5517364CD%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/485A9F01-D143-4D70-943D-E90DD7E02C6E%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: Question on directory environments and environment.conf - Puppet Version 3.6.2

2014-06-19 Thread Denmat
Hi Peter,

This is master side only:
http://docs.puppetlabs.com/puppet/latest/reference/environments.html

> On 19 Jun 2014, at 23:29, Peter  wrote:
> 
> Hi List,
> 
> Does anyone have any suggestions on this?  I was hoping that someone may have 
> gotten it working or at least agree that there is an issue.  I am happy to 
> raise a puppet ticket.
> 
> Peter.
> 
>> On Saturday, 14 June 2014 10:48:56 UTC+10, Peter wrote:
>> Hi List,
>> 
>> I am starting to play with directory environments on a test box.  I am using 
>> puppet apply (without a master) to get a feel for how it all comes together.
>> 
>> Key files:
>> 
>> puppet.conf
>> -
>> 10:35 - root@dna: bootstrap/puppet
>> $ cat /root/tmp/bootstrap/puppet/puppet.conf 
>> [main]
>> #Turn on the new smarter directory envrionments
>> envrionmentpath= $confdir/environments
>> #Need to set this here for playing with repo as environment.conf does not 
>> allow setting hiera.yaml location
>> hiera_config= $confdir/$environment/hiera.yaml
>> -
>> 
>> environment.conf
>> -
>> 10:35 - root@dna: bootstrap/puppet
>> $ cat /root/tmp/bootstrap/puppet/environments/production/environment.conf 
>> #Use relative paths within environment directory
>> modulepath = site-modules:modules
>> -
>> 
>> puppet config print does not show show the modulepath with the 
>> environment.conf details
>> 
>> -
>> 10:38 - root@dna: tmp/bootstrap
>> $ puppet config print --confdir /root/tmp/bootstrap/puppet --environment 
>> production | grep modulepath
>> basemodulepath = /root/tmp/bootstrap/puppet/modules:/usr/share/puppet/modules
>> modulepath = /root/tmp/bootstrap/puppet/modules:/usr/share/puppet/modules
>> -
>> 
>> I have also tried to use puppet apply in case it was an issue with puppet 
>> config:
>> -
>> 10:38 - root@dna: tmp/bootstrap
>> $ FACTER_hostname=dna FACTER_domain=mgnt.local FACTER_fqdn=dna.mgnt.local 
>> FACTER_machine_role=puppetmaster puppet apply --verbose --confdir 
>> /root/tmp/bootstrap/puppet -e "include roles::puppetmaster" --debug
>> Error: Could not find class roles::puppetmaster for dna.mgnt.local on node 
>> dna.mgnt.local
>> Error: Could not find class roles::puppetmaster for dna.mgnt.local on node 
>> dna.mgnt.local
>> -
>> 
>> site-modules does contain the puppetmaster file in the correct location
>> -
>> 10:40 - root@dna: bootstrap/puppet
>> $ ls 
>> /root/tmp/bootstrap/puppet/environments/production/site-modules/roles/manifests/
>> puppetmaster.pp
>> -
>> 
>> My question is why isn't the environment.conf file being picked up?  Is this 
>> something that will only work if I am running a puppetmaster?
>> 
>> Have I missed something obvious?
>> 
>> Thanks,
>> 
>> Peter
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/2cba773a-b227-4eb0-bbd5-31c8a73f24ba%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/07BA16F8-54FE-4146-BC8A-EE8459393B69%40gmai

Re: [Puppet Users] Hiera lookup bug?

2014-05-27 Thread Denmat
Stick it in quotes?

> On 27 May 2014, at 16:01, Dirk Heinrichs  wrote:
> 
> Hi,
> 
> I'm facing a strange problem with Hiera, where a trailing 0 (zero) is cut off 
> a value, for example:
> 
> myclass::version: 1.10
> 
> resolves to 1.1 when the class is applied on an agent.
> 
> The agent runs Puppet 3.4.3 with Hiera 1.3.1 on Windows Server 2008R2.
> 
> As a workaround I'm now passing the value to the class as a default parameter 
> instead of through hiera.
> 
> Any ideas how to fix this?
> 
> Bye...
> 
> Dirk
> -- 
> 
> Dirk Heinrichs, Senior Systems Engineer, Engineering Solutions
> Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
> Tel: +49 2226 159 (Ansage) 1149
> Email: d...@recommind.com
> Skype: dirk.heinrichs.recommind
> www.recommind.com
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/53842A30.9000306%40recommind.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/6EF43A39-15F6-4B23-BA2E-9368DB5A%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: rspec testing and viewing the catalogue it is testing

2014-05-07 Thread Denmat
Hi,

You need to include the puppet logging in you rspec file.

I can't remember what that is off the top of my head but I'm pretty sure this 
will help you along the way.


http://www.ruempler.eu/2012/04/03/puppet-rspec-debugging/?mobile=1


> On 8 May 2014, at 0:42, choffee  wrote:
> 
> Am I doing this wrong?
> 
> I create a test that says "check for a file named foo", write some code that 
> should create the file. It fails for whatever reason and the test just says 
> no.
> 
> How do I get a clue what I am doing wrong? It seems obvious to me that having 
> the catalog that was tested against for that test would mean I could see my 
> error rather than having to guess and test again.
> 
> john
> 
>> On Wednesday, 7 May 2014 13:38:22 UTC+1, choffee wrote:
>> I am trying to debug why my test is failing and not producing a file that I 
>> thought it should be.
>> 
>> Is there a simple way to view the catalogue that rspec is testing against?
>> 
>> I tried --debug in the .rspec file with the debugger gem and it gives no 
>> extra errors is there something more I need to add to my test to turn it on?
>> 
>> Thanks 
>> 
>> john
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/e743953c-6175-4193-a620-1456d84ac84d%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/DAFB2E08-C94A-46A4-83B2-5E4F049D6E42%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Can't get puppetmaster working with passenger

2014-04-07 Thread Denmat
Hi, 

I'll see if I can answer this before my train hits the underground..

Check for gems and multiple versions of puppet.

Run your puppetmaster without apache, ie, stop apache and run puppet master 
--no-daemonize --debug. Run your agent against that.

Apache shouldn't be that much of an issue, re-check your config against the 
very good PuppetLabs docs and let us know how you get on.

Made it,
Den

> On 8 Apr 2014, at 7:29, John Pyeatt  wrote:
> 
> Tried to convert from webrick to passenger today. Failed.
> 
> When I run
> 
> puppet agent -tv
> 
> I get two things that are troubling.
> 
> 1)
> I get this message:
> Notice: with older puppet master. To remove this notice, please upgrade your 
> master(s) 
> Notice: to Puppet 3.3 or newer.
> 
> Even though in my webrick days we are running puppet 3.4 on the puppetmaster.
> 
> 2)
> I also get these messages.
> 
> Warning: Local environment: "dev" doesn't match server specified node 
> environment "production", switching agent to "production".
> 
> Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
> Could not find class bastion for 10.0.11.83 on node 
> 
> My /etc/puppet/puppet.conf is configured correctly because it was working in 
> the webbrick world. Additionally, I know it is getting some information from 
> my  puppet.conf file because it is correctly executing my ENC script defined 
> in external_nodes=
> 
> It just doesn't seem to be recognizing my extra modulepath= and manifest= 
> values for my [dev] stanza. I've checked file/directory permissions and the 
> apache user www-data has read permissions to those directories.
> 
> Any ideas???
> -- 
> John Pyeatt
> Singlewire Software, LLC
> www.singlewire.com
> --
> 608.661.1184
> john.pye...@singlewire.com
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/CAEisTLnBypf%3DwxEP44%2Bs0Y_aSZNYpGVSEkXnJAOPYm2eWciR8w%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/DC7D1B68-E27B-423E-A6AD-CA96EBD1E238%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Need help optimizing our Puppet module

2014-04-07 Thread Denmat
Hi, 

And further to that I also did a quick skim and found you use augeas for a few 
resources that can probably be better executed with simpler resource types (I'm 
looking at you yumrepo). Augeas is costly from my understanding.

Also to get a good view of where the costs are in your manifest you can use the 
practically undocumented '--evaltrace'. It will show how long it takes to apply 
a resource on the host.

 Cheers
Den

> On 8 Apr 2014, at 7:39, Pete Brown  wrote:
> 
> Hi Harrison,
> 
> Here are some initial thoughts after a quick glance at your code.
> 
> First question I would have would be why are you using ensure_resource
> to do one thing at a time?
> Like install one package or one service etc.
> I love wrappers but it seems like overkill to use it do do something
> the native resource will do itself.
> The native resource is likely much faster.
> 
> If you were using ensure_resource to say create 1000 users then sure go for 
> it.
> Yeah it make things if they don't exist but to me it's sloppy coding
> and a waste of resources (pun intended).
> 
> Second question is why do you have a define inside a class?
> It will probably have no effect on the speed but it's not good
> practice and makes the code harder to read.
> 
> Hope that helps.
> 
> Pete.
> 
> 
>> On 8 April 2014 06:03, Harrison Ripps  wrote:
>> Hey all--
>> Over at OpenShift we are big fans of Puppet. We've developed our own module,
>> which is central to our OpenShift Origin installer and to our Vagrant-based
>> development environment. As the author of the installer and the current
>> project lead for OpenShift Origin, I really want to promote these tools
>> across our entire team, ops and developers.
>> 
>> The challenge that I am facing is that right now, our Puppet module seems
>> pretty slow. I am not a Puppet expert, but I'm willing to bet that someone
>> with decent Puppet skills would look at our module and chuckle inwardly
>> about the obvious performance potholes that we're driving through.
>> Hopefully, after that, you'd be willing to follow up on this thread and let
>> me know what we can do to get the lead out.
>> 
>> So, if you have a few cycles, please have a look at
>> https://github.com/openshift/puppet-openshift_origin and let me know how you
>> think we can make it better and faster.
>> 
>> Thanks!
>> Harrison
>> 
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to puppet-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/puppet-users/40bd9c96-b63e-4752-a487-661591a35d02%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/CAJ8DPF7UJZKM6RGxnx-PFcVg9eNnQ%3DJxXeNaFM%2BO4jRH5JOKxQ%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/52942FF9-EB00-432A-B860-08D02C279D97%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Ordering between 2 create_resources in Puppet Manifests

2014-03-29 Thread Denmat
Hi,

Yes there is at least one way. I have been using tags to achieve this like so:

$default_a = { tag => 'do_a' }
$some_hasha = hiera('a')
$default_b = { tag => 'do_b' }
$some_hashb = hiera('b')

create_resource(resource_type, $some_hasha, $default_a)

create_resource(resource_type, $some_hashb, $default_b)

Resource_type<| tag == 'do_a' |> -> Resource_type<| tag == 'do_b' |>

You should also be able to tag in your yaml 'a' or 'b' hash but you have to tag 
every hash throughout the hierarchy (which could lead to unexpected results if 
you forget).

Den

> On 30 Mar 2014, at 0:48, Vishwa Kumba  wrote:
> 
> I was wondering if there is a way to define ordering between 2 
> create_resources in puppet manifests.
> 
> For example:
> 
> create_resources('php::install', $php_packages)  ->
> create_resources('webapps::deploy', $apps)
> 
> The above does not work, but does puppet support the ordering between 2 
> create_sources statements?
> I need my webapps to be deployed after the required packages have been 
> installed.
> 
> I have seen a syntax like this below. Here class['apache'] seems to be 
> execued before the create_resources here.
> 
> include apache
> Class['apache'] -> Webapps::Deploy_files <| |>
> create_resources('webapps::deploy_files', $apps)
> 
> Is there any puppet documentation on this strange syntax <| |>? Using this 
> syntax, is it possible to call create_resources before and after a class 
> declaration?
> 
> 
> -Vishwa
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/2e1fb72d-02e3-4c1d-a552-23090ad6be06%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/F0AD206A-C151-4CE0-87A3-32FE27E5BB04%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] How to apply template based on a string in a file

2014-02-14 Thread Denmat
Or place those values in hiera. 

> On 15 Feb 2014, at 0:12, Johan De Wit  wrote:
> 
> If you need information from the client, then you should think 'facter'.
> 
> Or you could write a custom fact, or use external facts.
> 
> http://puppetlabs.com/blog/facter-1-7-introduces-external-facts
> http://docs.puppetlabs.com/guides/custom_facts.html
> 
> HTH
> 
> Jo
> 
>  
>> On 02/14/2014 12:18 AM, Ray wrote:
>> Newbie question:  
>> I need to be able to apply a specific template based on whether a string is 
>> found in an 
>> existing file on the client or not. I tried the following (found an example 
>> somewhere... it does not work.. always falls into the first condition)
>> 
>> What would be the correct way to check for the value in the file?
>> 
>> 
>>  if "grep STANDARD /var/adm/buildIT/ServerBuild.dat 2>/dev/null"
>> {
>>   file { '/etc/openssh/sshd_config':
>> ensure  => file,
>> backup  => false,
>> content => template("sshdconfig/sshdconfigsol.erb"),
>> notify => Service['ssh']
>>   }
>> 
>>   service { 'ssh':
>> ensure => running,
>> enable => true,
>> hasstatus => true,
>> hasrestart => true,
>>   }
>> }
>> else
>> {
>>   file { '/etc/openssh/sshd_config':
>> ensure  => file,
>> backup  => false,
>> content => template("sshdconfig/sshdconfigsolpm.erb"),
>> notify => Service['ssh']
>>   }
>> 
>>   service { 'ssh':
>> ensure => running,
>> enable => true,
>> hasstatus => true,
>> hasrestart => true,
>>   }
>>   }
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to puppet-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/puppet-users/e502a7ac-cebc-4454-900e-d504f2a89956%40googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 
> -- 
> Johan De Wit
> 
> Open Source Consultant
> 
> Red Hat Certified Engineer (805008667232363)
> Puppet Certified Professional 2013 (PCP006)
> _
>  
> Open-Future Phone +32 (0)2/255 70 70
> Zavelstraat 72  Fax   +32 (0)2/255 70 71
> 3071 KORTENBERG Mobile+32 (0)474/42 40 73
> BELGIUM http://www.open-future.be
> _
>  
> 
> Upcoming Events:
> 
> Zabbix Certified Training | 
> http://www.open-future.be/zabbix-certified-training-10-till-12th-march
> 
> Zabbix for Large Environments Training | 
> http://www.open-future.be/zabbix-large-environments-training-13-till-14th-march
> 
> Puppet Introduction Course | 
> http://www.open-future.be/puppet-introduction-course-14th-april
> 
> Puppet Advanced Training | 
> http://www.open-future.be/puppet-advanced-training-15-till-17th-april
> 
> Subscribe to our newsletter: http://eepurl.com/BUG8H
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/52FE164C.6070803%40open-future.be.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/F87542EC-CD35-47BB-8F01-98262D79E463%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] puppet random notification confusion

2014-02-10 Thread Denmat
Hi,

Puppet doesn't run in any specific order unless you tell it to.

Look at http://docs.puppetlabs.com/learning/ordering.html for the learning 
series.

Basically you can use 'require' declarations to get order:
file {'/tmp/thing':
  require => File['/tmp/that']
  ...
}

This says, the 'thing' file needs 'that' file to be done first.

HTH
Den

> On 10 Feb 2014, at 19:19, Muhammad Yousuf Khan  wrote:
> 
> i am being through a exercise on docs.puppetlabs.com
> and i am confuse with the notification output. as it shows last message first 
> and first message at last.
> i just need to know why the output notifications are random 
> 
> here is my .pp file.
> 
> @puppet:/etc/puppetlabs/puppet# cat  text.pp
> 
> file {'/tmp/test1':
>   ensure  => file,
>   content => "Hi.\n",
> }
> notify {"this is 1":}
> 
>file {'/tmp/test2':
>   ensure => directory,
>   mode   => 0644,
> }
> 
> file {'/tmp/test3':
>   ensure => link,
>   target => '/tmp/test1',
> }
> 
> file {'/tmp/test2/insidedir':
>   ensure => file,
>   content => 'infor put by me',
> }
> 
> user {'katie':
>   ensure => absent,
> }
> 
> notify {"I'm notifying you.":}
> notify {"this is 2":}
> notify {"So am I!":}
> notify {"this is 3":}
> 
> ---
> here is the output
> 
> Notice: Compiled catalog for puppet.mycompany.com in environment production 
> in 0.55 seconds
> Notice: this is 2
> Notice: /Stage[main]//Notify[this is 2]/message: defined 'message' as 'this 
> is 2'
> Notice: this is 3
> Notice: /Stage[main]//Notify[this is 3]/message: defined 'message' as 'this 
> is 3'
> Notice: So am I!
> Notice: /Stage[main]//Notify[So am I!]/message: defined 'message' as 'So am 
> I!'
> Notice: I'm notifying you.
> Notice: /Stage[main]//Notify[I'm notifying you.]/message: defined 'message' 
> as 'I'm notifying you.'
> Notice: this is 1
> Notice: /Stage[main]//Notify[this is 1]/message: defined 'message' as 'this 
> is 1'
> Notice: Finished catalog run in 0.49 seconds
> 
> 
> so the question is why the notification outputs are so random. 
> 
> Thanks, 
> 
> MYK
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/CAGWVfMmp6tN_qHd1bRmrqp%2BoMi7QXARqDZf6KEWxnpGGLqUShQ%40mail.gmail.com.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/BB71E785-889D-48E5-B4DB-8AF1BC48AF7A%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] File.exists? validation failure when trying to create file in same catalogue

2014-02-05 Thread Denmat
Hi,

What's the code on that line?

> On 6 Feb 2014, at 4:04, Gavin Williams  wrote:
> 
> /home/vagrant/modules/glassfish/manifests/create_domain.pp:41

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/523AB043-FAB6-4A2D-9D88-BEEACB790B8C%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] puppet jobs list?

2014-02-03 Thread Denmat
The puppet list allows you to posts jobs to the list.

You needs to include [JOBS] in the subject line so people who aren't looking 
can skip it.

> On 4 Feb 2014, at 0:20, Jason Antman  wrote:
> 
> Thanks to both Chris and Peter for their tips/advice.
> 
> I'm familiar with the ThoughtWorks DevOps hiring presentation Yes, 
> cultivating talent is good preferred. We've already got some good puppet 
> knowledge on the team; we're not so much looking to hire "because we need 
> Puppet knowledge" as we're looking to grow our engineering and automation 
> teams from ~11 people to almost 20, and we've made a big enough investment in 
> Puppet that hiring at least one specifically for advanced Puppet skills is 
> desired.
> 
> Thanks,
> Jason
> 
>> On 02/01/2014 10:46 AM, Christopher Wood wrote:
>> No idea on job boards these days, but in 2008 I was hired as a systems 
>> administrator based on my application to a job posted on workopolis.com. (I 
>> hadn't heard of puppet at that point.)
>> 
>> I notice that places I read like http://highscalability.com offer sponsored 
>> Job Openings posts, for example:
>> 
>> http://highscalability.com/display/Search?moduleId=4876569&searchQuery=job+openings
>> 
>> Also more companies are running their own infrastructure blogs, with an "if 
>> you like this we're hiring" tagline. To wit:
>> 
>> http://word.bitly.com/post/74839060954/ten-things-to-monitor
>> 
>> But finally, a puppetconf 2013 presentation suggested you have your own 
>> existing talent do things, which sounds like your best bet:
>> 
>> http://www.slideshare.net/PuppetLabs/stophiringstartgrowing-130823160712phpapp01
>> 
>>> On Sat, Feb 01, 2014 at 10:14:09AM -0500, Jason Antman wrote:
>>> Is there a puppet jobs list or board anywhere? (not jobs at PL, jobs
>>> dealing with Puppet)
>>> 
>>> If not, where would you advertise/post (or look, I guess) for engineers
>>> with strong puppet skills, both on the usage/admin side, and skilled
>>> ruby devs (preferably with some Puppet experience)?
>>> 
>>> We'er hiring, and having abysmal luck with wherever our internal and
>>> external recruiters have posted.
>>> 
>>> Thanks for any tips/ideas,
>>> Jason
>>> 
>>> -- 
>>> 
>>> Jason Antman | Systems Engineer | CMGdigital - Atlanta, GA, USA
>>> jason.ant...@coxinc.com | p: 678-645-4155
>>> 
>>> 
>>> -- 
>>> You received this message because you are subscribed to the Google Groups 
>>> "Puppet Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to puppet-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/puppet-users/52ED0F41.6060607%40jasonantman.com.
>>> For more options, visit https://groups.google.com/groups/opt_out.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/52EF97A8.6050802%40jasonantman.com.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/47876648-72BD-408D-B583-BF2D1CFEAC38%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Weird Error From Running Puppet

2013-11-21 Thread Denmat
Two things, look at disabling detailed-exitcodes and use --hiera_conf to 
declare the path to the hiera.yaml file.

That should get you further.
Den

> On 22 Nov 2013, at 3:43, MM  wrote:
> 
> So I had this confuse error message when running puppet via Vagrant puppet 
> provisioner with Puppet 3.3.2 and Data in Module
> 
> Error: Could not run: Could not find file true
> The following SSH command responded with a non-zero exit status.
> Vagrant assumes that this means the command failed!
> 
> puppet apply --binder true --ordering manifest --modulepath 
> '/etc/puppet/modules:/tmp/vagrant-puppet/modules-0' --manifestdir 
> /tmp/vagrant-puppet/manifests --detailed-exitcodes 
> /tmp/vagrant-puppet/manifests/default.pp || [ $? -eq 2 ]
> 
> Stdout from the command:
> 
> 
> 
> Stderr from the command:
> 
> Error: Could not run: Could not find file true
> 
> Here my file layout,
> 
> .
> ├── Gemfile
> ├── Gemfile.lock
> ├── Rakefile
> ├── Vagrantfile
> ├── data
> │   ├── environment
> │   └── node
> ├── hiera.yaml
> ├── puppet
> │   ├── Puppetfile
> │   ├── manifests
> │   └── modules
> └── r10k.yaml
> 
> Vagrant is configured to run puppet as following,
> 
>   config.vm.define 'mysql_server' do | mysql |
> mysql.vm.hostname = 'mysql-server.local'
> mysql.vm.provision :puppet do | puppet |
>   puppet.options = [
> '--binder true',
> '--ordering manifest',
>   ]
>   puppet.manifests_path = 'puppet/manifests'
>   puppet.manifest_file  = 'default.pp'
>   puppet.module_path= 'puppet/modules'
> end
> 
> So my question is what does error message mean?  Do I need to tell puppet 
> where to look hiera.yaml anywhere in host or guest?
> 
> Thanks,
> -wd
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/5a33e4a4-b341-4250-bbfb-5fb7a98674b5%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/57836F99-7247-4EAA-86FE-E338B385DF1D%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] puppet: access to a portion of modules?

2013-11-12 Thread Denmat
Hi,

Take a look at r10k.
https://github.com/adrienthebo/r10k

Den

> On 13 Nov 2013, at 4:02, dkoleary  wrote:
> 
> Hey;
> 
> This may be more appropriate to the git group but, I suspect people here 
> would have run into similar situations more than the git users have.
> 
> I'm working on a proof of concept for a git controlled puppet implementation 
> supporting an environment of linux systems including web and tomcat servers.
> 
> Perfect world, what I'd like to do is provide the team that supports those 
> applications read and write access to the puppet modules that control their 
> applications only - so they can't see anything else.
> 
> Right now, all the modules are maintained under one git repo. I took a quick 
> peek at the pro git book and it looks like subtrees *might* be the answer i'm 
> looking for; but, I wanted to ask people that have hopefully solved similar 
> problems if I'm on the right track before spending hours researching that 
> model.
> 
> So: would git subtrees work?  Is there a better method of handling this issue?
> 
> Any hints/tips/suggestions greatly appreciated.
> 
> Doug O'Leary
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/c649243b-42d1-4522-a31b-bad3529b78db%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/FB39ECC6-3D3C-479A-A0BB-AAE5B762723E%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] hiera config oddness

2013-09-30 Thread Denmat
Hi,

It isn't finding the file name declared as your hostname.

Two things here I would suggest.

1. Use certname instead of hostname. Hostname can easily be changed but 
certname a little harder.
2. Use puppet master --no-daemonize --debug (on the master) and look for the 
hiera log output.

In any case, point two will show you how hiera is performing its lookups and 
what files it is using.

Den

On 01/10/2013, at 3:43, Bret Wortman  wrote:

> I'm trying to set up hiera for the first time, and something really odd is 
> happening.
> 
> I set up my hiera.yaml file in /etc/puppet/, and it was pretty simple:
> 
> ---
> :backends:
>   - yaml
> :hierarchy:
>   - "%{hostname}"
>   - common
> 
> :yaml:
>   :datadir: /etc/puppet/data
> 
> So I added a "flag" class, which just has a manifest containing one "notify" 
> so I can see that it's getting loaded. I stuck it in "data/common.yaml":
> 
> ---
> puppetserver : 'zgepetto.foo.net'
> ipamaster : 'ipamaster'
> 
> classes:
>   - role::base
>   - flag
> 
> And lo and behold, the notify showed up when I ran puppet agent -t --noop.
> 
> Then I tried moving the flag mention into a file named for my test node, 
> zw129.yaml:
> 
> ---
> classes:
>   - role::workstation
>   - flag
> 
> But the flag never got picked up. Confused, I moved it back to common.yaml 
> and there it was again. Eventually, I got around to removing "common" from my 
> hiera.yaml file (leaving only the "{hostname}" in the hierarchy) and still 
> common is getting loaded, even after doing a "service puppetmaster restart".
> 
> I've looked around for other instances of hiera.yaml but don't see any. What 
> else could be causing hiera to load a common.yaml that I'm not asking for, 
> and neglecting the zw129.yaml that I am asking for? It sure feels like I'm 
> picking up an incorrect config file somewhere, but I'm not sure where to look 
> or what logfile to examine next.
> 
> Thanks!
> 
> 
> Bret Wortman
> 
> http://damascusgrp.com/
> http://about.me/wortmanbret
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] One node and several environments

2013-09-23 Thread Denmat
Hi,

In this case I would call puppet from cron and pass the environment var there.

There maybe better alternatives.

Den

On 24/09/2013, at 4:03, kay kay  wrote:

> I would like to use additional puppet environment for "fast response" 
> configuration and run it every minute. For that I've created new light 
> environment with only one module. But I don't know how to configure puppet 
> master manifests for one node with two environments? Is it possible?
> 
> I've found a manual 
> http://docs.puppetlabs.com/guides/environment.html#configuring-environments-for-agent-nodes
>  Is it what I need? I suppose that one node in several manifests could cause 
> an error.
> 
> P.S. Puppet 2.7
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Issue with starting puppetmaster service

2013-09-23 Thread Denmat
Hi,
Start puppet master in --nodaemonize mode

puppet master --nodaemonize --verbose (or --debug)

That might give you an idea of your problems.

Den

On 23/09/2013, at 3:32, V  wrote:

> 
> HI 
> 
> I have installed puppet on a RHEL 6.x machine.
> 
> When I try to start the puppet master service, it fails and when I check 
> status it says - "puppet dead but subsys locked".
> 
> [root@testvm init.d]# service puppet status
> puppet (pid  13304) is running...
> [root@testvm init.d]# service puppetmaster status
> puppet dead but subsys locked
> [root@testvm init.d]#
> 
> I can see that this error message is posted across the internet but unable to 
> find what the resolution would be to sort this out.
> 
> Any help would be much appreciated. Cheers
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Custom Fact undefined in manifests

2013-09-11 Thread Denmat
Hi,

Do you have stdlib module installed?

http://puppetlabs.com/blog/module-of-the-week-puppetlabsstdlib-puppetlabs-standard-library-part-3

On 12/09/2013, at 1:12, David Thompson  wrote:

> On 9/11/13 8:54 AM, jcbollinger wrote:
> 
>> Lack of response?  This is a volunteer community forum, not a paid
>> technical support service.  Give it some time.
> 
> No offense intended.  I'm continually impressed by the effort made by the 
> volunteers who watch this lists and provide so much help.
> 
>> Before you open a bug report, you should make sure that the file
>> containing your custom fact(s) is readable by the Puppet agent service.
>> That facter can read the file when you run it from the command line does
>> not prove that.  Even though the agent runs as a privileged user (or
>> should), access could still be blocked in various ways, such as
>> 
>> 1. Mandatory access controls (a.k.a. SELinux in enforcing mode) could
>>allow you to read the file, but prevent the agent service from doing so.
>> 2. If /etc/facter/facts.d is on an NFS-mounted filesystem that performs
>>root-squashing, then the agent may have less permissions on it than
>>you, personally, do.
>> 
>> There are probably other means.
>> 
>> Also, make sure Puppet is using the same Facter that you are using from
>> the command line.  If you have multiple versions installed then all
>> manner of havoc might ensue.  You might get multiple versions by
>> installing them from gem or from source into different Ruby libraries,
>> or into different parts of the same Ruby lib.
> 
> All good ideas.  An strace of  "puppet agent --test" (and/or the test 
> manifest above) shows that puppet is able to read the fact file (and, yes, 
> it's on the local disk), and the the version of facter being loaded is the 
> correct (and only) one (in my case, the RPM version 1.7.2, from 
> /usr/lib/ruby/site_ruby/1.8/facter.rb and friends), and still show the custom 
> facts as undef.
> 
> Even if I reduce my custom facts to a single file containing a single trivial 
> line ("somefact=somevalue"), the custom fact shows up in facter but not in 
> puppet.
> 
> I also get the same result when I pass the fact as yaml.  I tried json, but 
> got an error about missing the json gem, even though I have the puppetlabsdep 
> rubygem-json RPM installed.
> 
> -- 
> David Thompson
> Waisman Center Brain Imaging and Behavior Lab
> 1500 Highland Ave. Room T133
> Madison, WI  53705-2280
> (608) 265-6608
> dthompson (at) waisman (dot) wisc (dot) edu
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Custom Fact undefined in manifests

2013-09-10 Thread Denmat
Hi,

That looks a weird way of using facts. In my opinion that kind of detail should 
be in your puppet code, not your fact code.

What I would push out as facts are things like:

> v_ntp__ntp_conf=default

And then use puppet code to manage the 'if $::v_ntp...' (Notice top scope there 
for the fact variable). An alternative much better than this is to use Hiera.

Now, why is puppet not seeing that fact, I honestly don't know. Try different 
things like removing the puppet:/// schema and see if it works. Does a single 
word work without and forward slashes?

But really, I don't like the way your code is headed :)

HTH
Den

On 11/09/2013, at 1:38, David Thompson  wrote:

> I'm working with custom facts with facter 1.7.2.  I've created a fact file 
> with an ntp configuration fact in it:
> 
> # grep ntp_conf /etc/facter/facts.d/myfacts.txt 
> puppet:///modules/ntp/DEFAULT/ntp_conf
> 
> facter knows the fact is there:
> 
> # facter -p v_ntp__ntp_conf
> puppet:///modules/ntp/DEFAULT/ntp_conf
> 
> ...but puppet thinks the variable is undefined:
> 
> # cat /tmp/notify.pp 
> notify{$hardwaremodel:}
> notify{$v_ntp__ntp_conf:}
> [root@sazabi facts.d]# puppet apply /tmp/notify.pp 
> Notice: x86_64
> Notice: /Stage[main]//Notify[x86_64]/message: defined 'message' as 'x86_64'
> Notice: undef
> Notice: /Stage[main]//Notify[undef]/message: defined 'message' as 'undef'
> Notice: Finished catalog run in 0.28 seconds
> 
> What am I missing here?  Thanks!
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Error on tried to used this module in development environment.

2013-09-09 Thread Denmat

Is pentaho in a different module path on the two environments? Is the code 
exactly the same or does it contain extra code for the environments that 
doesn't compile?

On 10/09/2013, at 0:14, Eduardo Terzella  wrote:

> Error 400 on SERVER: Could not find class pentaho for 
> srvdev206.cia.stefanini.com on node srvdev206.cia.stefanini.com

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] manage puppet modules, but not all of them

2013-09-09 Thread Denmat
I believe the librarian can manage a specified directory. You can add that 
directory to your module path in your puppet.conf. 

That help?
On 09/09/2013, at 22:02, Jason Antman  wrote:

> We currently have one git repository for our modules/ directory, which is 
> mostly homegrown, but includes a few community modules. I'm looking for a way 
> to manage the installation and upgrade of community modules.
> 
> What we really want is something simple that can help us install and upgrade 
> community modules:
> * without managing our existing modules
> * in one git repository (modules/)
> * including Forge modules *and* arbitraty git/github repos
> 
> At the moment, I've been able to identify 2 real options:
> 1) puppet-librarian - this seems great, but (as far as I can tell) wants to 
> remove everything in the modules/ directory and manage it all from the 
> Puppetfile, which would require us to split our existing modules (some of 
> which are just one class with one or two resources) into independent git 
> repos and manage them all with librarian, which we don't want to do.
> 2) `puppet module` tool - this seems to do what we want, but AFAIK can only 
> install from the Forge (not github or local git URLs) so we lose the ability 
> to install non-forge modules, or to fork forge modules and install our fork 
> until (hopefully) the changes are merged in upstream.
> 
> Are there any other options I've missed, or will this end up being some 
> script that I cobble together myself?
> 
> Thanks for any advice/input
> Jason Antman
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] JOB: San Bruno, Systems Administrator - Aconex Ltd

2013-09-05 Thread denmat
Hi all,

We are currently looking for a Systems Administrator (Linux and a tiny bit
of Windows (MSSQL)).

Our clients are large building developers that use our product for document
storage and workflows.

Main deal is supporting that you will be supporting the main application
(JAVA) and doing all sorts of stuff.

You will need excellent Linux skills, puppet, firewalls, switches and
VMWare is also a good thing.

The official link is here:
http://careers.aconex.com/jobDetails.asp?sJobIDs=888696&lCategoryID=&lLocationID=6479&stp=AW&sLanguage=en

You will be working with the Australian and Indian offices.

Hope to hear from you.

Den Mat

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Puppet (v3.2.x) Performance

2013-08-12 Thread Denmat
Hi,

Run --debug --evaltrace on the agent run and check the output.

It will give you an idea of what is taking time. But sounds networky - dns?

Den

On 13/08/2013, at 2:05, Tony McMahon  wrote:

> Hi -  I'm new to puppet, but I'm managing to use it to keep ~130 linux 
> servers to a standard config. I only have one small problem which is 
> affecting 3 RedHat 6.4 servers - when running as a daemon the puppet agents 
> take ~250seconds to complete. When I stop the daemon and run a one-time agent 
> run (w/ verbose/trace etc) it takes about 12-14 seconds which is inline with 
> the rest of my servers.
> 
> Not sure where to look to solve this issue, so any help/advice will be 
> gratefully received.
> 
> Thanks, in advance
> 
> Tony
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Passenger-Rack error 500: no such file to load -- rack

2013-08-12 Thread Denmat
Hi,

Try loading rack in the ruby irb console.

The other thing is depending on your version of puppet an passenger you will 
need a particular rack version. Do a gem list and see if you have more than one 
rack gem installed and remove any that may have been recently upgraded.

Can be a bit fiddly.

Den

On 13/08/2013, at 5:53, Larry Fast  wrote:

> I have a puppetmaster running within passenger+rack.  It has been running 
> properly for almost a year and decided to stop working on the weekend. Now 
> I'm getting the Purple "Ruby (Rack) application could not be started" screen 
> with
> Error: no such file to load -- rack
> Application: /data1/rack/puppetmaster
> The backtrace is uninspiring. Snippets include:
> /usr/lib/ruby/site_ruby/1.8/rubygems/core_ext/kernel_require.rb  in 
> `gem_original_require'
> /usr/share/rubygems/gems/passenger-3.0.17/lib/phusion_passenger/rack/application_spawner.rb
>  in `load_rack_app'
> 
> I can only guess that a file went missing or got corrupted but have no idea 
> where to look.  I tried reinstalling Puppet 3.2.2, passenger & rack with no 
> change in behaviour.  Suggestions?
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Re: puppet fails to install some packages but succeed if I do a manual apt-get update --fix-missing. using puppetlabs/apt module

2013-08-04 Thread Denmat
Did you see this in the log?

Stage[main]//Apt::Builddep[python-imaging]/Exec[apt-builddep-python-imaging]/returns:
 E: Unable to lock the administration directory (/var/lib/dpkg/), are you root? 
[0m

Who are you running it as?

Den
On 04/08/2013, at 21:31, Alon Nisser  wrote:

> Stage[main]//Apt::Builddep[python-imaging]/Exec[apt-builddep-python-imaging]/returns:
>  E: Unable to lock the administration directory (/var/lib/dpkg/), are you 
> root? [0m

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Re: How to apply puppet manifests toa remote host?

2013-06-21 Thread Denmat
Hi,

You're describing puppet 'masterless'. Depending on the complexity of your code 
(use of stored configs for example) you should be able to apply a manifest with 
'puppet apply' on your laptop.

You may have to change your existing manifest to make it more useable without a 
master but there are many people that achieve a lot without a central master 
(and you can use both if you really want).

There's a bunch of google results that show how others have done it.

THT
Den



On 21/06/2013, at 6:27, Charlie Brune  wrote:

> I'm wondering if I have the same question.
> 
> I have a laptop that works well with my Puppet Master while I'm at home.  
> However, when I leave home, puppet no longer is able to apply the manifests 
> (configs) assigned to it.
> 
> I was hoping that it would simply continue to apply whatever manifests it 
> knew about while at home before I left.
> 
> Should I not be using the Master/Agent technique for using Puppet?
> 
> Thanks,
> Charlie
> 
> On Thursday, June 13, 2013 5:29:31 AM UTC-5, Sirisha wrote:
>> 
>> Hi All,
>> 
>> Am new to puppet and started writing simple  manifest files.
>> 
>> I have setup Server/Client mode for puppet and when I try to apply my 
>> manifest to local machine using "puppet agent" everything works well.
>> 
>> Is there any option to apply the manifests to a remote machine without ssh 
>> into the machine?
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Apply a specific manifest on agent

2013-06-20 Thread Denmat
Hi, depending on your code you can look at a few options.

When an agent connects to the puppet master you can supply a --tag var that you 
can then inspect and make changes in your code paths.

The other thing you can do is add --environment and use the environment 
features that puppet has to load a completely different site.pp. 

There's a puppet git workflows page that will come up in google that explains 
the environments - tags can be found in puppet docs. (Can't get you direct 
links, sorry).

THT
Den

On 21/06/2013, at 7:21, Dhananjayan Ramesh  wrote:

> Hi All,
> 
> I am new to Puppet and I am wondering if there is a way to just apply a 
> manifest one-time (present on the master, not included in site.pp) on an 
> agent node without having to edit site.pp? It's like I want to run a command 
> on the agent that will do this for me.
> 
> Something analogous to "puppet apply " except that the manifest is 
> not locally present on the agent, but on the master...
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Pushing file updates - taking a long time

2013-06-19 Thread Denmat
Well depending on what your code looks like I would say;
Install packages - unlikely
Restart services - more likely.

Notifies or subscribes to config files may or may not restart services - 
depends really..what you doin?

Den

On 19/06/2013, at 8:13, KC1987  wrote:

> Hi. 
> 
> First off my situation is this; 
> I have a module that's split up in such a way that it runs as follows:
> Install packages => Ensure files are present => insure service is running.
> 
> Now say I have a stable cluster up and running. I want to push a new file 
> change on a configuration to all slaves; 
> 
> Is there any reason puppet would try to install packages and start services 
> again?
> 
> Any help appreciated. Thank you.
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Can't find source of "Removing mount" errors

2013-06-12 Thread denmat
Hi,

You sure that a grep for 'mount' through your manifest finds nothing?

Looks a bit odd to me.

Den


On Thu, Jun 13, 2013 at 5:26 AM, Brandon  wrote:

> I'm maintaining part of a rather large puppet config and at a loss to
> figure out where the following errors are coming from during a puppet
> update:
>
> err: Removing mount all: /var/lib/puppet/files/all does not exist or is
> not a directory
> err: Removing mount pixel: /var/lib/puppet/files/pixel does not exist or
> is not a directory
> err: Removing mount compute: /var/lib/puppet/files/compute does not exist
> or is not a directory
> err: Removing mount other: /var/lib/puppet/files/other does not exist or
> is not a directory
> err: Removing mount storage: /var/lib/puppet/files/storage does not exist
> or is not a directory
> err: Removing mount storage-solaris: /var/lib/puppet/files/storage-solaris
> does not exist or is not a directory
>
> Searching for these strings in our config yields nothing and I'm really
> not sure where to go from here.  This puppet 2.6.4 on a CentOS 5.4 box.
>  Any ideas?
>
> Thanks.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Tidy on puppet 2.7.18 not working

2013-06-12 Thread denmat
http://docs.puppetlabs.com/references/latest/type.html#tidy

The default is atime, maybe you could try mtime?
tidy {delete_old_yaml:
  path  => "/var/lib/puppet/reports",
  age=> '1w',
  type => 'mtime',
  recurse => true,
  matches => ["*.yaml"],
}

Your filesystem might be set to noatime - you can try find with the -mtime
and -atime and see if there is a difference on what is returned.

Den

On Wed, Jun 12, 2013 at 10:31 PM, Balasubramaniam Natarajan <
bala150...@gmail.com> wrote:

> Hi
>
> I am trying to delete files which are older than a week under the
> directory "/var/lib/puppet/reports" on puppet master using tidy resource,
> however I cannot seem to get it working ?  Any reason as to why this would
> happen ?
>
> root@WheezyMaster:/var/lib/puppet/reports# puppet -V
> 2.7.18
> root@WheezyMaster:/var/lib/puppet/reports# cat
> /etc/puppet/manifests/tidy.pp
> tidy {delete_old_yaml:
>   path  => "/var/lib/puppet/reports",
>   age=> '1w',
>   recurse => true,
>   matches => ["*.yaml"],
> }
> root@WheezyMaster:/var/lib/puppet/reports# ls -ltrh
> wheezyagent.example.com/
> total 736K
> -rw-r- 1 puppet puppet  16K Apr  8 12:59 201304081659.yaml
> -rw-r- 1 puppet puppet  15K Apr  8 13:01 201304081701.yaml
> -rw-r- 1 puppet puppet  11K Apr  8 13:08 201304081708.yaml
> -rw-r- 1 puppet puppet  11K Apr  8 13:09 201304081709.yaml
> -rw-r- 1 puppet puppet  12K Apr 24 10:28 201304241428.yaml
> -rw-r- 1 puppet puppet  14K Jun 11 09:23 201306111323.yaml
> -rw-r- 1 puppet puppet  15K Jun 11 09:52 201306111352.yaml
> -rw-r- 1 puppet puppet  33K Jun 11 10:06 201306111406.yaml
> -rw-r- 1 puppet puppet 201K Jun 11 10:18 201306111418.yaml
> -rw-r- 1 puppet puppet  72K Jun 11 10:28 201306111428.yaml
> -rw-r- 1 puppet puppet  71K Jun 11 12:51 201306111651.yaml
> drwxr-xr-x 2 root   root   4.0K Jun 12 07:33 old
> -rw-r- 1 puppet puppet  68K Jun 12 07:34 201306121134.yaml
> -rw-r- 1 puppet puppet  68K Jun 12 08:21 201306121221.yaml
> root@WheezyMaster:/var/lib/puppet/reports# puppet apply
> /etc/puppet/manifests/tidy.pp
> notice: Finished catalog run in 0.03 seconds
> root@WheezyMaster:/var/lib/puppet/reports# ls -ltrh
> wheezyagent.example.com/
> total 736K
> *-rw-r- 1 puppet puppet  16K Apr  8 12:59 201304081659.yaml
> -rw-r- 1 puppet puppet  15K Apr  8 13:01 201304081701.yaml
> -rw-r- 1 puppet puppet  11K Apr  8 13:08 201304081708.yaml
> -rw-r- 1 puppet puppet  11K Apr  8 13:09 201304081709.yaml
> -rw-r- 1 puppet puppet  12K Apr 24 10:28 201304241428.yaml*
> -rw-r- 1 puppet puppet  14K Jun 11 09:23 201306111323.yaml
> -rw-r- 1 puppet puppet  15K Jun 11 09:52 201306111352.yaml
> -rw-r- 1 puppet puppet  33K Jun 11 10:06 201306111406.yaml
> -rw-r- 1 puppet puppet 201K Jun 11 10:18 201306111418.yaml
> -rw-r- 1 puppet puppet  72K Jun 11 10:28 201306111428.yaml
> -rw-r- 1 puppet puppet  71K Jun 11 12:51 201306111651.yaml
> drwxr-xr-x 2 root   root   4.0K Jun 12 07:33 old
> -rw-r- 1 puppet puppet  68K Jun 12 07:34 201306121134.yaml
> -rw-r- 1 puppet puppet  68K Jun 12 08:21 201306121221.yaml
> root@WheezyMaster:/var/lib/puppet/reports#
>
>
> --
> Regards,
> Balasubramaniam Natarajan
> www.blog.etutorshop.com
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Newbie Question: How to push/pull from other servers

2013-05-23 Thread denmat
Hi Dan,

so first you will need to layout your puppet directories like so:
.
├── manifests
│   └── site.pp
└── modules
└── my_module
├── files
│   └── my_file
├── manifests
│   └── init.pp
└── templates
└── a_template.erb

In site.pp above you can add something like:
node server1 {
  include my_module
}

Or you could do something like this:
node default {
  include my_module
}

node server1 inherits default { }

Now default could be named 'webservers', 'dbservers' or whatever group of
servers you want.

You can even do something like:
node /server\d+/ {
  include my_module
}

Here we are just including my_module for all nodes named server1 or 2 or N.

Now there are smarter ways to layout your node definitions and you wouldn't
normally include them in the the site.pp but this will give you the idea to
start off with - you can put them into a separate nodes.pp file(s) or into
something like a Hiera data structure. Anyway, have a look here for more
detail on node definitions.
http://docs.puppetlabs.com/puppet/3/reference/lang_node_definitions.html

Inside your module you might want to define what servers get what based on
things like facts. If so then this might give you some pointers too:
http://docs.puppetlabs.com/puppet/3/reference/lang_conditional.html

HTH
Den




On Fri, May 24, 2013 at 4:32 AM, Dan Hyatt  wrote:

>
> Hi all,
>
> How from the master server do I push a file to a client server (server
> group of 3-4 servers)?
>
> I know I saw it in the documentation, but now all I can find is the
> templates which is in next steps, unless it is easier to setup a templete
> to push out to a small set of servers.
>
>
> Been reading all the puppet documentation I can find. I googled it (no
> luck) In between getting puppet vm and getting my permanent VMWare license,
> so it could be in there.
>
> The simple thing I need to do for now is to be able to point at a client
> server to push the files out to the clients.
> My POC and initial need is to just be able to push our configuation files
> and scripts to the correct servers. Often only 3-4 files dependant per
> server type (JBOSS, Apache, and various apps), and making sure if anyone
> changes those files on the client it is overwritten with the standard file.
> My test module is:
>
>
> file { 'newfile':
> ensure  => present,
> #path => '/home/daniel/newfile',
> path => '/home/daniel/my_file',
> owner  => 'daniel',
> group  => 'artesia',
> mode  => 0640,
> #source => '/etc/puppetlabs/puppet/modules/my_module/my_file',
> source => 'puppet:///modules/my_module/my_file',
> }
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] new user help

2013-05-22 Thread Denmat
Hi Dan,

You are more than welcome to post here. You will also find there have been 
loads of questions already asked and answered on this list - so the archives 
are a wealth of knowledge too.

Things to help:
Try to break down the things you are having trouble with into a simple test 
case. 
Include the error you are getting - check the master and the client.

Most people start by peppering the list with loads of questions and go on to 
lead happy lives :)

On 23/05/2013, at 2:58, Dan Hyatt  wrote:

> I have spent a couple of weeks with the documentation at puppet labs. But I 
> am struggling with writting some basic modules and some other basic 
> operations to get me up to speed.
> 
> Is there any groups for newbies to help them get over the initial hump?
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Problem creating user with Puppet

2013-05-21 Thread Denmat
Hi,

That should work. Can you provide a bit more info? Versions of puppet and 
Ubuntu.

Can you also provide the output from your run with --debug? 

Make sure the user is removed before you run again.

Cheers
Den

On 21/05/2013, at 22:39, dusan.dorde...@clavistechnology.com wrote:

> Hi,
> 
> I am trying to create user on Ubuntu using this code:
> 
> user { "clavis":
> ensure => "present",
> home => "/home/clavis",
> name => "clavis",
> shell => "/bin/bash",
> managehome => true,
> groups => 'clavis',
> require => Group['clavis']
> }
> 
> User is created properly, but home directory is not created, although I 
> explicitly set mamagehome to true. Any idea what might be the problem here ?
> 
> Thanks in advance,
> Dusan
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Copy script from source -> run it -> delete it again

2013-05-19 Thread Denmat
Hmm, this?

>   exec { "/root/get_phantomjs.sh && rm -f /root/get_phantomjs.sh":


Maybe?

Den
On 19/05/2013, at 21:01, flip  wrote:

> Hi,
> 
> i want to deploy a build script, run it and delete if afterwards.
> 
> To deploy and run, i use this:
> 
>   file { "/root/get_phantomjs.sh":
> ensure => present,
> mode => "0700",
> source => "puppet:///modules/phantomjs/get_phantomjs.sh",
> require => Package["libfontconfig1-dev"],
>   }
> 
>   exec { "/root/get_phantomjs.sh":
> creates => "/usr/local/bin/phantomjs",
> require => File["/root/get_phantomjs.sh"],
>   }
> 
> What would be an elegant way to delete the get_phantom.js file after the exec?
> 
> flip
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] puppet/hiera - how to debug errors ?

2013-05-15 Thread denmat
for i in `find ./ -name *.yaml` ;do echo $i ; ruby -e "require 'yaml';
YAML.parse(File.open('$i'))" ;done
./extdata/modules/apache.yaml
/usr/lib/ruby/1.8/yaml.rb:176:in `load': syntax error on line 5, col 11: `'
(ArgumentError)

syntax error on line 5 is as far as the parser goes, the actual error might
be above that line though, like an open " ' " or something.

On Wed, May 15, 2013 at 8:16 PM, przemol  wrote:

> Hi Den,
>
> I suspected that it was because yaml file. Thank you for the one liner but
> is it possible to
> display which line in the yaml file is the problem ?
>
>
> On Wednesday, May 15, 2013 6:29:45 AM UTC+1, denmat wrote:
>
>> Funny this should come up as I got the same error just today.
>>
>> Incorrect YAML file was the culprit. Error is non-descriptive though.
>>
>> This will help you find the file.
>> for i in `find ./ -name *.yaml` ;do echo $i ; ruby -e "require 'yaml';
>> YAML.parse(File.open('$i'))" ;done
>>
>> Cheers,
>> Den
>>
>>
>>
>>
>> On Tue, May 14, 2013 at 11:59 PM, przemol  wrote:
>>
>>> I have included it in my first post:
>>>
>>> /etc/puppet/environments/env1/
>>> **manifests/site.pp
>>> node default {
>>> hiera_include ( "classes", [] )
>>> }
>>>
>>>
>>> On Tuesday, May 14, 2013 2:45:02 PM UTC+1, denmat wrote:
>>>
>>>> What's on that line?
>>>>
>>>> On 14/05/2013, at 22:02, przemol  wrote:
>>>>
>>>> etc/puppet/environments/env1/**m**anifests/site.pp:2 on
>>>>
>>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Puppet Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to puppet-users...@**googlegroups.com.
>>> To post to this group, send email to puppet...@googlegroups.com.
>>>
>>> Visit this group at 
>>> http://groups.google.com/**group/puppet-users?hl=en<http://groups.google.com/group/puppet-users?hl=en>
>>> .
>>> For more options, visit 
>>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>> .
>>>
>>>
>>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Puppet 3.2.0-0.1rc2.el6 SSL problem

2013-05-15 Thread Denmat
So can't help you specifically here, but if you take httpd/passenger out of the 
picture does it work as expected(ie, stop httpd and run the puppet master 
--no-daemonize --verbose)?

Cheers
Den

On 16/05/2013, at 0:28, Mike S  wrote:

> I am having an issue adding new clients to puppet.  The master is not 
> accepting connections from unauthenticated clients, even though my auth.conf 
> that worked with v3.1.1 has not changed.  If I test ssl via curl -k, the 
> puppet master returns "can't convert nil into String" to the client.  The 
> http log on the master shows a 400 return code.  Also note, I'm using 
> passenger & httpd with my puppet master.
> 
> If I do the certificate generation & signing manually and copy back to the 
> client, it can communicate fine with the master.  
> 
> Here is a snippet of my auth.conf: (I originally had "auth any", but changed 
> to "auth no" to see if it made any difference--which it didn't)
> 
> 
> 
> ### Unauthenticated ACLs, for clients without valid certificates; 
> authenticated
> ### clients can also access these paths, though they rarely need to.
> 
> # allow access to the CA certificate; unauthenticated nodes need this
> # in order to validate the puppet master's certificate
> path /certificate/ca
> auth no
> method find
> allow *
> 
> # allow nodes to retrieve the certificate they requested earlier
> path /certificate/
> auth no
> method find
> allow *
> 
> # allow nodes to request a new certificate
> path /certificate_request
> auth no
> method find, save
> allow *
> 
> 
> 
> Thanks,
> 
> Mike
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Puppet, git & security

2013-05-14 Thread Denmat
I haven't worked out a pure git way but Jenkins, git export, rsync are a good 
solid combo :)

On 15/05/2013, at 14:51, devzero2000  wrote:

> Sorry for the top posting.
> 
> Imho, i think this is a question that could be asked on the git mailing list.
> 
> Best
> 
> 2013/5/15, Alex Harvey :
>> Hi all,
>> 
>> In my company we have a security policy that frowns upon things like puppet
>> 
>> masters making git pull requests to other network segments.  Allowing code
>> to be pushed into these segments is less of a problem.
>> 
>> This policy makes it difficult to do stuff like,
>> https://puppetlabs.com/blog/git-workflow-and-puppet-environments/
>> 
>> I am wondering if anyone out there has ever faced a similar problem and has
>> 
>> worked out a way to build a push-only configuration from GIT code
>> repositories to puppet masters.
>> 
>> Best regards,
>> Alex
>> 
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to puppet-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to puppet-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>> 
>> 
>> 
> 
> -- 
> Inviato dal mio dispositivo mobile
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] puppet/hiera - how to debug errors ?

2013-05-14 Thread denmat
Funny this should come up as I got the same error just today.

Incorrect YAML file was the culprit. Error is non-descriptive though.

This will help you find the file.
for i in `find ./ -name *.yaml` ;do echo $i ; ruby -e "require 'yaml';
YAML.parse(File.open('$i'))" ;done

Cheers,
Den




On Tue, May 14, 2013 at 11:59 PM, przemol  wrote:

> I have included it in my first post:
>
> /etc/puppet/environments/env1/
> **manifests/site.pp
> node default {
> hiera_include ( "classes", [] )
> }
>
>
> On Tuesday, May 14, 2013 2:45:02 PM UTC+1, denmat wrote:
>
>> What's on that line?
>>
>> On 14/05/2013, at 22:02, przemol  wrote:
>>
>> etc/puppet/environments/env1/**manifests/site.pp:2 on
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] puppet/hiera - how to debug errors ?

2013-05-14 Thread Denmat
What's on that line?

On 14/05/2013, at 22:02, przemol  wrote:

> etc/puppet/environments/env1/manifests/site.pp:2 on

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Is it possible to compile puppet script to pure Ruby or other languages.

2013-05-14 Thread Denmat
Hi,

Compile to other languages? No. 
Compile to pure ruby? No.
Use masterless? Yes.
However, it is not the same as using the master - exported resources won't 
work, but things like hiera will still work.

Google returns many write ups on the matter.

Cheers,
Den

On 14/05/2013, at 13:28, hmf888...@gmail.com wrote:

> Now, I'm  using puppet managing system configurations, there are many 
> environment: production, staging, QA, DEV. The puppet server is only 
> accessible to production servers, but I also want to environments other than 
> production to use puppet, So my question is: is it possible to compile puppet 
> script to pure Ruby or other languages so as it can execute without 
> connecting to puppet master? 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Support for transactions

2013-05-07 Thread Denmat
Hi,

No, puppet is not transactionable. There is also no simple way to do it in 
puppet and running noop first is no guarantee that the run will succeed.

Version control may help you out to 'roll back' but it would be messy depending 
on changes. Traditional methods of snapshoting disk or backup/restore can be 
wrapped around it (never done that myself).

Rspec testing can help you out a bit in testing as of course so can other pre 
deployment testing.

If the client doesn't like 'always roll forward' then puppet might not float 
their boat.

Cheers,
Den

On 07/05/2013, at 10:17, James Birchfield  wrote:

> From all the reading I have done, I have come to the conclusion that 
> 'transaction' support is not offered in Puppet, in any of the predefined 
> language constructs (Specifically speaking of package).  Our client has a 
> request that if one package declaration fails, all other package declarations 
> that were successful be rolled back, and the catalog run immediately stop 
> afterwards.
> 
> From what I can tell, the best approach to this is to run the puppet agent 
> with '--noop' prior to the actual run and check the return code.  If it is 
> higher than 2, we have a potential issue.  Does this sound correct?
> 
> Or is there some puppet magic recipe I am missing?
> 
> Thanks!
> Birch
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Problems relocating $confdir on Puppet Master

2013-05-02 Thread Denmat
Well that kinda makes sense for the top scope variable on the master to return 
like that. Your options would be like any other fact/var you want to query on 
the client, no?

Den

On 02/05/2013, at 22:38, Dan White  wrote:

> Reference: 
> http://www.mail-archive.com/puppet-users@googlegroups.com/msg41278.html 
> 
> Still having issues. 
> 
> Even if I explicitly set confdir in the command line: 
> 
> puppet agent --no-daemonize --onetime --test --noop --no-report 
> --confdir=/etc/puppet 
> 
> Manifests containing %{::settings::confdir} give me the value from the 
> puppet-master even though the command
> 
> puppet config print confdir
> 
> on the agent returns /etc/puppet
> 
> I guess it boils does to how does one access settings on the local agent in 
> the manifests ? 
> 
> “Sometimes I think the surest sign that intelligent life exists elsewhere in 
> the universe is that none of it has tried to contact us.” 
> Bill Waterson (Calvin & Hobbes) 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Re: Installing packages on windows - fail :(

2013-05-02 Thread Denmat
Sorry, I don't do much windows so can't be of much help but how does running 
the install command from the windows command line go? Does that install okay?

Den

On 03/05/2013, at 0:08, Klavs Klavsen  wrote:

> On windows server 2008 - it works perfectly.
> 
> Den torsdag den 2. maj 2013 15.41.35 UTC+2 skrev Klavs Klavsen:
>> 
>> Hi guys,
>> 
>> I'm trying to make puppet install packages on windows.
>> 
>> It will install exe files just fine - but msi files won't be installed. They 
>> fail consistently :(
>> 
>> I've tried both having the files on a central directory - and give an UNC 
>> path to it, and with a file resource, putting the file in c:\temp\ - they 
>> both give the same result upon install:
>> 
>> package { "sflow":
>> source => $architecture ? {
>> 'x86' => 
>> 'C:\\temp\\hsflowd-win-1.22.2-x86.msi',
>> 'x64' => 
>> 'software01\\autorepo$\\hsflowd-win-1.22.2-x64.msi',
>> default => 'unsupported architecture'
>> },
>> name => $architecture ? {
>> 'x86' => 'sflow',
>> 'x64' => 'sflow',
>> }
>> }
>> 
>> If I use urls like:
>> 'c:\\temp\\hsflowd-win-1.22.2-x86.msi' - I get Failed to install: The 
>> network name cannot be found - after puppet runs: 
>> msiexec.exe /qn /norestart /i c:\\temp\hsflowd-win-1.22.2-x86.msi
>> 
>> If I use urls like:
>> 'c\:\\temp\\hsflowd-win-1.22.2-x86.msi'
>> 
>> it fails with: Failed to install: Fail on INT 24
>> 
>> Using Puppet-3.1.1 client on Windows Server 2003.
>> 
>> How do you guys install msi's on windows? :(
>> 
>> 
>> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] puppet 3 and hiera debugging

2013-04-30 Thread Denmat
Hi,

Run the master in no-daemonize and debug. You will see how it searches through 
your hierarchy that way.

Also you can use the command line on the master to query hiera. See puppet docs 
for details.

Cheers,
Den

On 01/05/2013, at 2:46, lth  wrote:

> I'm using puppet 3.1 and I want to figure out why hiera seems to be looking 
> in the wrong place and getting the wrong value.
> 
> I found a post from this group saying to run puppet -d on the master and look 
> in the log.  Having done that I still don't see anything hiera related except 
> for where puppet reads  hiera_config from puppet.conf, nor do I see anything 
> about the automatic parameter lookup or where I use the heira() function to 
> assign another variable.  
> 
> I tried both:
> puppet agent -t --environment=devel --logdest=/tmp/puppet_agent.log --debug
> puppet master --debug --no-daemonize --logdest=/tmp/puppet.log 
> --compile=vb271-puppet.vm --environment=devel
> 
> neither of which gave me anything useful.  What am I doing wrong?
> 
> Thanks in advance.
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] using a "test" within an if in a manifest

2013-04-28 Thread Denmat
Hi, 

No, not directly. Compilation takes place on the master and so that is where 
these tests would run.

What you need is a fact or use an exec. The fact will tell the master what the 
client has; an exec will run on the client where the test will execute.

Cheers,
Den

On 26/04/2013, at 3:50, Kubes  wrote:

> Does puppet have a similar syntax in a manifest?
> 
> if [ -f /somefile ] {
>  ...
> }
> 
> Looking  to test for -d -p -b, etc
> 
> I know that exec has this feature, but am looking to conditionally mount.  I 
> have thought of other use cases too.
> 
> Thanks!
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] How to reference a class in site.pp without creating a module?

2013-04-21 Thread Denmat
Hi Max,

Making the module directory structure is pretty easy and will serve you well as 
you develop your manifest.

mkdir -p /etc/puppet/manifests/jdk/manifests

Then copy your jdk class into init.pp in that new directory.

Alternatively you can add the import clause into site.pp to find your jdk class.

import '*.pp'

That will tell puppet to import any .pp file in the same directory as site.pp.

Regards,
Den

On 21/04/2013, at 23:18, max.bridgewa...@gmail.com wrote:

> Hi,
> 
> Trying to get some understanding on how code should be structured in Puppet. 
> I have a class oracle_java defined to deploy the Java virtual machine on the 
> agents  (basically copy of 
> http://log.scalemotion.com/2013/04/oracle-java-under-linux-with-puppet.html). 
> It works fine if i copy the body of the class (omitting the class 
> declaration) within site.pp. But that's no way to do business as you may 
> presume.
> 
> Now, I put the class under /etc/puppet/manifests/jdk.pp and change site.pp 
> into:
> 
> node default{
>   include jdk
> }
> 
> Unfortunately, this doesn't work. I keep getting the following error message 
> from the agent:
> 
> Could not retrieve catalog from remote server: Error 400 on SERVER: Could not 
> find class jdk for 
> ec2-52-221-193-75.compute-1.amazonaws.com-c1421f15-ac06-c6ab-6b5d-95f238bf27c7.
> 
> Is there a way to reference a class in site.pp without creating a module?
> 
> Thanks,
> Max.
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] syntax checking nodes, don't allow global scope

2013-03-12 Thread Denmat
Hi,

None that I know of - its the same as putting includes in site.pp. Education 
and review are your best bet.

Den

(That said, very verbose rspec tests may pick it up for very specific cases - 
but it would be a bit of work.)


On 12/03/2013, at 23:31, Rudy Gevaert  wrote:

> Hi,
> 
> We have been bitten twice by the following.  We group the configuration 
> or our nodes in several files.
> 
> nodes.d/group1.pp
> nodes.d/group2.pp
> ...
> 
> Now twice people have accidently added some statements that are put in 
> the global scope... which are then applied to all nodes:
> 
> The example is simplified:
> 
> ---nodes.d/group1.pp-
> node mynode {
>...
> }
> include thisorthat
> 
> 
> 
> Ofcourse this doesn't trigger a syntax error (that we run before a push 
> to the git repo can be done).
> 
> Are there any other ways to catch this?  Except code revision 
> 
> Thanks,
> 
> Rudy
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Struggling to get Hiera to work

2013-03-04 Thread Denmat
Hi,

You can run the master in debug mode and it will show you where puppet is 
looking for the hiera files. 

Give it a whirl,
Den

On 04/03/2013, at 22:49, Jonathan Gazeley  
wrote:

> I'm setting up Hiera in my multi-environment puppetmaster for the first time.
> 
> I've written /etc/puppet/hiera.yaml, defined the hierarchies and created a 
> couple of data files with sample data in them. When queried from the 
> commandline, it works:
> 
> [jg4461@puppet ~]$ hiera -d -c /etc/puppet/hiera.yaml motd::banner 
> environment=netops_jg4461
> DEBUG: Mon Mar 04 11:42:29 + 2013: Hiera YAML backend starting
> DEBUG: Mon Mar 04 11:42:29 + 2013: Looking up motd::banner in YAML backend
> DEBUG: Mon Mar 04 11:42:29 + 2013: Looking for data source netops_jg4461
> DEBUG: Mon Mar 04 11:42:29 + 2013: Found motd::banner in netops_jg4461
> MOTD BANNER for NETOPS
> 
> 
> However, when I try to reference this variable in a manifest with syntax like 
> this:
> 
> class motd {
>  file { 'motd':
>name=> '/etc/motd',
>mode=> '0644',
>owner   => 'root',
>group   => 'root',
>content => hiera('motd::banner'),
>  }
> }
> 
> It fails with this error:
> 
> Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
> Could not find data item motd::banner in any Hiera data file and no default 
> supplied at 
> /home/jg4461/PUPPETROOT/environments/common/modules/motd/manifests/init.pp:7 
> on node **.bris.ac.uk
> 
> My hiera.yaml points to the right location (the puppet dev environment is 
> being served from my homedir on the puppetmaster but all hiera data is stored 
> in /etc/puppet/hiera, with the production puppet environment).
> 
> What kind of things should I be looking for here?
> 
> Thanks,
> Jonathan
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Puppet dynamically handle ssl registration re-registration

2013-02-26 Thread Denmat
You could try the ruby gem uuid. That would give you a reasonably unique cert 
name. You would then run a scan/probe to verify current certs against current 
nodes and remove unused certs from the master.

The nodes are just rebuilt with a new uuid and register. Wouldn't worry about 
SSL dir cleaning if security isn't high on you priorities.

Den

On 27/02/2013, at 5:04, yngmike  wrote:

> Hello everybody.
>  
> I'm new to the group and I'm trying to do something a little different here.
>  
> Puppet Master: CentOS 6.3 running puppet-server-2.7.14-2.1
> Clients: CentOS 6.3 (puppet-2.6.17-2.el6.noarch) & SLES 11.2(puppet 
> 2.7.14-2.1)
>  
> I am trying to configure puppet in a very dynamic way. Nodes are not defined 
> in nodes.conf and each client is configured soley by facts that define the 
> role of the node.
> Certificate autosigning is turned on. 
> I am trying to automate the rollout of 50k clients. The clients will not have 
> DNS entries available at the time puppet first runs, but will have DNS  
> sometime an hour or so later.
> During the build process the client picks a psuedo random hostname to 
> register to puppet with.
>  
> I am trying to figure out a solution that would be totally programatic for 
> registration/re-registration and be tolerant to client hostname changes.
>  
> Current issues:
>  
> If the client ssl cert is removed from the puppet master (and puppetmasterd 
> is restarted), the client must "rm -rf /var/lib/puppet" and re-run to get a 
> valid cert
> if /var/lib/puppet is removed and the ssl certificate still lives on the 
> puppet master the client cannot re-register until the cert is removed from 
> the master
> Essentially I will never be using jabber or remote commands so I don't really 
> care what the systems are called, if one stops working I will just replace it 
> with a fresh working build.
> I need each system to be able to register/re-register no matter if an entry 
> exists on the puppet master or the local private key gets wiped out. This 
> would be so I can guarantee that the puppet agent will continue to run if its 
> hostname changes, or the local caches need to be wiped programatically to fix 
> a stuck puppet run.
>  
> I'm sure this issue has come up before but I can't find anything useful on 
> google results. I understand that these requirements are in place for 
> security reasons, but that is not as much of a concern in this particular 
> implementation (thing 50k dumb nodes that perform simple tasks). I would 
> prefer a more secure method, but it doesn't seem that puppet is tolerant to 
> dynamic nodes that might move around (regularly).
>  
> Any ideas?
>  
> Thanks,
>  
> -Mike
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] issue storing facts values in mysql on puppet master 3.0.2

2013-02-08 Thread Denmat
Hi,

Couple of questions:
What version of puppet?
What section of the puppet conf do you have those options declared (should be 
in [master])?

Den

On 08/02/2013, at 20:24, Heena  wrote:

> inventory_active_record

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Installing cloudprovisioner on windows

2013-01-16 Thread Denmat
Hi, 

I believe that this is supposed to be installed on the puppet master - and 
since you can't run puppet master on windows you are out of luck. 

Sorry,
Den

On 16/01/2013, at 11:21, PuppetUser  wrote:

> So give me any other solution to install cloud provisioner tool to open 
> source windows puppet. Also give me info of connecting puppet to AWS. I 
> surfed a lot on youtube dint get any info. Please help me out.
>  
> Regards
>  
> PuppetUser
> On Friday, January 11, 2013 9:39:41 PM UTC+5:30, Josh Cooper wrote:
>> On Thu, Jan 10, 2013 at 10:34 PM, PuppetUser  wrote: 
>> > Hi 
>> > 
>> > I am trying to install cloud provisioner on windows puppet. I just used 
>> > "puppet module install puppetlabs/cloudprovisioner". It gave the following 
>> > error. Error: `puppet module` actions are currently not supported on 
>> > Microsoft Windows. 
>> > It is that we should work with cloudprovisioner tarball on windows puppet. 
>> > Please help me out in working with the tarball 
>> > 
>> > 
>> > Regards 
>> > 
>> > PuppetUser 
>> > 
>> > -- 
>> > 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/-/l8r5BMr2CPUJ. 
>> > 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. 
>> 
>> We currently do not support running the module tool on windows due to 
>> its reliance on tar as a packing format. This will be fixed in a 
>> future release, see http://projects.puppetlabs.com/issues/11276. 
>> 
>> The workflow instead is to install the module on your master, and run 
>> `puppet agent` on the windows host, which will pluginsync the 
>> necessary files from the master to the agent host. 
>> 
>> The puppetlabs-registry module provides more details about how this 
>> process works on windows: 
>> https://forge.puppetlabs.com/puppetlabs/registry 
>> 
>> If instead you want to use `puppet apply`, then you can extract the 
>> tarball and point your modulepath at it as described here: 
>> http://docs.puppetlabs.com/puppet/2.7/reference/modules_installing.html 
>> 
>> Josh 
>> 
>> -- 
>> Josh Cooper 
>> Developer, 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/-/bdHRBhTuB2EJ.
> 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] How to increase performance of managed directories?

2013-01-09 Thread Denmat
Smaller directories? :)

But seriously Puppet sucks at distributing large directories (you should see 
posts to the list going back years on this topic). If you look at the file type 
resource docs (http://docs.puppetlabs.com/references/stable/type.html#file)you 
can see you can change the checksum used, ignore files (unsure of speed 
improvements there), recurselimit to limit the depth of recursion and possibly 
the mtime attribute.

Alternatively, if running *nix you could try rsync in an exec. 

Your mileage may vary,

Den

On 10/01/2013, at 12:01, Schofield  wrote:

> I have several directories that are installed and managed with puppet.  I am 
> finding the majority of the time of the puppet run is spent validating the 
> directory.  Are there any tricks to improve the performance of managed 
> directories? Or a better way than simple file resource with  ensure => 
> directory and recurse => true?
> 
>   file {'/xyz/directory' :
> ensure => directory,
> recurse => true,
> source => "puppet:///modules/mymod/directory",
>   }
> -- 
> 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/-/TuE-ygecAngJ.
> 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] Using puppet to upgrade a package (e.g. php 5.4)

2013-01-07 Thread Denmat
Hi,

You can use a yum makecache exec and require it in your php package section (or 
whatever relies on that repo). 

I've previously put all my repo calls in a 'stage' that ran before 'main' stage 
(see puppet docs for details). That worked well for local repo mirrors - was a 
slow down for others.

Cheers,
Den

On 08/01/2013, at 14:33, goo...@reetstreet.com wrote:

> On Centos 6.3, I have attempted to upgrade to php 5.4 using the following:
> 
> yumrepo { "epel-repo":
> baseurl => "http://download.fedoraproject.org/pub/epel/6/\$basearch";,
> descr => "Epel Repo",
> enabled => 1,
> gpgcheck => 0,
> }
> yumrepo   { "remi-repo":
> baseurl => 
> "http://rpms.famillecollet.com/enterprise/6/remi/\$basearch/";,
> descr => "remi repo",
> enabled => 1,
> gpgcheck => 0,
> require => Yumrepo["epel-repo"],
> }
> package { 'php':
> ensure => latest,
> require => [ Yumrepo["remi-repo"] ],
> }
> 
> This actually works fine, but only if I apply the manifest twice.  It seems 
> that the first time it runs, the Remi repo has not been installed, so Puppet 
> decides that the Package php statement ensure => latest is in fact 
> up-to-date, so it does not actually try to update php.  (php 5.3.3 is 
> installed from the default repository; Remi makes php 5.4 available.) On the 
> second run, Remi is installed, and Puppet correctly notices that php needs to 
> be updated.
> 
> Is there any way I can get the php package rule to update php on the first 
> run?
> -- 
> 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/-/oHjxcqEowX4J.
> 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] passenger-3.0.18 command(s) setting env variables to run commands anywhere.

2013-01-07 Thread Denmat
Hi,

Options are as follows:

set your $PATH.
PATH=$PATH:/bin

Add a path to a file in your /etc/profile.d/

Symlink binaries to /usr/local/bin

If you use the RPM provided by stealthmonkeys (not the cannabis site ;) ) it 
will do this for you.

Cheers
Den

On 08/01/2013, at 4:35, DJames  wrote:

> obviously passenger-status and etc... commands works when you are in the path 
> /usr/lib/ruby/gems/1.8/gems/passenger-3.0.18/bin
> but what env file I need to use to set the right variable to run these 
> commands from any path?
> 
> cat /etc/redhat-release
> CentOS release 6.2 (Final) --->> is my OS.
> 
> -- 
> 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/-/BtscNyEY2uIJ.
> 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: razor hang

2013-01-07 Thread Denmat
Hi,

It's a bit hard to answer your problem because your issues appear more complex 
than you have described. 

For the record I've used the PuppetLab module on github to install Razor 
previously and it works. It does require access to the Internet however. That 
leads me to the question, what is stopping you from accessing the Internet on 
your razor server? 

You can, like I think you've described, set up tftp and dhcpd yourself and it 
sounds like your razor server is working ok.

The client you are trying to install on to will require no Internet connection 
(unless you are accessing the Internet during your build). 

To build your client you need to add a model, policy and possibly a broker to 
your razor server (there are several good examples on how to do this on the 
web).  From that your node will know what to do once it is discovered.

You can see if your node is discovered using $ razor node

The problem in your original post does sound familiar. How much memory are you 
giving to the client? 

Sorry for a scatter gun answer but now running out of time until my bus stop.

HTH
Den




On 08/01/2013, at 0:15, hrajangarg220...@gmail.com wrote:

> Hi,
> I tried to install razor in Centos 5 which is a puppet master server. I have 
> configured proxy setting on my machine but still not able to ping any ip 
> outside my domain.
> Please help me with two things:
> 1. What are the steps to configure internet on centos 5( I am sorry , I know 
> it is a razor group)?
> 2. Is there any other way round to install razor on puppet whitout the 
> internnet connection?
>  
> regard, Harshit
>  
> 
> On Monday, October 8, 2012 10:00:37 PM UTC+5:30, Markus Falb wrote:
>> Hi, 
>> I was playing with razor today. But I am not going far. 
>> 
>> ipxe is downloading the microkernel but stays at 98% 
>> On the server side I see 
>> 
>> /opt/razor/Razor/bin/razor -w boot default 
>> '{"hw_id":"00:50:56:2e:c4:50___","dhcp_mac":"01-00-50-56-2e-c4-50"}' 
>> /opt/razor/Razor/bin/razor -w image path  mk kernel 
>> {"http_err_code":200,"errcode":0,"response":"/opt/razor/Razor/image/mk/687EqtppQJQPbgeirdhZy4/boot/vmlinuz","command":null,"result":"Ok","resource":"ProjectRazor::Slice::Image"}
>>  
>> 
>> This suggests that the download of the microkernel finished 
>> successfully. If so, why doesnt the microkernel do something? Or did it 
>> and I only don't know how to tell? 
>> 
>> Maybe I am missing something. I installed the server side (32bit) the 
>> non puppet way, I added a microkernel, I configured dhcp and tftp. 
>> 
>> The only razor thing I did was an razor image add -t mk -p ... 
>> Not sure what to do next. 
>> -- 
>> Kind Regards, Markus Falb 
>> 
> -- 
> 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/-/ZC6OnPACe5MJ.
> 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] Configuration is not applied notice: Finished catalog run in 0.01 seconds

2013-01-03 Thread Denmat
Hi,

First thing I would is check where I think this node is declared and stick a 
notify there to spit out a message on the run.

node nodename {
  notify {"some message and maybe a $var or $::fact
 }

Then use that same kind of message to trace through your code and find out the 
path your node travels.

That should get you further along.

Den

On 04/01/2013, at 2:08, Aleksandar Nikolic  wrote:

> Hi guys,
> 
> I am fairly new to puppet and I am having a problem with one of the clients. 
> I recently installed a new server that should get config from puppet master. 
> All similar servers I recently installed didn't have any problem. I installed 
> puppet agent on the server and sent a sign request. SSL cert is signed but 
> when I run puppetd manually I get the following:
> 
> info: Retrieving plugin
> info: Caching catalog for client4
> info: Applying configuration version '1357214285'
> notice: Finished catalog run in 0.01 seconds
> 
> Even though it says catalog run finish nothing is applied. The strange thing 
> is that I recently installed the same OS on the same machine and didn't get 
> any problem. I tried various debug options but searching the output didn't 
> help.  
> 
> debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/dscl does 
> not exist
> debug: Puppet::Type::User::ProviderLdap: true value when expecting false
> debug: Puppet::Type::User::ProviderUser_role_add: file roleadd does not exist
> debug: Puppet::Type::User::ProviderPw: file pw does not exist
> debug: Failed to load library 'rubygems' for feature 'rubygems'
> debug: Failed to load library 'selinux' for feature 'selinux'
> debug: Puppet::Type::File::ProviderMicrosoft_windows: feature 
> microsoft_windows is missing
> debug: Failed to load library 'ldap' for feature 'ldap'
> debug: /File[/var/lib/puppet/client_yaml]: Autorequiring File[/var/lib/puppet]
> debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet]
> debug: /File[/etc/puppet/ssl/public_keys/client4.pem]: Autorequiring 
> File[/etc/puppet/ssl/public_keys]
> debug: /File[/etc/puppet/ssl/crl.pem]: Autorequiring File[/etc/puppet/ssl]
> debug: /File[/etc/puppet/ssl/public_keys]: Autorequiring File[/etc/puppet/ssl]
> debug: /File[/var/lib/puppet/state/classes.txt]: Autorequiring 
> File[/var/lib/puppet/state]
> debug: /File[/var/lib/puppet/clientbucket]: Autorequiring 
> File[/var/lib/puppet]
> debug: /File[/etc/puppet/ssl/certs/client4.pem]: Autorequiring 
> File[/etc/puppet/ssl/certs]
> debug: /File[/var/lib/puppet/client_data]: Autorequiring File[/var/lib/puppet]
> debug: /File[/etc/puppet/ssl/certificate_requests]: Autorequiring 
> File[/etc/puppet/ssl]
> debug: /File[/etc/puppet/ssl/certs]: Autorequiring File[/etc/puppet/ssl]
> debug: /File[/var/lib/puppet/facts]: Autorequiring File[/var/lib/puppet]
> debug: /File[/etc/puppet/ssl/private_keys/client4.pem]: Autorequiring 
> File[/etc/puppet/ssl/private_keys]
> debug: /File[/etc/puppet/ssl/private_keys]: Autorequiring 
> File[/etc/puppet/ssl]
> debug: /File[/var/lib/puppet/state/graphs]: Autorequiring 
> File[/var/lib/puppet/state]
> debug: /File[/etc/puppet/ssl/certs/ca.pem]: Autorequiring 
> File[/etc/puppet/ssl/certs]
> debug: /File[/etc/puppet/ssl/private]: Autorequiring File[/etc/puppet/ssl]
> debug: /File[/etc/puppet/ssl]: Autorequiring File[/etc/puppet]
> debug: /File[/var/lib/puppet/log]: Autorequiring File[/var/lib/puppet]
> debug: /File[/var/lib/puppet/run]: Autorequiring File[/var/lib/puppet]
> debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/puppet]
> debug: /File[/var/lib/puppet/state/state.yaml]: Autorequiring 
> File[/var/lib/puppet/state]
> debug: Finishing transaction 70254557004780
> debug: /File[/etc/puppet/ssl/certs]: Autorequiring File[/etc/puppet/ssl]
> debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/puppet]
> debug: /File[/etc/puppet/ssl/private_keys]: Autorequiring 
> File[/etc/puppet/ssl]
> debug: /File[/etc/puppet/ssl/certificate_requests]: Autorequiring 
> File[/etc/puppet/ssl]
> debug: /File[/etc/puppet/ssl/crl.pem]: Autorequiring File[/etc/puppet/ssl]
> debug: /File[/etc/puppet/ssl]: Autorequiring File[/etc/puppet]
> debug: /File[/etc/puppet/ssl/public_keys]: Autorequiring File[/etc/puppet/ssl]
> debug: /File[/etc/puppet/ssl/certs/ca.pem]: Autorequiring 
> File[/etc/puppet/ssl/certs]
> debug: /File[/var/lib/puppet/run]: Autorequiring File[/var/lib/puppet]
> debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet]
> debug: /File[/etc/puppet/ssl/private_keys/client4.pem]: Autorequiring 
> File[/etc/puppet/ssl/private_keys]
> debug: /File[/etc/puppet/ssl/public_keys/client4.pem]: Autorequiring 
> File[/etc/puppet/ssl/public_keys]
> debug: /File[/etc/puppet/ssl/certs/client4.pem]: Autorequiring 
> File[/etc/puppet/ssl/certs]
> debug: /File[/var/lib/puppet/log]: Autorequiring File[/var/lib/puppet]
> debug: /File[/var/lib/puppet/facts]: Autorequiring File[/var/lib/puppet]
> debug: /File[/etc/puppet/ssl/private]: Autorequi

Re: [Puppet Users] How do I check content of a file in puppet

2012-12-27 Thread Denmat
Hi,

Couldn't he run --noop as a scanner for hosts out of compliance and then when 
one is found, run normal puppet run (obviously you don't have to run in noop 
and just run normal runs and monitor reports).

That way management can see that non compliant host are being made compliant ( 
a much more useful report one would think).

So the solution would be to describe the state of the sshd_config file the way 
it should be and enforce that.

Reporting options on that are normal puppet reports.

Cheers,
Den

On 28/12/2012, at 7:23, Christopher Wood  wrote:

> Metaphorically, your management is asking you to drive nails with a 
> screwdriver. The right tool for the job here is facter, not puppet. (And 
> puppet already uses facter, so your management apparently doesn't understand 
> the stack here.) While this is ultimately their problem, it sounds like you 
> have to act as an enabler in order to keep your job and buy your groceries. 
> Anyway, on to the helpful stuff!
> 
> I have no idea what sort of thing is in this compliance report. I will assume 
> that it is checking which hosts have successfully completed a puppet agent 
> run. To deliberately fail this in your scenario I might:
> 
> -write a script which checks the value of PermitRootLogin
> -script should exit with a non-zero status if the value is undesired
> -package this script in a deb (or rpm on your platform)
> -use puppet to distribute my deb everywhere
> -use an exec to run the script
> 
> Then you will see the same style of failure as if you ran this:
> 
> $ puppet apply -e 'exec { "/bin/false": }'
> err: /Stage[main]//Exec[/bin/false]/returns: change from notrun to 0 failed: 
> /bin/false returned 1 instead of one of [0] at line 1
> notice: Finished catalog run in 0.08 seconds
> 
> And that means the host is non-compliant.
> 
> Another item on my original point: ensure your communications with management 
> on this matter are all documented via email. When they finally figure out how 
> much technical debt they are accruing you will not wish to be left holding 
> their bag.
> 
> 
> On Thu, Dec 27, 2012 at 12:01:08PM -0800, pdiddy wrote:
>>   Understood, but is it possible to get it done via puppet? I've management
>>   requirement.
>> 
>>   On Thursday, December 27, 2012 2:52:31 PM UTC-5, Christopher Wood wrote:
>> 
>> You might be better off putting together a custom fact about this. Then
>> you can check fact(s) on the host(s) without trying to
>> manage-but-not-manage something inside puppet.
>> 
>> On Thu, Dec 27, 2012 at 11:15:14AM -0800, pdiddy wrote:
>>>How do I check content of a file in puppet?
>>>ex: I want to see if "PermitRootLogin" is "no"
>> in /etc/ssh/sshd_config
>>>file (RHEL). If it's "yes" i want to show it on compliance report.
>> For now
>>>I don't want make any changes to the sshd_config file through
>> puppet.
>>>Here is something I have:
>>>define line($file, $line, $ensure = 'present') {
>>>$line = "PermitRootLogin no"
>>>$file = "/etc/ssh/sshd_config"
>>>case $ensure {
>>>default : { err ( "unknown ensure value ${ensure}" ) }
>>>present: {
>>>warning/flag code:
>>>unless => "/bin/grep '${line}' '${file}'"
>>>}
>>>}
>>>}
>>> 
>>>--
>>>You received this message because you are subscribed to the Google
>> Groups
>>>"Puppet Users" group.
>>>To view this discussion on the web visit
>>>[1][1]https://groups.google.com/d/msg/puppet-users/-/M8gmxMKkp58J.
>>>To post to this group, send email to [2]puppet...@googlegroups.com.
>>>To unsubscribe from this group, send email to
>>>[3]puppet-users...@googlegroups.com.
>>>For more options, visit this group at
>>>[4]http://groups.google.com/group/puppet-users?hl=en.
>>> 
>>> References
>>> 
>>>Visible links
>>>1. [5]https://groups.google.com/d/msg/puppet-users/-/M8gmxMKkp58J
>> 
>>   --
>>   You received this message because you are subscribed to the Google Groups
>>   "Puppet Users" group.
>>   To view this discussion on the web visit
>>   [6]https://groups.google.com/d/msg/puppet-users/-/2kXlOB5em10J.
>>   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.
>> 
>> References
>> 
>>   Visible links
>>   1. https://groups.google.com/d/msg/puppet-users/-/M8gmxMKkp58J
>>   2. javascript:
>>   3. javascript:
>>   4. http://groups.google.com/group/puppet-users?hl=en
>>   5. https://groups.google.com/d/msg/puppet-users/-/M8gmxMKkp58J
>>   6. https://groups.google.com/d/msg/puppet-users/-/2kXlOB5em10J
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To post to this group, send email to pupp

Re: [Puppet Users] Trying, Trying and Trying and still cannot make puppet and client work :-(

2012-12-27 Thread DenMat Gone
Hi,

I think you should start here,
http://docs.puppetlabs.com/learning/agent_master_basic.html

You will need to declare your client node definition in either the sites.pp or 
more normally nodes.pp. 

node foo  {
  include squid
}

puppet apply - applies a local manifest
puppet agent - talks to master

Cheers
Den


ratotopi  wrote:

>I have two box with centos 6.3 and centos 5.8 running  puppet master 3.0 and 
>puppet client 2.7  respectively. I can make master work when I use "puppet 
>apply" on it and it works fine but I have not been able to do that with 
>client, I cannot make it work, when i run the following command in client it 
>shows the following output
>
>puppet agent --test --server='puppet.xyz.com'
>info: Caching catalog for puppetclient.xyz.com
>info: Applying configuration version '1356631880'
>notice: Finished catalog run in 0.06 seconds
>
>and on master when i give the following command it works
>
>puppet apply -e "include squid"
>/Stage[main]/Squid/Package[squid]/ensure: created
>Finished catalog run in 39.18 seconds
>
>Puppet master has the init.pp files in 
>/etc/puppet/modules/squid/manifests/init.pp which contains following lines :-
>
>class squid {
>case $operatingsystem {
>    centos, redhat: {
>    $service_name = 'squid'
>    $conf_file    = 'squid.conf'
>}
>}
>
>package { 'squid':
>  ensure => 'installed',
>}
>
>service { 'squid':
>  ensure => 'stopped',
>  enable => 'false',
>  require => Package [ 'squid' ]
> }
> }
>
>What else do I need to do to make client work. I have searched internet and 
>they show different command and some of them not even work what should I do to 
>learn puppet and make it work. Thank you for your input.
>
> 
>
>-- 
>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/-/DL2UfFd74iYJ.
>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] Template in site.pp

2012-12-19 Thread denmat
Hi,

I'm pretty sure there is a template directory config option in puppet conf
which would default to /var/lib/puppet/templates (you'll need to verify
this because I can't at the moment).

If so you should be able to pass that on the command line like so,
puppet agent --templatedir  

Of course you can go on to use modules which expects to find templates in
the modules template directory.

This is assuming your declaration looks okay, you haven't included your
manifest details.

THT,
Den
 On 20 Dec 2012 04:21,  wrote:

> Can I use a template in site.pp?
>
> I have a templates directory in my /etc/puppet directory which has my
> template, but i get this error message:
> Wed Dec 19 09:19:23 -0800 2012 Puppet (err): Could not retrieve catalog
> from remote server: Error 400 on SERVER: Could not find template
> 'server.xml.erb' at /etc/puppet/manifests/tcuser.pp:52 on node
> qa-bruckner.corp.certifydatasystems.com
>
> Do I have to configure puppet master somehow to let it know that there is
> content in that directory?
>
> TIA.
>
> R,
> rahul
>
> --
> 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/-/XJVApz3-rR0J.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Puppet Master Console not accessibel on EC2 instance.

2012-12-19 Thread Denmat
Hi,

That address won't resolve very nicely. What is the publicly resolvable address 
for your node? Have you allowed 443 in your security groups to your node?

HTH,
Den

On 19/12/2012, at 9:11, lalit jangra  wrote:

> Hi,
> 
> I have an RHEL based EC2 instance where i have downloaded puppet 2.7 using 
> http://info.puppetlabs.com/download-pe.html. Now i have followed instructions 
> from http://docs.puppetlabs.com/pe/2.7/install_basic.html to install it using 
> answer.txt file & i could see no error while installing. After installation i 
> can see below message on ssh console.
> 
>  Thanks for installing Puppet Enterprise!
>Puppet Enterprise has been installed to "/opt/puppet," and its 
> configuration files are located in "/etc/puppetlabs".
> ## Answers from this session saved to 
> './answers.lastrun.ip-10-224-122-211.ec2.internal'
> ## In addition, auto-generated database users and passwords, including the 
> ROOT MySQL password, have been saved to 
> "/etc/puppetlabs/installer/database_info.install"
>!!! WARNING: Do not discard these files! All auto-generated database users 
> and passwords, including the ROOT Mysql password, have been saved in them.
> =
> 
> The console can be reached at the following URI:
>  *  https://ip-10-224-122-211.ec2.internal:443
>If you have a firewall running, please ensure the following TCP ports are 
> open: 8140, 61613, 443
>NOTICE: This system has 3.67 GB of memory, which is below the 4 GB we 
> recommend for the puppet master role. Although this node will be a fully 
> functional puppet master, you may experience
>poor performance with large numbers of nodes. You can improve the puppet 
> master's performance by increasing its memory.
> 
> =
> 
> Now when i am trying to access puppet master console using 
> https://ip-10-224-122-211.ec2.internal:443, i can see below error.
> 
> Firefox can't establish a connection to the server at 
> ip-10-224-122-211.ec2.internal.
> 
> Can anybody help me on same?
> 
> Regards.
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/puppet-users/-/s9xxD227e8oJ.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/puppet-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Puppet client runs outside of office hours

2012-12-11 Thread DenMat Gone
Cron would be your best bet. You can manage cron jobs via puppet.

kdo  wrote:

>anyone have any smart ideas around scheduling puppet client runs during 
>specific times ? such as outside of office hours ?
>
>
>any options that can be set in the puppet.conf for 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/-/BbplaHlxFcQJ.
>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] Reload fact variable during run

2012-11-07 Thread Denmat
Hi,

Not from within puppet but there are external ways (ssh, MCollective ). From 
them you can schedule action.

You can run puppet again (as compilation is done on the master not the client). 
The facts are sent to the master at the start of the run and puppet can't do 
anything with them midstream.

On the next run puppet will have the status of the fact (be it the way you want 
or not).

THT,
Den 

On 08/11/2012, at 1:08, loic  wrote:

> Hi,
> 
> I just made a custom fact to display a status about mysql.
> The fact variable is 'foo'.
> In a module I test this fact variable to apply or not a ressource :
> class bar {
>if $::foo == 'toto' {
>   notice("Execute ressource")
>   # Reload fact variable ?
>   if $::foo == 'toto' {
>  fail("Ressource not applied")
>   }
>}
> }
> 
> After apply my ressource I would like to reload the fact variable to test if 
> there is a mysql status modification.
> Do you know how can do that in a puppet class ?
> 
> Thank you in advance.
> 
> Loïc
> -- 
> 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/-/-uh5H26o0B0J.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/puppet-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Puppet Meetup Australia (Melbourne, Sydney, Brisbane)

2012-11-04 Thread Denmat
I would be glad to meetup in Melb.

On 05/11/2012, at 9:58, Stephen Johnson  wrote:

> Hi
> I currently in Australia, as im the instructor on the Puppet Fundamentals 
> * courses in Melbourne, Sydney and Brisbane and just wondered if anyone 
> fancied meeting up and talking about puppet, hiera, puppetdb, devops etc etc. 
>  
> 
> As i dont live here any feedback on locations would help, if not ill randomly 
> pick on closer to the time. 
> 
> Melbourne
>  
> Thursday 8/11/2012 5.30pm (Location to be decided) 
> 
> Sydney
> 
> Thursday 15/11/2012 5.30pm (Location to be decided) 
> 
> Brisbane
> 
> Thursday 22/11/2012 5.30pm (Location to be decided) 
> 
> 
> *
> http://puppetlabs.com/events/melbourne-puppet-fundamentals-training-melbourne-november-2012/
> http://puppetlabs.com/events/sydney-puppet-fundamentals-sydney-november2012/
> http://puppetlabs.com/events/puppet-fundamentals-training-brisbane-australia/
> 
> -- 
> 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/-/l41Yb2fjkrwJ.
> 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] Connection Timed Out updating node on 3g mobile broadband device

2012-10-25 Thread Denmat
Interesting setup. Sometimes providers block uncommon ports. Can you get to 
8140 over your 3/4g? If not, try running on 443 (change puppet.conf or apache 
ports).

If none of these work check the docs for timeout settings (can't remember of 
hand).

Den

On 26/10/2012, at 3:55, Steve  wrote:

> I have a puppetmaster on an Amazon EC2 instance of Ubuntu 12.04. All of the 
> puppet nodes I am running are also on ubuntu server 12.04. I can connect any 
> of the nodes on a wireless or LAN connection. When I switch my node to a 
> Verizon mobile 3g or 4g device I run "puppet agent -t" and I get the message
> 
> err: Could not retrieve catalog from remote server: Connection time out - 
> SSL_connect
> warning: Not using cache on failed catalog
> err: Could not retrieve catalog; skipping run
> err: Could not send report: Connection timed out - SSL_connect
> 
> Before I got the message there was a long pause about 20 minutes long trying 
> to do the update.
> 
> I can download and install packages with the 3g connection using apt-get 
> install. I can access webpages including secure pages using Lynx. I can ping 
> the Puppet Master.
> 
> I wanted to make sure I was getting through to the Puppet Master so I removed 
> the certificate from both the Puppet Master and the Client. Then I ran 
> "puppet agent -t" and the certificate was signed and I can see it again on 
> the Puppet Master and the client. 
> 
> I checked port 8140 to see that it is open in Amazon, and it is. There is no 
> firewall enabled in the instance itself.
> 
> Next I limited the puppet update to only one trivial module and nothing 
> changed.
> 
> Lastly, I connected a node that is on a desktop version of Ubuntu 12.10 and 
> connected my Verizon device. I had the similar behavior. The system paused 
> for 10 to 20 minutes like before then gave me the message:
> 
> Error: Failed to apply catalog: execution expired
> Error: Could not send report: execution expired
> 
> Since I have little experience with puppet or these devices, I suspect the 
> device has some sort of interrupt or time out on the device that causes 
> problems with the puppet process.
> 
> Anyways as far as I can tell the only thing I cannot do with this connection 
> is update puppet.
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/puppet-users/-/PHNcXaR-TyAJ.
> 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] Error 403 on SERVER: Forbidden request: (HOSTNAME) access to (path_to_file) [find] authenticated at line 73 at /etc/puppet/modules/nginx/manifests/init.pp:97

2012-10-08 Thread Denmat
While Craig maybe right, are you sure it's not a typo? Are you trying to find a 
file in the mymodule module or in nginx module?

Normally you would try to keep files required by a module in the module that 
calls them.

Den

On 09/10/2012, at 5:11, Craig White  wrote:

> Seems like you need to edit auth.conf on your puppet server to allow access 
> which is currently being denied. See the comments in the file (and the 
> messages below) which should give you clues as to which rules need to be 
> enabled.
> 
> Craig
> 
> On Oct 8, 2012, at 5:42 AM, Mantas Klasavičius wrote:
> 
>> Hi,
>> I can't download file using: source => 'puppet:///modules/mymodule/myfile',
>> 
>> Got this error in puppet client:
>> err: /Stage[main]/Nginx/File[server_key]: Could not evaluate: Error 403 on 
>> SERVER: Forbidden request: (HOSTNAME) access to 
>> /file_metadata/modules/mymodule/myfile [find] authenticated  at line 73 
>> Could not retrieve file metadata for puppet:///modules/mymodule/myfile: 
>> Error 403 on SERVER: Forbidden request:(HOSTNAME) access to 
>> /file_metadata/modules/mymodule/myfile [find] authenticated  at line 73 at 
>> /etc/puppet/modules/nginx/manifests/init.pp:97
>> 
>> 
>> on puppet master I have:
>> err: /usr/lib/ruby/1.8/puppet/network/rest_authconfig.rb:51:in 
>> `check_authorization'
>> /usr/lib/ruby/1.8/puppet/network/rest_authorization.rb:19:in 
>> `check_authorization'
>> /usr/lib/ruby/1.8/puppet/network/http/handler.rb:66:in `process'
>> /usr/lib/ruby/1.8/puppet/network/http/webrick/rest.rb:24:in `service'
>> /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
>> /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
>> /usr/lib/ruby/1.8/puppet/network/http/webrick.rb:45:in `listen'
>> /usr/lib/ruby/1.8/webrick/server.rb:173:in `call'
>> /usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
>> /usr/lib/ruby/1.8/webrick/server.rb:162:in `start'
>> /usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
>> /usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
>> /usr/lib/ruby/1.8/webrick/server.rb:92:in `each'
>> /usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
>> /usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
>> /usr/lib/ruby/1.8/webrick/server.rb:82:in `start'
>> /usr/lib/ruby/1.8/puppet/network/http/webrick.rb:42:in `listen'
>> /usr/lib/ruby/1.8/puppet/network/http/webrick.rb:41:in `initialize'
>> /usr/lib/ruby/1.8/puppet/network/http/webrick.rb:41:in `new'
>> /usr/lib/ruby/1.8/puppet/network/http/webrick.rb:41:in `listen'
>> /usr/lib/ruby/1.8/puppet/network/http/webrick.rb:38:in `synchronize'
>> /usr/lib/ruby/1.8/puppet/network/http/webrick.rb:38:in `listen'
>> /usr/lib/ruby/1.8/puppet/network/server.rb:126:in `listen'
>> /usr/lib/ruby/1.8/puppet/network/server.rb:141:in `start'
>> /usr/lib/ruby/1.8/puppet/daemon.rb:124:in `start'
>> /usr/lib/ruby/1.8/puppet/application/master.rb:202:in `main'
>> /usr/lib/ruby/1.8/puppet/application/master.rb:146:in `run_command'
>> /usr/lib/ruby/1.8/puppet/application.rb:309:in `run'
>> /usr/lib/ruby/1.8/puppet/application.rb:416:in `hook'
>> /usr/lib/ruby/1.8/puppet/application.rb:309:in `run'
>> /usr/lib/ruby/1.8/puppet/application.rb:407:in `exit_on_fail'
>> /usr/lib/ruby/1.8/puppet/application.rb:309:in `run'
>> /usr/lib/ruby/1.8/puppet/util/command_line.rb:69:in `execute'
>> /usr/bin/puppet:4
>> err: Forbidden request:(HOSTNAME) access to 
>> /file_metadata/modules/mymodule/myfilet [find] authenticated  at line 73
>> info: access[/]: defaulting to no access for (HOSTNAME)
>> warning: Denying access: Forbidden request: (HOSTNAME) access to 
>> /report/(HOSTNAME) [save] authenticated  at line 73
>> 
>> both client and master are at 2.7.19 version
>> 
>> any help, would be 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/-/9OIFXWze2r4J.
>> 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.
> 
> -- 
> Craig White ~ craig.wh...@ttiltd.com
> 1.800.869.6908 ~~ www.ttiassessments.com 
> 
> Register Now!
> TTI Winners' Conference 2013
> January 20th - 22nd
> The Earlier You Register the More FREE Product You Receive
> Click here for more information!
> 
> 
> -- 
> 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 
"Pu

Re: [Puppet Users] puppetlabs-java ?

2012-09-27 Thread Denmat
Yes, unpack the bin and set up a repo or use exec's to download, unpack and 
install - easier to setup a repo though.

Den

On 28/09/2012, at 0:06, Carsten Øland Madsen  wrote:

> In a node I have (centos):
> 
> class { 'java': distribution => 'jdk' }
> 
> And when I run it I get:
> 
> err: /Stage[main]/Java::Package_redhat/Package[java]/ensure: change from 
> absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y install 
> jdk' returned 1: Error: Nothing to do
> 
> So how to I get the link between the rpm's from doing
> 
> ./jdk-6u25-linux-x64-rpm.bin -x
> 
> to the class { 'java': distribution => 'jdk' }
> 
> Do I need to setup a yum repository and install it with yumrepo and put the 
> java rpms there.
> 
> And if so where can I find more information?
> 
> Thanks
> 
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/puppet-users/-/_qNtJ58um7cJ.
> 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] rspec testing - what am I missing?

2012-09-20 Thread denmat
Hi all,

There is something amiss with what I am doing. I believe the following
should work.

puppetlabs_spec_helper (0.3.0)
rspec (2.11.0)
rspec-core (2.11.1)
rspec-expectations (2.11.2)
rspec-mocks (2.11.1)
rspec-puppet (0.1.4)

.
├── manifests
│   └── init.pp
├── Rakefile
└── spec
├── classes
│   └── testthis_spec.rb
├── defines
├── fixtures
│   ├── manifests
│   │   └── site.pp
│   └── modules
│   └── testthis
│   └── manifests -> ../../../../manifests
├── functions
├── hosts
└── spec_helper.rb


$ cat manifests/init.pp
class testthis {

 notify{'this notify is alive': }
}


$ cat spec/classes/testthis_spec.rb
require 'rspec-puppet'

describe "testthis" do
  let(:node) {'fake'}
  it { should contain_notify('this notify is
alive').with_content(/notify is alive/)}
end

$ rake spec
/usr/bin/ruby1.8 -S rspec spec/classes/testthis_spec.rb
F

Failures:

  1) testthis
 Failure/Error: it { should contain_notify('this notify is
alive').with_content(/notify is alive/)}
 Puppet::Error:
   Could not find class testthis for fake at line 3 on node fake
 # ./spec/classes/testthis_spec.rb:7

Finished in 0.02659 seconds
1 example, 1 failure

Failed examples:

rspec ./spec/classes/testthis_spec.rb:7 # testthis
rake aborted!
ruby -S rspec spec/classes/testthis_spec.rb failed

Tasks: TOP => spec
(See full trace by running task with --trace)

It is weird because I have another test that works(which I wrote!) but
this simple one does not - hence there is something fundamentally
wrong with my understanding of how this works.

Thanks,
Den

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Hadoop format using puppet

2012-09-19 Thread Denmat
Hi,

Tricky one. In the past I have used a touch file to test against (if touched 
file there don't do it - but that is a little insecure). 

After the filesystem is formatted I believe you should be able to list it. 
However when I was using cloudera Hadoop you that could return your local 
filesystem! So your test would always pass.

So maybe a format and touching a file in the hdfs would work?  Sorry don't work 
with Hadoop any more so cant test. 

You can have a look at the following:
https://github.com/denmat/hadoop_in_a_box

That was last approach (can't remember how I did it off hand).

Cheers
Den

On 20/09/2012, at 4:30, Bai Shen  wrote:

> I'm using puppet to automate the creation and maintenance of my hadoop 
> cluster.  However, I'm not sure how to handle this next step.  In order for 
> the cluster to run, the namenode needs to be formatted.
> 
> su hdfs -c "/usr/bin/hadoop namenode -format"
> 
> I'm not sure what the best method to handle this is.  Do I just add an exec 
> command?  How do I make sure that it only gets run during the initial setup?
> 
> 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.



Re: [Puppet Users] Machines not using local mirror

2012-09-19 Thread Denmat
Hi,

Cobbler can put the desired repo in /etc/yum.repo.d - but I have in the past 
explicitly cleared that directory (from the cobbler post install (kickstart 
really)) and managed the repos via puppet only. 

First thing puppet did was install the right repo. It was the cleanest way I 
found.

HTH
Den

On 20/09/2012, at 3:13, Bai Shen  wrote:

> I'm not sure if this is a cobbler or puppet issue, so please forgive the 
> crossposting.
> 
> I configured some repos in cobbler and set the local mirror flag.  However, 
> when I use puppet to install packages, they don't use my local mirror.  This 
> means that installs take forever as I'm on a slow connection.
> 
> What should I check/test in order to fix this?
> 
> 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.



Re: WG: [Puppet Users] AW: Issue with large directory content

2012-09-13 Thread Denmat
Hi,

Not sure if I can help but just have couple of questions.

How long does it take to do a 'find' on the directory or a 'stat'?

Have you tried running the client with --verbose --debug --evaltrace 
--summarize?

Are you trying to set any permissions inside that directory elsewhere in the 
manifest?

I would expect recurse => false not to do anything too, but (and this should 
throw an error) can you set recurselimit? If so, does it make any difference?

HTH
Den

On 14/09/2012, at 1:55, Bernd Adamowicz  wrote:

> Hope, the list doesn't blame me for spamming, but I'd just like to provide 
> some more information on my problem, still hoping someone can help.
> 
> Using the 'iostat' command while Puppet is stuck, I can clearly see that 
> there's a very high I/O on the disk:
> 
> Device: rrqm/s   wrqm/s r/s w/s   rsec/s   wsec/s avgrq-sz 
> avgqu-sz   await  svctm  %util
> sda   0.00 0.000.000.00 0.00 0.00 0.00
>  0.000.00   0.00   0.00
> dm-0  0.00 0.000.000.00 0.00 0.00 0.00
>  0.000.00   0.00   0.00
> dm-1  0.00 0.000.000.00 0.00 0.00 0.00
>  0.000.00   0.00   0.00
> fioa  0.00 0.00  163.005.00 31280.0040.00   186.43
>  0.040.25   0.25   4.20
> dm-2  0.00 0.000.000.00 0.00 0.00 0.00
>  0.000.00   0.00   0.00
> dm-3  0.00 0.000.000.00 0.00 0.00 0.00
>  0.000.00   0.00   0.00
> dm-4  0.00 0.000.000.00 0.00 0.00 0.00
>  0.000.00   0.00   0.00
> dm-5  0.00 0.00  163.005.00 31280.0040.00   186.43
>  0.040.25   0.25   4.20
> dm-6  0.00 0.000.000.00 0.00 0.00 0.00
>  0.000.00   0.00   0.00
> drbd0 0.00 0.00  163.005.00 31280.0040.00   186.43
>  0.960.53   5.72  96.10
> drbd1 0.00 0.000.000.00 0.00 0.00 0.00
>  0.000.00   0.00   0.00
> 
> * The 'drbd0' device is an HP IO Accelerator card
> * The 'rsec/s' column for drbd0 shows the number of sectors read from disk 
> per second. This value is pretty low if Puppet is not running.
> * The '%util' (CPU time during the I/O requests) column for drbd0 shows that 
> the device is almost in saturation
> * This is the mount point for drbd0: '/dev/ drbd0 on /repository' and 
> '/repository/sonatype-work' is the directory hosted by Puppet
> 
> Again, this is the configuration:
> 
> file {
> "/repository/sonatype-work":
>  ensure  => directory,
>  owner   => $nexus_user,
>  group   => $nexus_group,
>  mode=> 0755,
>  recurse => false,
>  backup  => false,
> }
> 
> For me it still seems there's a kind of recursive scanning done by Puppet 
> though 'recurse' is set to false.
> 
> Thanks for helping,
> Bernd
> 
> Von: puppet-users@googlegroups.com [mailto:puppet-users@googlegroups.com] Im 
> Auftrag von Bernd Adamowicz
> Gesendet: Donnerstag, 13. September 2012 14:45
> An: 'puppet-users@googlegroups.com'
> Betreff: AW: [Puppet Users] AW: Issue with large directory content
> 
> This keeps being weird. Simply thought to wait until Puppet finishes, but had 
> to quit after one and a half hour. Also tried 'ensure  => present' instead of 
> 'ensure  => directory' with no success. No log output at all. Still 
> investigating. But any ideas still highly appreciated!
> 
> Bernd
> 
> Von: puppet-users@googlegroups.com [mailto:puppet-users@googlegroups.com] Im 
> Auftrag von Bernd Adamowicz
> Gesendet: Donnerstag, 13. September 2012 10:46
> An: puppet-users@googlegroups.com
> Betreff: Re: [Puppet Users] AW: Issue with large directory content
> 
> Thanks for your answers so far.
> 
> But beware that the huge artifacts are *not* managed by Puppet (see recurse 
> => false). Actually it's a Maven repository filled by Nexus. Only the top 
> directory is managed by Puppet to have it in place and have correct access 
> rights. This worked well until I initially filled the repository with the 
> artifacts manually. That slowed down Puppet. Seems to me as Puppet will do 
> some recursive scanning, but that's just an assumption, since Puppet is 
> running with almost 100% CPU load.
> 
> I turned debug on in Puppet but will not see anything even after a few 
> minutes. Presumably I would see something if I let Puppet run just long 
> enough. However, it's a strange behaviour I've never experienced. And I think 
> my configuration is OK. 
> 
> Bernd
> 
> On 09/13/2012 01:24 AM, Peter Brown wrote:
> On 13 September 2012 00:12, Christopher Wood  
> wrote:
>> I don't have enough information to say. You might want to run the master and 
>> agent in debug mode to get more output, though.
>> 
>> puppet agent --debug --verbose --no-daemonize
>> 
>> Also, 100 GB? Any particula

Re: [Puppet Users] nodes including modules that are not assigned in the site.pp file

2012-09-13 Thread Denmat
Hi,

Is tomcat6 included elsewhere in your manifest?

Can you grep for 'include tomcat6' and check?

Cheers,
Den

On 14/09/2012, at 4:17, PaulS  wrote:

> This is my /etc/puppet/manifests/site.pp
> Can anyone see why nodes 
> 5051,5052,5010,5110,5116,5102,5117,5118,5121,6012,and 5052
> would grab/include the very last nodes module? node server616 module tomcat6
> 
> File { ignore => '.svn' }
> 
> node 'server6010' {
> include centos6
> }
> 
> node 'server6011' {
> include centos6
> include tomcat
> }
> 
> node 'server6012' {
> include centos6
> include tomcat
> }
> 
> node 'server6013' {
> include centos6
> include tomcat
> }
> 
> node 'server6014' {
> include centos6
> include tomcat
> }
> 
> node 'server6015' {
> include centos6
> include postgres
> }
> 
> node 'server5010' {
> include centos5
> }
> 
> node 'server5039' {
> include centos5
> include apache
> }
> 
> node 'server5051' {
> include centos5
> }
> 
> node 'server5071' {
> include ldap
> }
> 
> node 'server5052' {
> include centos5
> }
> 
> node 'server5092' {
> include centos5
> include mongodb
> }
> 
> node 'igsxgjdtweb01' {
> include centos5
> include apache-dev
> }
> 
> node 'server5110' {
> include centos5
> }
> 
> node 'server5116' {
> include centos5
> }
> 
> node 'server5117' {
> include centos5
> include clamav
> include shakecast
> }
> 
> node 'server5118' {
> include centos5
> }
> 
> node 'server5121' {
> include centos5
> include postgres
> include mysql
> }
> 
> node 'serverisvmlks1' {
> include centos5
> }
> 
> node 'server616' {
> include tomcat6
> }
> 
> -- 
> 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/-/r4V6d780q-UJ.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/puppet-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: [Job Listing]: Infrastructure Systems Engineer - San Franscisco

2012-09-06 Thread denmat


On Friday, September 7, 2012 11:02:54 AM UTC+10, denmat wrote:
>
> Hi people, here is a job that we have open in the US. 
>
> *First I want to stress:*
>
> *You must be a US Citizens to be eligible to apply.*
> The official description is below, but here is my take on it.
>
> We run Linux where possible, but we have some Windows servers where 
> needed. We use Puppet and Capistrano - but we have some way to go to make 
> this seamless. We are heading towards CI/Agile/Blahblah for infrastructure 
> so that will be high on your agenda.
>
> We run the following tech stack:
>
>
>- Tomcat/Java app
>- MSSQL DB backend - but also PostgreSQL to a smaller degree
>- nagios monitoring
>- elastic search nodes
>- activemq messaging queue
>- puppet
>
> We have a strong tech focus and we would welcome a contributor to that 
> rather than a button pusher. The main Operations team is in Melbourne so 
> you will be working in a smaller team in the US (until Australia invades 
> the US and takes all your nice things - like your Liberty!). Like any other 
> SaaS service your main job is to keep it up. We are all trying to make that 
> as painless as possible - if you want to help make that less painless then 
> we would all think you are great and you'd be invited out to the pub for a 
> beer, maybe even meet the misses. 
>
> Back to our regular programming.
>
> *Infrastructure Systems Engineer – San Francisco*
>
> ·Large scale 24/7 global delivery 
>
> ·Broad scope of responsibility
>
> ·Permanent opportunity
>
> *Do you want to work with our engineering team on the next generation of 
> infrastructure?*
>
> Aconex is the world's leading online collaboration software company, with 
> offices in over 40 countries and eight data centres around the globe. Over 
> the past 10 years we have revolutionised how construction and engineering 
> companies manage and share project information.
>
> The Production Operations team is creating and supporting the next 
> generation platform infrastructure for our SaaS business, providing 
> scalable, fault-tolerance services that underpin much of the software.
>
> We're looking for an Infrastructure systems engineer to help us keep our 
> systems in peak operating efficiency. The key responsibilities of the role 
> include: 
>
> ·Using Configuration Management and Automated Deployment tools for 
> new releases
>
> ·Keeping our platform safe, stable and efficient including an on-call 
> component
>
> ·Delivering projects to improve our product and platform
>
> ·Implementing new infrastructure to keep us ahead of the curve
>
> ·Work with both private and public clouds 
>
> ·Work with Multiple Global Datacentres
>
> ·On-going performance monitoring, analytics, reporting and capacity 
> planning
>
> If you are experienced in system administration in the SaaS industry, and 
> passionate about DevOps with a keen interest in ITIL methods and fast 
> changing production environments then this is the right opportunity for 
> you. You communicate well with your team, internal customers and external 
> stakeholders, and complex problem solving and troubleshooting is a natural 
> strength. 
>
> You'll need experience in a 24x7 mission critical Web-based environment 
> and no doubt you'll be a specialist in Linux; as well as configuration 
> management and deployment tools such as Puppet, MCollective and Capistrano. 
> You love making improvements to processes to make everyone's life better, 
> and love to hunt down and fix performance and stability issues before our 
> customers notice.
>
> The Aconex culture is what attracts and retains our great staff! We have a 
> vibrant, flexible, team oriented culture, and talented people that share a 
> passion for building great products. Aconex offers opportunities for 
> professional development, as well as a social atmosphere.
>
Forgot the contact details --- don't call me stoopid!
Contact Narelle on email nb...@aconex.com -- she is not me by the way. 

-- 
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/-/dTQyvDhQNUIJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] [Job Listing]: Infrastructure Systems Engineer - San Franscisco

2012-09-06 Thread denmat


Hi people, here is a job that we have open in the US. 

*First I want to stress:*

*You must be a US Citizens to be eligible to apply.*
The official description is below, but here is my take on it.

We run Linux where possible, but we have some Windows servers where needed. 
We use Puppet and Capistrano - but we have some way to go to make this 
seamless. We are heading towards CI/Agile/Blahblah for infrastructure so 
that will be high on your agenda.

We run the following tech stack:


   - Tomcat/Java app
   - MSSQL DB backend - but also PostgreSQL to a smaller degree
   - nagios monitoring
   - elastic search nodes
   - activemq messaging queue
   - puppet

We have a strong tech focus and we would welcome a contributor to that 
rather than a button pusher. The main Operations team is in Melbourne so 
you will be working in a smaller team in the US (until Australia invades 
the US and takes all your nice things - like your Liberty!). Like any other 
SaaS service your main job is to keep it up. We are all trying to make that 
as painless as possible - if you want to help make that less painless then 
we would all think you are great and you'd be invited out to the pub for a 
beer, maybe even meet the misses. 

Back to our regular programming.

*Infrastructure Systems Engineer – San Francisco*

·Large scale 24/7 global delivery 

·Broad scope of responsibility

·Permanent opportunity

*Do you want to work with our engineering team on the next generation of 
infrastructure?*

Aconex is the world's leading online collaboration software company, with 
offices in over 40 countries and eight data centres around the globe. Over 
the past 10 years we have revolutionised how construction and engineering 
companies manage and share project information.

The Production Operations team is creating and supporting the next 
generation platform infrastructure for our SaaS business, providing 
scalable, fault-tolerance services that underpin much of the software.

We're looking for an Infrastructure systems engineer to help us keep our 
systems in peak operating efficiency. The key responsibilities of the role 
include: 

·Using Configuration Management and Automated Deployment tools for new 
releases

·Keeping our platform safe, stable and efficient including an on-call 
component

·Delivering projects to improve our product and platform

·Implementing new infrastructure to keep us ahead of the curve

·Work with both private and public clouds 

·Work with Multiple Global Datacentres

·On-going performance monitoring, analytics, reporting and capacity 
planning

If you are experienced in system administration in the SaaS industry, and 
passionate about DevOps with a keen interest in ITIL methods and fast 
changing production environments then this is the right opportunity for 
you. You communicate well with your team, internal customers and external 
stakeholders, and complex problem solving and troubleshooting is a natural 
strength. 

You'll need experience in a 24x7 mission critical Web-based environment and 
no doubt you'll be a specialist in Linux; as well as configuration 
management and deployment tools such as Puppet, MCollective and Capistrano. 
You love making improvements to processes to make everyone's life better, 
and love to hunt down and fix performance and stability issues before our 
customers notice.

The Aconex culture is what attracts and retains our great staff! We have a 
vibrant, flexible, team oriented culture, and talented people that share a 
passion for building great products. Aconex offers opportunities for 
professional development, as well as a social atmosphere.

-- 
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/-/gwFYRxNQFVsJ.
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] Install rubygem package in order to use with library

2012-08-23 Thread Denmat
Hi, 

Righto, not sure that load path is correct, if it is can you successfully load 
the rubix gem using ruby's irb?

Den
On 22/08/2012, at 23:58, "Sergey V. Arlashin"  wrote:

>> Where is rubix declared?
> 
> 
> modules/zabbix/lib/puppet/type/zabbix_host.rb:
> 
> $LOAD_PATH.unshift File.join(File.dirname(__FILE__), 'rubix/lib')
> require 'rubix'
> 
> require 'facter'
> 
> Puppet::Type.newtype(:zabbix_host) do
>   @doc = "Manages zabbix hosts"
> 
>   self.debug "// Blah"
> 
>   ensurable
> 
>   newparam(:name) do
> desc ""
> 
> isnamevar
>   end
> 
>   newparam(:api_host) do
> desc "Zabbix server API"
> 
> validate do |value|
>   raise ArgumentError, "Void api_host parameter" if value.empty?
> end
> 
>   end
> ...
> ...
> 
>> What's on line  83 of your init.pp? 
> 
>   zabbix_host { "${::fqdn}":
> ensure   => present,
> template => $zabbix_template,
> group=> 'Linux servers',
> api_host => $api_host,
> require  => Package['librubix-puppet-ruby1.8']
>   }
> 
> 
> 
> 
> On Aug 22, 2012, at 1:07 AM, Denmat wrote:
> 
>> Hi 
>> 
>> See inline:
>> 
>> On 21/08/2012, at 23:14, "Sergey V. Arlashin"  wrote:
>> 
>>> Hello!
>>> I have a custom function which requires a ruby gem which I have in my 
>>> deb-repository.
>>> If the package is installed beforehand manually the function works well. 
>>> But if I want to install the package with puppet I get the following error:
>>> 
>>>  out: Could not autoload zabbix_host: no such file to load -- rubix at 
>>> /etc/puppet/modules/zabbix/manifests/init.pp:83 on node
>>> 
>> Where is rubix declared? What's on line  83 of your init.pp? 
>> 
>>> the code looks like
>>> 
>>>   package { 'librubix-puppet-ruby1.8':
>>> ensure=> installed
>>>   }
>>>   zabbix_host { "${::fqdn}":
>>> ensure   => present,
>>> require  => Package['librubix-puppet-ruby1.8']
>>>   }
>>> 
>>> So it seems Puppet tries to execute  zabbix_host before having the package 
>>> librubix-puppet-ruby1.8 installed. 
>>> Is it possible to get the package librubix-puppet-ruby1.8 installed before 
>>> executing zabbix_host ?
>>> 
>>> 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/-/8b6QBCyfQuUJ.
>>> To post to this group, send email to puppet-users@googlegroups.com.
>>> To unsubscribe from this group, send email to 
>>> puppet-users+unsubscr...@googlegroups.com.
>>> For more options, visit this group at 
>>> http://groups.google.com/group/puppet-users?hl=en.
>> 
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Puppet Users" group.
>> To post to this group, send email to puppet-users@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> puppet-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/puppet-users?hl=en.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/puppet-users?hl=en.

-- 
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] Install rubygem package in order to use with library

2012-08-21 Thread Denmat
Hi 

See inline:

On 21/08/2012, at 23:14, "Sergey V. Arlashin"  wrote:

> Hello!
> I have a custom function which requires a ruby gem which I have in my 
> deb-repository.
> If the package is installed beforehand manually the function works well. But 
> if I want to install the package with puppet I get the following error:
> 
>  out: Could not autoload zabbix_host: no such file to load -- rubix at 
> /etc/puppet/modules/zabbix/manifests/init.pp:83 on node
> 
Where is rubix declared? What's on line  83 of your init.pp? 

> the code looks like
> 
>   package { 'librubix-puppet-ruby1.8':
> ensure=> installed
>   }
>   zabbix_host { "${::fqdn}":
> ensure   => present,
> require  => Package['librubix-puppet-ruby1.8']
>   }
> 
> So it seems Puppet tries to execute zabbix_host before having the package 
> librubix-puppet-ruby1.8 installed. 
> Is it possible to get the package librubix-puppet-ruby1.8 installed before 
> executing zabbix_host ?
> 
> 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/-/8b6QBCyfQuUJ.
> 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.



  1   2   3   4   >