[Puppet Users] Re: Can't parse for environment production

2013-09-19 Thread llowder
Comments inline.

On Thursday, September 19, 2013 10:19:45 AM UTC-5, TimV wrote:
>
> Hi -
>
> We’ve got a small test puppet setup that I am trying to get working.  2 
> hosts, a puppetmaster server and a client machine, both running version 
> 2.6.18.  The host has been added, and it’s certificate signed by the 
> puppetmaster server. 
>

That is a VERY old version, and has been EOL'd. I would recommend upgrading 
using the puppetlabs repos if at all possible.

 

> Using some of the examples from the Pro Puppet book (Turnball), I setup a 
> site.pp and nodes.pp under /etc/puppet/manifests 
>
> Then, under /etc/puppet/modules, I have some reciepes for ssh, motd, sudo, 
> ntp etc. 
>
> I should state that a number of months ago, this was working (at least on 
> the one test host machine I had). 
>
> I’ve come back to revisit this project and continue learning, but am now 
> getting error messages.  I can still add hosts, and get their certs signed, 
> but if, I run “puppet agent --test --noop” 
>
> I get the following error message:
>
> err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
> Could not parse for environment production: Permission denied - 
> /etc/puppet/manifests/nodes.pp at /etc/puppet/manifests/site.pp:2 on node 
> blah.blah.blah 
>
Check the permissions on your $modulepath, it looks like the user that 
puppet is running as (typically `puppet` for the Open Source version) 
cannot read the modules.

You can easily check them all at once with:

*for x in $(sudo puppet config print modulepath --mode  | sed -e 
"s/:/ /g"); do ls -lR $x; done

*
 

> warning: Not using cache on failed catalog
>
> err: Could not retrieve catalog; skipping run
>
> site.pp simply ha: 
>
> import 'nodes.pp'
>
> my nodes.pp has: 
> class base { 
>
>   include sudo, ntp, motd, ssh, kerberos
>
> }
>
>  
>
> node ‘host1.example.com’ {
>
>   include base
>
> }
>
>  
>
> node 'host2.example.com' {
>
>   include base
>
> }
>
>  
>
> In terms of permissions, I have the puppet user with RWX on these files, 
> and directories.
>
>  
>
> Any ideas?  Something change after I updated things?  
>
>  
>
> Thanks.
>
>  
>
> Tim
>

-- 
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] Re: is there a way to declare all classes in a namespace?

2013-07-12 Thread llowder


On Friday, July 12, 2013 11:21:09 AM UTC-7, m4l...@gmail.com wrote:
>
> Say I have the following classes:
>
> foo
> foo::bar::one
> foo::bar::two
>
> Is there a way to declare all classes in the foo::bar namespace at once?
>


Not really, but you can have foo::bar look like:

class foo::bar {
  include foo::bar::one
  include foo::bar::two
  ...
  include foo::bar::eleventy
}
 
And then you only need to change a single place, and everywhere that needs 
it can just do "include foo::bar".

There are no automagic ways to do that, and having an automagic way to do 
it seems really dangerous and like a really bad idea to me.


> I would like a way to easily add resources to a namespace in a module by 
> just adding a proper file in modules/foo/bar/three.pp and then letting some 
> statement in class foo just declare the new foo::bar::three class without 
> my having to edit class foo and statically declare.
>
> Thanks for any info.   
>

-- 
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] puppetlabs-ntp template discussion

2013-07-11 Thread llowder


On Thursday, July 11, 2013 9:16:55 AM UTC-7, RichT wrote:
>
>
> 
>
>
> On 10 July 2013 23:33, Jason Slagle >wrote:
>
>> If you use hiera and puppet 3, specifying servers is as easy as putting 
>> ntp::servers in hiera.
>>
>> Jason
>
>
> 
> I have been reading through the module but not tested it, how does this 
> work then I dont see any call to Hiera?
>
>  
Puppet 3 introduced databindings.

All class params will do a behind the scenes hiera() call.

For more info:

https://ask.puppetlabs.com/question/117/how-can-i-use-data-bindings-in-puppet-3/

http://docs.puppetlabs.com/puppet/3/reference/whats_new.html#automatic-data-bindings-for-class-parameters


--
> Ritchie
> <--Time flies like an arrow; fruit flies like a banana.  -->
> 
>  
>
>>
>>
>> On 07/10/2013 04:52 PM, Dan White wrote:
>>
>>> OK.  Here are some wish-list items:
>>>
>>> Using ntp by cron rather than as a daemon
>>> An easy way to specify your own, internal time servers without tearing
>>> up the class.
>>> In the Red Hat template (since that's what I work on) : There is no
>>> resource to ensure the driftfile exists or has the proper permissions on
>>> it or on its directory.
>>> And a comment: Is all the commentary necessary in the template ?
>>>
>>> As I get time, I will be happy to make some contributions to the module
>>> on my first two points -- I can do Red Had / CentOS / Fedora, but
>>> someone else will need to assist on the other distros.
>>>
>>> “Sometimes I think the surest sign that intelligent life exists
>>> elsewhere in the universe is that none of it has tried to contact us.”
>>> Bill Waterson (Calvin & Hobbes)
>>>
>>> --**--**
>>> 
>>> *From: *"Ashley Penney" >
>>> *To: *puppet...@googlegroups.com 
>>> *Sent: *Wednesday, July 10, 2013 1:57:32 PM
>>> *Subject: *[Puppet Users] puppetlabs-ntp template discussion
>>>
>>>
>>> If you've ever refused to use the ntp module as it lacks something you
>>> need, now is the time to shout 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...@**googlegroups.com .
>>> To post to this group, send email to puppet...@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...@**googlegroups.com .
>> To post to this group, send email to puppet...@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] Re: hiera data bindings and template()

2013-06-11 Thread llowder


On Tuesday, June 11, 2013 10:28:51 AM UTC-5, Fabio Sangiovanni wrote:
>
> Hi,
>
> I'm using Puppet 3.2.1 and heavily relying on hiera data bindings.
> I have the following situation:
>
> class software (
>   $my_content = undef,
> ) {
>   file { '/path/to/file':
> content => $software::my_content,
>   }
> }
>
> in hieradata/software.yaml (hiera.yaml seems ok):
> software::my_content: template('mymodule/myfile.erb')
>
> With this configuration I get /path/to/file to contain the string 
> 'template(mymodule/myfile.erb)' (that is, template() function isn't 
> evaluated).
> Is this a normal behaviour?
>
>
Yes, anything that comes in from hiera is just a string - function calls in 
it won't get evaluated. 
If you remove the template() part from the hiera data and change your code 
to:

class ($my_content = undef, { 'software': my_content => 
template($my_content) }
 
it should give you the ability to have the data in hiera and still use the 
template function.

> Of course if I declare my class with:
> class { 'software': my_content => template('mymodule/myfile.erb') }
> everything works fine.
>
> If I use the 'source' attribute instead of 'content', I can write in hiera:
> software::my_source: puppet:///modules/mymodule/myfile.conf
> and it works as expected.
>
> Must I intend that this is something related just to functions in hiera?
>
> Thanks,
> Fabio
>

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




[Puppet Users] Re: Best way to add APC and change size of apc.shm_size

2013-06-10 Thread llowder


On Monday, June 10, 2013 12:43:12 PM UTC-5, Josh sutton wrote:
>
> Hello!! 
> I am a new user to puppet and I need to use puppet to install apc and 
> change the size of  apc.shm_size to 64.
>
> I have found a module here: https://github.com/ridonkulous/puppet-apc
> However, when I add the module in, it does not work. I get errors on the 
> puppet code. 
>
>
Can you show your code and the actual error?

 

> Is there a way to just install the apc package normally and just use 
> puppet code to change apc.shm_size?
>
>

Several, such as using a package resource and then using one of: file, 
file_line or augeas to edit the config file and change the value(s).
 

> Thanks in advance for your help
>
>
>
>
> Josh
>

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




[Puppet Users] Re: exec in a source file?

2013-05-30 Thread llowder
I am not positive exactly what you are trying to accomplish, but I believe 
you can do this in a couple of ways.

First, if puppet manages snmpd.conf and /etc/fstab simply set "refreshonly 
=> true" on the exec and set those two file resources to notify the exec.

If puppet does not manage those files, or only partially managed them, it 
will be more complicated but it is still doable.

In this case, you would need to make use of 'unless' or 'onlyif' to 
determine if the command needs to be ran.

See http://docs.puppetlabs.com/references/3.2.latest/type.html#exec for 
more details.

If the command to use as a test is complicated, I would suggest writing a 
shell script and pushing the file out with a file resource and then 
executing the script in the unless or only if.

On Thursday, May 30, 2013 12:32:05 PM UTC-5, Stan wrote:
>
> Hello
>
> Here is my manifest for snmpd, my problem now is that my manifest will run 
> every time because my snmpd.conf file changes after the "exec"!! I want 
> that my manifest run when the snmpd.conf (only snmpd.conf source and not 
> with exec) file change or when my /etc/fstab file on the client changeand 
> it restart the snmpd service.
>
>
> I do not know if I'm very clear, but it is not easy to explain it in 
> English.
>
> Did you have an idea?
>
> class snmpd::redhat {
> package { "net-snmp":
> ensure => present,
> }
>
> file { "/etc/snmp/snmpd.conf":
> ensure => present,
> owner  => 'root',
> group  => 'root',
> mode => 644,
> source => "puppet:///modules/snmpd/snmpd.conf",
> require=> Package["net-snmp"],
> notify  => Exec["disk-snmp"]
> #notify  => Service["snmpd"]
> }
>
>
> file { "/etc/fstab":
> ensure => present
> }
>
>
> exec { "disk-snmp":
> command   => "grep -e \"ext[2-4]\" /etc/fstab|awk '{print 
> \"disk\",'$\2'}' >> /etc/snmp/snmpd.conf",
> #   subscribe => File["/etc/snmp/snmpd.conf"],
> subscribe => File["/etc/fstab"],
> path => ["/usr/bin", "/bin", "/usr/sbin"],
> notify  => Service["snmpd"]
> }
>
>
> service { "snmpd":
>  ensure => running,
>  hasstatus  => true,
>  hasrestart => true,
>  enable => true,
>  require=> File['/etc/snmp/snmpd.conf']
> }
> }
>
>
> my source : snmpd.conf :
>
> com2sec nagios  192.168.1.1   communaute
> view tout included .1
> group collecte v1 cacti
> access collecte "" any noauth exact tout none none
> syslocation Unknown (edit /etc/snmp/snmpd.conf)
> syscontact Root  (configure /etc/snmp/snmp.local.conf)
> pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat
>
>
>
> Is it possible in my snmpd.conf source a solution as :
>
> com2sec nagios  192.168.1.1   communaute
> view tout included .1
> group collecte v1 cacti
> access collecte "" any noauth exact tout none none
> syslocation Unknown (edit /etc/snmp/snmpd.conf)
> syscontact Root  (configure /etc/snmp/snmp.local.conf)
> pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat
> *Exec **["disk-snmp"]*
>

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




[Puppet Users] Re: Puppet / hiera call a parametrised class from hieras yaml file?

2013-04-16 Thread llowder


On Tuesday, April 16, 2013 4:19:26 AM UTC-5, Brent wrote:
>
> Good day 
>
> Im using puppet 2.7.18 and hiera 1.1.0. 
>
> I would like to ask. 
>
> For some servers I manage I use the following to pull in 'custom classes'. 
> hiera_include('classes') 
>
> And it all works very well. 
>
> But Im now have a class that I now need to class via hiera, and pass 
> arguments too (the argument, really is where the clients DKIM keys 
> reside). 
>
> Can I have puppet / hiera call a parametrised class from hieras yaml file. 
>
>
In Puppet3, there is databindings, which will do auto-lookups in hiera for 
all class params.

Only way to get this behaviour in 2.7.x is to setup the params to invoke 
hiera, such as:

class myklass(
  $param1 = hiera('myklass::param1', 'somedefault'),
  $param2 = hiera('myklass::param2', 'othervalue'),
...

The "myklass::param1" naming setup for the hiera key value is not strictly 
needed, but it is how it will be expected to be in puppet3 for 
databindings, so I would recommend that you use that naming style now, to 
ease upgrades later.

 

> Thanks 
> Brent Clark 
>

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




[Puppet Users] Re: Managing uniform package baselines (declaring *many* packages) - any tricks?

2013-04-15 Thread llowder


On Monday, April 15, 2013 9:13:27 AM UTC-5, Kodiak Firesmith wrote:
>
> Hello,
> Our group is currently moving from RHEL5 and an in-house baseline 
> management system and yum repositories to RHEL6, Puppet , and RHN Satellite.
>
> With our old homebrew management framework we had a lot of flexibility and 
> ease in declaring which packages should be allowed or disallowed, defined 
> either by-system or by-class/role of system.
>
> A couple examples:
>
> In Joe's server definition file: 
>   install - tomcat, java17-oracle, httpd, tomcat, confluence
>   uninstall - java16-sun
>
> Or 'class development workstation':
>   install - hg, git, subversion, eclipse, vim, ...(tens or hundreds of 
> RPMs)
>   uninstall - rcs, emacs
>
>
>
> Now for puppet it seems you can only declare/manage a package resource in 
> 1 place across all of puppet, so the only semi-viable way to manage package 
> baselines so far is to make a module for each RPM we care about managing, 
> then add those modules to node definitions or to classes, since you can 
> include a module many times and it doesn't mind.
>
>
A resource can only be declared once per catalog.
 

> An example would now be:
>
> manifests/nodes/joe_ws.domain.tld/node.pp:
>   include development_workstation
>
> And in manifests/classes/development_workstation/init.pp
>   include mercurial
>   include git
>   include subversion
>   include eclipse
>   include vim
>
>
> I kind of feel like I'm doing things in a more complicated way than I need 
> to, but I'm not sure how to simplify - so I ask the more experienced puppet 
> peeps out there, how are you managing software baselines?  
>
>
We have a module called "basenode" which handles the things that are common 
across *all* nodes (7zip, ntp, puppet etc).

Some of these are given their own module (puppet, ntp, apt) and others just 
get a package resource (7zip).

For things that are on *most* nodes but not all, I create a hash of hashes 
in my common.yaml, then override as needed in more specific yaml files.

Then I just use a create_resources() call and feed it the hash of hashes - 
but this is only for things that don't require configuration and simply 
need the package to be installed.  If it needs a config file customized, 
then it goes into its own module.

There are other ways to handle this, and some may be better (or just better 
in specific cases) but this works for us.

 

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




[Puppet Users] Re: Duplicate Declaration of resource (editing contents of same file in two diiferent module)

2013-04-11 Thread llowder


On Thursday, April 11, 2013 1:11:16 PM UTC-5, Rahul Khengare wrote:
>
> Hi all,
>  I am writing two modules abc and xyz. In both the modules i have to 
> change common "test.txt" file,here i use template (.erb) file to changing 
> the contents.
> In both abc and xyz the contents of "test.txt" file is different, if i 
> declare file resource for "test.txt" file in two different modules it gives 
> duplicate declaration of resource error. 
> For the correct working of modules abc and xyz, i have to change the 
> test.txt file twice.
> How i overcome this situation ?   
> I  am new to community, so i am not very familiar to format of query 
> posting,sorry about that.
> Thanks in advance for answers.
>

You can't do that.  The only way you can have two modules edit the same 
file is if you use file_line or augeas, and even then, you need to make 
sure they don't step on each other's toes.

You would probably be better off pulling that file either into it's own 
module or into a wrapper class that combined the chagnes both of the others 
need to make.
 

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




[Puppet Users] Re: puppet-lint -- learning stuff about style but also generating questions

2013-04-11 Thread llowder


On Thursday, April 11, 2013 10:22:54 AM UTC-5, Ygor wrote:
>
> Here's one I learned: 
>
> I originally had 
>
> # Ensure /etc/hosts contains the basics 
> host { "${fqdn}": 
> host_aliases => $hostname, 
> ip => $ipaddress, 
> } 
>
> And thru some trial and error, got down to this (which puppet-lint does 
> not gripe about) 
>
> # Ensure /etc/hosts contains the basics 
> host { $fqdn: 
> host_aliases => $hostname, 
> ip => $ipaddress, 
> } 
>
> Now for a question: 
>
> puppet-lint does not like template files at all. 
> I keep getting this: ERROR: Syntax error (try running `puppet parser 
> validate `) 
>
> My first thought is to ignore template files. 
>
>
puppet-lint is designed to lint puppet manifests, not the templates.  The 
templates are a big mix of random text with scattered rubyisms. 
 

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




[Puppet Users] Re: hiera & hiera-gpg

2013-04-10 Thread llowder


On Wednesday, April 10, 2013 3:45:39 AM UTC-5, Stefan Heijmans wrote:
>
> Hello,
>
> We are looking into using hiera with hiera-gpg, installed puppet 3.1.1 & 
> hiera 1.2.0 with rpm's.
> Installing the hiera-gpg gem, it also depends on the hiera gem (used 
> version 1.2.0).
>
> The hiera rpm installs under /usr/lib/ruby/site_ruby/1.8/
> The hiera gem installs under /usr/lib/ruby/gems/1.8/gems/
>
> So what kind of trouble can be excepted using to version of hiera 
> (rpm&gem)?
> Other then updating both with future hiera updates.
>

I haven't had any issues so far using the gem for hiera-gpg and having the 
debians installed for puppet.

 

> Stefan
>

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




[Puppet Users] Re: Show manifest code in rdoc

2013-04-08 Thread llowder


On Monday, April 8, 2013 12:36:33 PM UTC-5, banjer wrote:
>
> Is it possible to have puppet doc show all of the manifest code in the 
> generated docs?  I'm generating some html docs and would love to be able to 
> look at the actual code for each class or define statement.  With syntax 
> highlighting would be even sweeter.
>
> I'm using the following to create my docs:
>
> sudo puppet doc --all --mode rdoc --outputdir 
> /usr/local/foreman/public/puppet/rdoc/development --modulepath 
> /etc/puppet/modules/
>
> FYI:
>
>
I don't think puppet doc / rdoc can, but something like pocco[1] may be 
able to.
 

> Puppet master 3.1.1
> Foreman 1.1.1
> these both run on CentOS 6.4
>
> Thanks for your comments.
>

 [1] https://github.com/nanliu/puppet-pocco

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




[Puppet Users] Re: puppet doc and puppet 3 problems.

2013-03-29 Thread llowder


On Friday, March 29, 2013 9:44:42 AM UTC-5, llowder wrote:
>
> Full details are at 
> https://ask.puppetlabs.com/question/841/puppet-doc-is-giving-no-output-at-all/
>  but the tl;dr version is that when I run puppet doc, I get no output at 
> all, even with --debug and --trace.
>
> Nothing to stdout, stderr or the --outputdir, and I am not sure why or 
> what I am missing.
>
> Ubuntu 12,04, puppet 3.0.2 (also tested with 3.1.1) and ruby 1.8.7
>
> Any help would be much appreciated.
>

Turns out it was a copy and paste error - the command I had copied from to 
try to reproduce the error had converted the '--' to some unicode 
character. 

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




[Puppet Users] puppet doc and puppet 3 problems.

2013-03-29 Thread llowder
Full details are 
at 
https://ask.puppetlabs.com/question/841/puppet-doc-is-giving-no-output-at-all/ 
 but the tl;dr version is that when I run puppet doc, I get no output at 
all, even with --debug and --trace.

Nothing to stdout, stderr or the --outputdir, and I am not sure why or what 
I am missing.

Ubuntu 12,04, puppet 3.0.2 (also tested with 3.1.1) and ruby 1.8.7

Any help would be much appreciated.

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




[Puppet Users] Re: Viewing reports without the dashboard

2013-03-28 Thread llowder


On Thursday, March 28, 2013 2:23:15 PM UTC-5, Schofield wrote:
>
> What I understand is that the puppet dashboard is essentially deprecated.  
> https://groups.google.com/forum/#!msg/puppet-users/j44EbTJY7HI/EQSJgh-g1fgJ  
>
> I'm curious to know if anyone is aware of any effort to replace the report 
> viewing capability of the dashboard that is compatible with reports stored 
> in puppetdb?
>

I believe now that puppetdb can store the reports, work is being done at 
PuppetLabs to provide that.

There is also The Foreman, which while it may not (yet) talk to PuppetDB, 
does have good report viewing options (and much, much more) 

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




[Puppet Users] Re: Nested case

2013-03-22 Thread llowder


On Friday, March 22, 2013 8:23:31 AM UTC-5, Dragos R wrote:
>
> Can I make use of nested cases like this ?
>
> case $operatingsystem: {
>case $kernelmajorversion: {
>   '6.1' : { code }
>   '6.2' : { code }
>   default 
>}
> }
>
>
Have you tried? If you put that into a test.pp. replace "code" with a 
notify, and then run "puppet apply test.pp" you'll be able to find out 
really quickly if it will work or not.

That being said, i haven't tried it, but a quick look 
at 
http://docs.puppetlabs.com/puppet/3/reference/lang_conditional.html#case-statements
 
indicates it probably won't work.

 

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




Re: [Puppet Users] What's your hiera tree look like?

2013-03-21 Thread llowder


On Thursday, March 21, 2013 10:47:11 AM UTC-5, Andy Parker wrote:
>
> On Thu, Mar 21, 2013 at 5:46 AM, llowder  >wrote:
>
>>
>>
>> On Wednesday, March 20, 2013 5:37:14 PM UTC-5, Andy Parker wrote:
>>
>>> On Tue, Mar 19, 2013 at 2:30 PM, Larry Fast  wrote:
>>>
>>>> My Hiera tree is turning into a chaotic mess. I'm guessing that my tree 
>>>> structure is one problem source. So I'm wondering how other real users 
>>>> have 
>>>> setup hiera.  Here are the core problems that are giving me headaches.
>>>
>>>
>>> I'd be interested in seeing some of these as well. I'm looking for real 
>>> world examples of what people are putting in their hierarchies that we 
>>> might be able to make better in a hiera 2, which is something that my team 
>>> is looking at working on.
>>>
>>>
>> ---
>> #This file is managed via puppet.
>> :hierarchy:
>>   - "%{node_id}"
>>   - "%{cluster_type}"
>>   - common
>> :backends:
>>   - yaml
>>   - gpg
>> :yaml:
>>   :datadir: /etc/puppet/hieradata
>> :gpg:
>>   :datadir: /etc/puppet/hieradata/gpg
>>   :key_dir: /etc/puppet/gpgkeys
>>
>>  
>> We have 2 environments, each with their own $modulepath, but with a 
>> shared manifests and hieradata. $::cluster_type identifies the type of 
>> cluster - app, web, batch etc and $::node_id (is poorly named) identifies a 
>> specific cluster (web-a, app-b etc) with both defaulting to hostname for 
>> the non-clustered nodes.
>>  
>> You are using both the yaml and gpg backends. Is the way hiera handles 
> the hierarchy + backends the way you would want it to work or is there a 
> different way of putting those two parts together that would fit what you 
> are trying to do better?
>

It would be nice to be able to have per-backend hierarchies, but as it is, 
I just don't create .gpg files for the levels of hierarchy I don't need, so 
this isn't that big of a deal.

The only thing that would make it better, would be if hiera-gpg came with 
hiera / puppet or didn't require a gem, but that's probably an issue to 
take up with the author.

 

>  
>
 

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




[Puppet Users] Re: How we can create two database Using same credetial using Puppet

2013-03-21 Thread llowder


On Thursday, March 21, 2013 5:37:35 AM UTC-5, Jithin Xavier wrote:
>
> Hello All,
>
> I wanted to create two two MySQL database with same user credential using 
> Puppet-MySQL. How can I achieve this? Please find my script below.
>
> class mysql::vsdatabase {
>  include mysql
>  mysql::db { 'vidispine':
>  user => 'user',
>  password => 'user123',
>  host => 'db..com',
> }
> }
>

Use a define[1] to create the database rather than a class. Classes are 
singletons, so you can only use them once per catalog (node). 

By using a define, you can pull the data from a wrapper class param or 
hiera, and then just call the define twice with different namevar but the 
same user & pass.


> How can I add another database here with same credential.(If I create 
> different Class with different database and same credential I am getting 
> below error.
> root@demo:/mnt# puppet agent -t
> info: Retrieving plugin
> info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/concat_basedir.rb
> info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/puppet_vardir.rb
> info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/root_home.rb
> info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/iptables.rb
> info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/pe_version.rb
> info: Loading facts in 
> /var/opt/lib/pe-puppet/lib/facter/custom_auth_conf.rb
> info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/facter_dot_d.rb
> err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
> Duplicate declaration: Database_user[gxu...@db.demo.com ] is 
> already declared in file 
> /etc/puppetlabs/puppet/modules/mysql/manifests/db.pp at line 62; cannot 
> redeclare at /etc/puppetlabs/puppet/modules/mysql/manifests/db.pp:62 on 
> node demo
> warning: Not using cache on failed catalog
> err: Could not retrieve catalog; skipping run
> )
>
> Thanks,
> Jithin Xavier
>


[1]  http://docs.puppetlabs.com/puppet/3/reference/lang_defined_types.html

-- 
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] What's your hiera tree look like?

2013-03-21 Thread llowder


On Wednesday, March 20, 2013 5:37:14 PM UTC-5, Andy Parker wrote:
>
> On Tue, Mar 19, 2013 at 2:30 PM, Larry Fast 
> > wrote:
>
>> My Hiera tree is turning into a chaotic mess. I'm guessing that my tree 
>> structure is one problem source. So I'm wondering how other real users have 
>> setup hiera.  Here are the core problems that are giving me headaches.
>
>
> I'd be interested in seeing some of these as well. I'm looking for real 
> world examples of what people are putting in their hierarchies that we 
> might be able to make better in a hiera 2, which is something that my team 
> is looking at working on.
>
>
---
#This file is managed via puppet.
:hierarchy:
  - "%{node_id}"
  - "%{cluster_type}"
  - common
:backends:
  - yaml
  - gpg
:yaml:
  :datadir: /etc/puppet/hieradata
:gpg:
  :datadir: /etc/puppet/hieradata/gpg
  :key_dir: /etc/puppet/gpgkeys

 
We have 2 environments, each with their own $modulepath, but with a shared 
manifests and hieradata. $::cluster_type identifies the type of cluster - 
app, web, batch etc and $::node_id (is poorly named) identifies a specific 
cluster (web-a, app-b etc) with both defaulting to hostname for the 
non-clustered nodes.

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




[Puppet Users] Re: Generating a config file from multiple classes

2013-03-19 Thread llowder


On Tuesday, March 19, 2013 8:21:24 AM UTC-5, Moritz Tanzer wrote:
>
> Hello,
>
> is it possible to modify the same file with two different inherited 
> classes?
>
> I have to define some kernel modules which must be loaded automatically at 
> system startup. Probably the easiest way would be writing the module's name 
> in /etc/modules.conf. But how do I manage several host with different 
> requirements? For example there's a basic manifest for the clustered server 
> which makes sure among other things that the drbd kernel module get's 
> loaded but on some of these server another kernel module also needs to be 
> loaded. 
>
>
You have a couple different options. Use file_line()[1], concat[2] 
or augeas[3]. Each has advantages and disadvantages, but each will let you 
do what yo are trying to do.
 

> Thanks.
>
> Moritz
>


[1] https://github.com/puppetlabs/puppetlabs-stdlib
[2] https://github.com/ripienaar/puppet-concat
[3] http://docs.puppetlabs.com/references/stable/type.html#augeas

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




[Puppet Users] Re: custom fact works in testing but fails during puppet run

2013-03-18 Thread llowder


On Monday, March 18, 2013 10:26:05 AM UTC-5, mark.a...@thebbgroup.org wrote:
>
> Hi
>
> I have the following custom fact:
>
> require 'facter'
> Facter.add("chat_remote_port", :timeout => 5) do
>   setcode do
> Facter::Util::Resolution.exec('/usr/bin/ssh -o 
> StrictHostKeyChecking=no -i /vagrant/fabfile/deployment/keys/id_rsa 
> us...@example.com  \'for port in 12321 12322 12323 12324 
> 12325 12326; do netsta\
> t -an | grep $port > /dev/null ; if [ $? -eq 1 ]; then echo $port; fi; 
> done\'')
>   end
> end
>
> It works fine when invoked via the 'facter' command but seems to cause a 
> hang when run during 'puppet apply'. Adding 'timeout' does not cause Facter 
> to move on.
>
> Why would this fail during 'puppet apply' but work ok with 'facter'?
>
>
Are you running facter and puppet as the same user? 
 

> Thanks
> Mark
>
>

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




[Puppet Users] Re: Installing a tarball using Puppet

2013-03-15 Thread llowder


On Thursday, March 14, 2013 5:28:49 PM UTC-5, joe wrote:
>
> What llowder said. But he meant fpm, not fom:
>
> https://github.com/jordansissel/fpm
>
>
Indeed, sorry about that. Too much blood in the caffeine stream as I typed.
 

> On Thursday, March 14, 2013 3:40:20 PM UTC-6, llowder wrote:
>>
>>
>>
>> On Thursday, March 14, 2013 1:20:39 PM UTC-5, ridha gadhgadhi wrote:
>>>
>>> Hi all,
>>>
>>> I want to install opensaf from a tar file. Below, the content of my 
>>> script shell:
>>>
>>>
>>> ---
>>> tar -xvf opensaf
>>> cd opensaf 
>>> ./configure --disable-tipc
>>> make
>>> make install
>>>
>>> 
>>>
>>> Any help will be much appreciated !
>>>
>>>
>> You have 2 options. You can put what you did above in a shell script, and 
>> thenuse a file to push the tarball and the shell script, then exec to run 
>> the script.
>>
>> The BETTER option is to use fom or whatever and build a package (rpm, 
>> deb, whatever) and then install that using a package resource from a local 
>> repo.
>>  
>>
>>> Regards,
>>>
>>> --Ridha
>>>
>>

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




[Puppet Users] Re: PuppetDB Constraint error

2013-03-14 Thread llowder


On Thursday, March 14, 2013 4:51:25 PM UTC-5, Ken Barber wrote:
>
> Hey all, 
>
> I'm hoping I can get some information from other users on the list in 
> relationship ak0ska's problem listed below. I thought I would start a 
> new thread so more users would see this message and not loose it in 
> the original thread which is already pretty long: 
>
>
> https://groups.google.com/forum/?fromgroups=#!topic/puppet-users/yRMI1J_y6Ps 
>
> Basically I want to see if anyone is seeing the same constraint errors 
> at all in your postgresql log: 
>
> [2013-03-12 05:51:19 CET]DETAIL:  Key 
> (catalog)=(c93825c7157cba8c10641b54d9dce17eb0ce618b) is not present in 
> table "catalogs". 
> [2013-03-12 05:51:19 CET]STATEMENT:  INSERT INTO certname_catalogs 
> (certname,catalog,timestamp) VALUES ($1,$2,$3) RETURNING * 
>
> It seems to me this problem is enacted under heavy load or an 
> attenuated scenario like 'load', but I'm having trouble trying to 
> reproduce. I'm curious basically if this is happening the wild to 
> anyone else other than ak0ska. 
>
> This is specifically happening during database garbage collection. 
>
> If anyone sees this, or does not see it - I'd like to know, I'm just 
> interested to see how prolific or non-prolific this problem is so I 
> can get an understanding of impact. I guess I'd be also interested in 
> rough understand what load your PuppetDB is under either way - # of 
> nodes and frequency of 'replace catalog' actions - if this is 
> something you can release publicly that is :-). If someone is seeing 
> it I may have follow up questions, but for now I'm really interested 
> in seeing if this is an isolated scenario (therefore potentially 
> 'environmental') or if its prolific and therefore something we need to 
> be more worried about. 
>
> Thanks in advance all :-). 
>
>
Not seeing the problem here, still on 1.0.1 (but hoping to upgrade monday)

48 nodes, default 30 min run interval

command processing sec/command: 0.129
command processing command/sec 0.0147
enqueing: 0.0371
collection queries: 0.0106


 

> ken. 
>

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




[Puppet Users] Re: Installing a tarball using Puppet

2013-03-14 Thread llowder


On Thursday, March 14, 2013 1:20:39 PM UTC-5, ridha gadhgadhi wrote:
>
> Hi all,
>
> I want to install opensaf from a tar file. Below, the content of my script 
> shell:
>
> ---
> tar -xvf opensaf
> cd opensaf 
> ./configure --disable-tipc
> make
> make install
>
> 
>
> Any help will be much appreciated !
>
>
You have 2 options. You can put what you did above in a shell script, and 
thenuse a file to push the tarball and the shell script, then exec to run 
the script.

The BETTER option is to use fom or whatever and build a package (rpm, deb, 
whatever) and then install that using a package resource from a local repo.
 

> Regards,
>
> --Ridha
>

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




[Puppet Users] Re: Error: stack level too deep

2013-03-11 Thread llowder


On Monday, March 11, 2013 4:25:12 PM UTC-5, Luca Gioppo wrote:
>
> I'm running a previously working set of modules with the  Puppet master 
> version 3.1.0-rc2.
>
> I'm getting the Error: stack level too deep
>
> Here is a chunk of the debug
>
> Debug: Scope(Class[Zabbix]): Retrieving template zabbix/zabbix.conf.php.erb
> Debug: 
> template[/etc/puppet/environments/production/modules/zabbix/templates/zabbix.conf.php.erb]:
>  
> Bound template variables for 
> /etc/puppet/environments/production/modules/zabbix/templates/zabbix.conf.php.erb
>  
> in 0.00 seconds
> Debug: 
> template[/etc/puppet/environments/production/modules/zabbix/templates/zabbix.conf.php.erb]:
>  
> Interpolated template 
> /etc/puppet/environments/production/modules/zabbix/templates/zabbix.conf.php.erb
>  
> in 0.00 seconds
> Debug: File[server_config]: Adding default for backup
> Debug: File[/etc/zabbix/zabbix_agentd.conf]: Adding default for backup
> Debug: File[/etc/zabbix/zabbix_agent.conf]: Adding default for backup
> Debug: File[/etc/profile.d/java.sh]: Adding default for backup
> Debug: File[/etc/zabbix/zabbix_server.conf]: Adding default for backup
> Debug: File[/tmp/data.sql]: Adding default for backup
> Debug: File[/tmp/images.sql]: Adding default for backup
> Debug: File[/tmp/schema.sql]: Adding default for backup
> Debug: File[/etc/zabbix/web/zabbix.conf.php]: Adding default for backup
> Notice: Compiled catalog for zabbix.dev.turkey.cloudlabcsi.eu in 
> environment production in 1.19 seconds
> Info: Caching catalog for zabbix.dev.turkey.cloudlabcsi.eu
> Debug: Searched for resources in 0.00 seconds
> Debug: Searched for resource params and tags in 0.00 seconds
> Debug: Resource removal in 0.00 seconds
> Debug: Resource merger in 0.00 seconds
> Error: stack level too deep
> Debug: Finishing transaction 69851873828080
> Debug: Received report to process from zabbix.dev.turkey.cloudlabcsi.eu
> Debug: Processing report from zabbix.dev.turkey.cloudlabcsi.eu with 
> processor Puppet::Reports::Store
>
>
Can you show code? The logs by themselves don't help much.
 

> Problem was not present in  3.0.2-0.1rc2
> Any idea of what is changed?
> Thanks
> Luca
>

-- 
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] include statement not being "seen"

2013-03-08 Thread llowder


On Friday, March 8, 2013 12:42:21 PM UTC-6, Stefan Goethals wrote:
>
> I think you might have a conflict problem between the node and class name 
> as they are both the same
>

It's #1372. http://projects.puppetlabs.com/issues/1372

It's a nasty one, and a few ideas are being discussed to fix it, but it'll 
likely be 3.2 or 3.3, and possibly 4.x before it can be addressed.
 

>
> Stefan - Zipkid - Goethals
>
>
> On Fri, Mar 8, 2013 at 6:54 PM, Matt Zagrabelny 
> 
> > wrote:
>
>> Greetings,
>>
>> I am getting a perplexing message on a client:
>>
>> Mar  8 11:49:06 matlab puppet-agent[2028]: Could not run Puppet
>> configuration client: Could not find dependency Class[Matlab] for
>> File[/usr/local/MATLAB/R2012a/etc/license.dat] at
>> /etc/puppet/manifests/debian/matlab.pp:24
>>
>> In my node manifest I have the "include matlab" line:
>>
>> root@neptune:/etc/puppet/modules# cat 
>> /etc/puppet/manifests/debian/matlab.pp
>> node matlab {
>> include base
>> include nfs_systeam_client
>> include libnss_db
>> include set_root_environment
>> include postfix
>>
>> include sun_java6
>> include matlab
>>
>> # This package is needed so that certain executables will work.
>> # Such as: /usr/local/MATLAB/R2012a/etc/glnxa64/lmhostid
>> package { "lsb":   ensure => present, }
>>
>> file { "/usr/tmp":
>> owner  => "daemon",
>> ensure => directory,
>> mode   => 0755,
>> }
>> file { "/usr/local/MATLAB/R2012a/etc/license.dat":
>> source  => 
>> "puppet:///private/usr/local/MATLAB/R2012a/etc/license.dat",
>> require => Class["matlab"],
>> notify  => Service["matlab"],
>> }
>> file { "/etc/fw-skel/start.d/700-allow-matlab-flex-lm":
>> source  =>
>> "puppet:///private/etc/fw-skel/start.d/700-allow-matlab-flex-lm",
>> require => Class["fw_skel::install"],
>> notify  => Service["fw-skel"],
>> }
>>
>> }
>>
>> And my module seems simple enough:
>>
>> root@neptune:/etc/puppet/modules# cat
>> /etc/puppet/modules/matlab/manifests/init.pp
>> # Install the proprietary software outside of puppet.
>> class matlab::install {
>> file { "/etc/init.d/matlab":
>> mode=> 0755,
>> source  => "puppet:///modules/matlab/etc/init.d/matlab",
>> }
>> exec { "install_matlab_service":
>> command => "insserv matlab",
>> unless  => "grep --quiet matlab /etc/init.d/.depend.*",
>> require => File["/etc/init.d/matlab"],
>> }
>> }
>>
>> class matlab::service {
>> service { "matlab":
>> ensure => running,
>> enable => true,
>> hasrestart => true,
>> # This is needed because we are "ensuring that matlab is 
>> 'running'".
>> # I believe that this version of puppet (currently 2.6) greps the 
>> ps
>> # table for the service name, but the actual matlab binary is the
>> # following.
>> # TODO check to see if the following pattern line is needed for 
>> puppet
>> # 2.7.
>> pattern=> "/var/tmp/lm_TMW.ld",
>> require=> Class["matlab::install"],
>> }
>> }
>>
>> class matlab {
>> include matlab::install
>> include matlab::service
>> }
>>
>> Is there something I am missing?
>>
>> I am running:
>>
>> Debian Testing for puppetmaster: 2.7.18-2
>> Debian Stable for puppet: 2.6.2-5+squeeze6
>>
>> Thanks for any help!
>>
>> -mz
>>
>> --
>> 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.
>> 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: Dynamic scoping deprecated - for defines also?

2013-03-08 Thread llowder


On Thursday, March 7, 2013 4:49:38 PM UTC-6, Bruce wrote:
>
>
>
> just do <%= @foo_name %> the vars in the define is local scope, just use 
>> them 
>>
>
> This worked great.  I'm a little shaky on when I can use @variables.  Is 
> there documentation you could point me at?  Thanks again. 
>

Any variable that is a local variable to the manifest calling the template, 
or any fact.  Only docs I know of are 
at http://docs.puppetlabs.com/guides/templating.html#referencing-variables

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




[Puppet Users] Re: Boolean in hiera... problems again

2013-03-07 Thread llowder


On Thursday, March 7, 2013 6:38:52 AM UTC-6, Ahmed Kamal wrote:
>
> I'm on 3.1, and I'm finding that "true" works as expected, but "false" 
> does not! I think "false" is interpreted as "undef" or so, thus taking 
> value from the module's default params
>

False is being treated as the lookup function itself returning false - 
which then means nil is used and the next level of looking for a default 
(either the next level of hierarchy, the next backend or the defaults 
defined with the class.

I think this is supposed to be fixed in hiera 1.2, which just had rc1 
released, but I am not positive.
 

>
> On Tuesday, March 5, 2013 10:08:44 PM UTC+2, Jakov Sosic wrote:
>>
>> Hi... 
>>
>> I've been trying to set up boolean values in Hiera, but with no luck. 
>>
>> For example, I'm using puppetlabs-haproxy module, and this is a code 
>> snippet: 
>>
>> class haproxy ( 
>>   $manage_service   = true, 
>>... 
>> ) inherits haproxy::params { 
>>... 
>>
>>   if $manage_service { 
>>   } 
>> } 
>>
>> Now, this is how I set up values in hiera: 
>>
>> haproxy::manage_service: false 
>>
>>
>> But, it seems that $manage_service is always true... I tried by single 
>> quoting 'false', capital letter False, but nothing helps... 
>>
>> Only thing so far I've found out is to change the manifest code to look 
>> like this: 
>>
>>   if $manage_service == 'true' { 
>>   } 
>>
>>
>> Any ideas? 
>>
>>

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




[Puppet Users] Re: use of parameterized classes

2013-03-05 Thread llowder


On Tuesday, March 5, 2013 1:07:37 PM UTC-6, Corey Osman wrote:
>
> Hi,
>
>
> I have been following this new type of style, using parameterized classes 
> but I have a question.
>
>
>
> Say I have the following:
>
>
> class java-app-profile { class {'java-app': app-name => "my_first_app1", 
> app-dir => '/opt/company/my_first_app1', }
>  class {'java-app': 
> app-name => "my_first_app2", app-dir => '/opt/company/my_first_app1', 
> }
>  class {'java-app': 
> app-name => "my_first_app3", app-dir => '/opt/company/my_first_app1', 
> } 
> }
>
> Can I declare multiple parameterized classes of the same type within a 
> single class? 
>
> No, classes are singletons, they can only be declared once.

In this situation, you should be using a defined type 
- http://docs.puppetlabs.com/puppet/3/reference/lang_defined_types.html

They look like paramaterized classes, but are more like the built in types 
(user, file, package etc)


> Reference: http://docs.puppetlabs.com/guides/parameterized_classes.html
>
>
>
> Thanks,
>
> Corey Osman
> co...@logicminds.biz 
>
> Green IT and Data Center Automation Specialist
>
>
>
>
>
>  
>

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




[Puppet Users] Re: puppet could'nt find hiera even when hiera gem is installed

2013-02-22 Thread llowder


On Friday, February 22, 2013 2:03:30 PM UTC-6, Sai_Emc wrote:
>
> Hiera was properly working in my environment. But puppet was looking at 
> old version even when I have the latest hiera gem installed. So I could'nt 
> use json backend. But puppet is not looking at my latest hiera gem. Not 
> sure when went wrong here.
>  
> Scenario:
> I have installed hiera couple of months back. So the gem was installed 
> under 
>  
> /opt/puppet/lib/gems/1.8/gems/hiera-0.3.0
> /opt/puppet/lib/gems/1.8/gems/hiera-puppet-0.3.0
>  
> Later when I updated to new version of hiera then it installed (via gem 
> install) under 
>  
> /opt/puppet/lib/gems/1.8/gems/hiera-1.1.1
> /opt/puppet/lib/gems/1.8/gems/hiera-puppet-1.0.0
>  
> Puppet was always using the hiera under /opt/puppet/lib/gems/1.8/gems/, so 
> I was unable to use new features of hiera
>  
> I have uninstalled hiera-0.3.0 manually using gem
>  
> sudo gem uninstall --install-dir /opt/puppet/lib/gems/1.8/ hiera
>
> Then Puppet failed to find hiera() function, so its always looking under 
> /opt/puppet/lib/gems/1.8/gems.  Later I installed hiera using gem and 
> explicitly specified to install under /opt/puppet/lib/gems/1.8/gems
>
> Now puppet cannot even find hiera()
>
> err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
> Could not autoload hiera_include: no such file to load -- 
> /opt/puppet/lib/site_ruby/1.8/puppet/parser/functions/hiera_include.rb at 
> /etc/puppetlabs/puppet/environments/development/manifests/site.pp:46 on 
> node 
>
> Looks like some thing wrong with my gem path or my puppet load path is 
> not. Any idea what went wrong here?
>
>
> Using Ubuntu12.04LTS, PE 2.7, Hiera1.2
>  
> Any help greatly appreciated.
>

Try sudo /opt/puppet/bin/gem install hiera

I'm not a PE user, but I think that is the right path. 

> Regards
>
> Sai.
>
> EMC
>

-- 
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] Rspec with rspec-hiera-puppet

2013-02-20 Thread llowder


On Wednesday, February 20, 2013 7:45:41 AM UTC-6, Justin Lambert wrote:
>
> I have been revisiting this again lately and still haven't been able to 
> get any spec tests working with hiera.  Has anyone else had any luck in the 
> last few months?  It is easy to make hiera lookups work if there is a 
> default, but I can't seem to write a spec test that provides data to a 
> hiera lookup without a default or to override a default.
>
>

Before I updated to puppet 3, I patched my copy of puppetlabs_spec_helper 
so that it would create things it needed to let me test with hiera. 
Unfortunately, i have not kept up with my tests and have been unable to 
make sure they still work on puppet3.

It is on my list, and I will give an update once I am able to.
 

> Thanks,
> jl
>
> On Dec 17, 2012, at 10:24 AM, Justin Lambert 
> > 
> wrote:
>
> I've been working on getting spec tests on all of my modules and am down 
> to ones that use hiera and don't have any reasonable defaults.  It looks 
> like there is a project on GH (
> https://github.com/amfranz/rspec-hiera-puppet) that is designed to fill 
> this need, but for the life of me I cannot make it work.  FriedBob helped 
> out on the IRC channel some with his solution of including a patch to 
> puppetlabs_spec_helper that was pulled pending further discussion (
> https://github.com/puppetlabs/puppetlabs_spec_helper/pull/16).
>
> I've attempted to make a working example using both the basic and advanced 
> methods of rspec-hiera-puppet (I can live with either one) but cannot get 
> them to work.  Does anyone have any experience with this they can lend me a 
> hand?  This doesn't seem like it should be this hard - I have to be missing 
> something easy.
>
> https://github.com/jlambert121/rspec-hiera-puppet-basic
> https://github.com/jlambert121/rspec-hiera-puppet-advanced
>
> Thanks,
> jl
>
>
>
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To post to this group, send email to puppet...@googlegroups.com
> .
> To unsubscribe from this group, send email to 
> puppet-users...@googlegroups.com .
> For more options, visit this group at 
> http://groups.google.com/group/puppet-users?hl=en.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To 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.




[Puppet Users] Re: Functions for PuppetDB

2013-02-19 Thread llowder


On Tuesday, February 19, 2013 10:21:54 AM UTC-6, Schofield wrote:
>
> Is this the best option for accessing puppetdb data from modules?
> http://forge.puppetlabs.com/dalen/puppetdbquery
>
> Any other recommendations?
>
>
>
As far as I know, that is currently the best option - though what you are 
trying to access may make something of a difference.
 

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




[Puppet Users] Re: Querying system to generate resources

2013-02-19 Thread llowder


On Tuesday, February 19, 2013 10:00:39 AM UTC-6, Robert Citek wrote:
>
> What commands are there to collect system information and convert it 
> into puppet resources? 
>
> We have a lot of systems that were not initially configured with 
> puppet and we would like to gather information about those systems as 
> puppet resources.   I have been generating resource information using 
> 'pupppet resource ...' and that has been working reasonably well.  For 
> example, 'puppet resource user' generates resources for all users on 
> the system.  If I want just one user, I can specify that user's name, 
> e.g. 'puppet resource user foo'.  Same goes for types group, mount, 
> package, and a few other types. 
>
> But that pattern doesn't work for all resource types or options.  For 
> example, 'puppet resource ssh_authorized_key' doesn't output anything. 
> The 'cron' type asks for a Title.  'interface' errors that it could 
> not find a type 'interface'.  And although 'package' lists all 
> packages using the default package manager, it's not immediately 
> apparent how to generate resources for all gems, e.g. 'puppet resource 
> package provider=gem' does not list gems. 
>
> Is 'puppet resource ...' the "best practice" way to generate resource 
> information or are there other tools more suited?  Or are there 
> options or environment variables that are not immediately apparent? 
>
> Still reading through the docs, but any pointers in the right 
> direction gladly accepted. 
>
>
I've not used it personally, but there is a project (I think) called 
Blueprint might be worth looking into. I seem to recall that it can scan a 
system and generate modules for it.

 

> Regards, 
> - Robert 
>

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




[Puppet Users] Re: Apparent bug in 'import' when directory name matches module name

2013-02-18 Thread llowder


On Monday, February 18, 2013 3:47:40 AM UTC-6, Steve Shipway wrote:
>
>  I've found an apparent bug in the puppet parser.
>
> If you are using 'import' to include the contents of a subdirectory, like 
> this:
>
> import 'foo/*.pp'
>
> and then you create a new module 'foo', suddenly the import statement 
> silently stops working.  This means that any node definitions in the 
> manifests that should have been included are not present, and those nodes 
> fall back to the default node.  The 'foo' module can be completely minimal, 
> just a 'class foo { }' in the init.pp is enough to break the import.
>
> Now, in our case, our default node closes the firewall.  When we 
> productionised a new module called 'oracle', all of the node definitions 
> imported from oracle/*.pp suddenly stopped working, and so all the 
> production oracle servers fell back to the default node definition, and 
> closed their firewalls...  Insert the sound of the brown stuff hitting the 
> fan...
>
> I have successfully duplicated this, and logged it as a bug on the Puppet 
> bug tracker.  A workaround seems to be to add a './' prefix to the imported 
> directory name:
>
> import './foo/*.pp'
>
> which has the same effect, but is not broken by having a 'foo' module 
> present.
>
> I've tried to delve through the parser code to track this one down, but my 
> Ruby skills are not as good as my Perl skills, and I've not managed to 
> identify the reason.  Possibly the parser creates a new class for the 
> imported directory?
>
> I'd be interested in hearing if anyone else has experienced this, or if 
> this clears up odd behaviour you're experiencing on your system.  Also, if 
> you also have the problem, please go to the bug tracker and give this a +1 
> to help it get higher priority on the fix list...
>
> Steve
>
>
I have been working on a similar bug.

The root cause (of #1372 (http://projects.puppetlabs.com/issues/1372) ) 
seems to be that nodes are treated as classes,and both get loaded into top 
scope.

I'll look into this one as well, I'm expecting to be able to spend time on 
it this week.
 

>
>  *Steve Shipway*
> University of Auckland ITS
> *UNIX Systems Design Lead*
> s.sh...@auckland.ac.nz 
> Ph: +64 9 373 7599 ext 86487
> ** 
>   

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




[Puppet Users] Re: Checking GIT updates

2013-02-14 Thread llowder


On Thursday, February 14, 2013 2:49:42 PM UTC-6, John Coggeshall wrote:
>
> Hello all,
>
> I'm using puppet to deploy my codebase from GIT. I have everything 
> working, but i currently don't have any way to check to make sure there is 
> actually something TO deploy before it goes through the entire process of 
> deploying the code. I want to create a conditional that only re-deploys the 
> code if the revision actually changed.
>
> So far, I can have it as part of the deploy process write the contents of 
> 'git rev-parse HEAD' to a file, this way I can do something like this from 
> BASH:
>
> [ `cat git-current-hash` != `git rev-parse HEAD` ]
>
> which will return true only if there is a new revision to pull. The 
> question is, how do I conditional include many different file {} and other 
> things only if that condition is true? If this was just an exec{} I could 
> use onlyif.
>
>
One option would be to have a post-commit hook or something that pushes the 
code, instead of polling to pull the code.
 

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




[Puppet Users] Re: Arrays in node definition

2013-02-14 Thread llowder


On Thursday, February 14, 2013 9:02:01 AM UTC-6, Dan wrote:
>
> Hi,
>
> I'm struggling to get this to work and don't understand where I'm going 
> wrong, can someone please guide me on how to correct?
>
> Basically I want to get an array in my nodes.pp, which is then used by my 
> templates file by cycling through it and writing a line of each element:
>
> nodes.pp:
> node test{
> net::addr { 'routing':
>   routes = [
> {
> address => '172.29.54.70',
> netmask => '255.255.255.0',
> gateway => '172.29.54.65',
> dev => 'eth0',
> },
> {
> address => '192.168.1.3',
> netmask => '255.255.255.0',
> gateway => '192.168.1.1',
> dev => 'eth3',
> },
>   ]
> }
> }
> When I run the puppet client i keep getting the following:
>
> err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
> Could not parse for environment production: Syntax error at '='; expected 
> '}' at /etc/puppet/manifests/nodes/
> test.pp:3 on node test.myincorp.net
>
>
Your data structure is wrong, you have something that is somewhere between 
a hash and and array.  

If "routes" is the name of the param for the net::addr define, then you 
need to use:

routes => 

and not 

routes =

Without seeing the full code (net::addr AND the template in question), it's 
hard to say what the best total fix is, but I suspect moving things into a 
hash of hashes and calling create_resources() may be one of the best 
options.

 

> Can someone please help?
>
> Thanks
> Dan
>

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




[Puppet Users] Re: PuppetDB & KahaDB db.data leak

2013-02-13 Thread llowder


On Wednesday, February 13, 2013 12:00:40 PM UTC-6, Ken Barber wrote:
>
> Hi all, 
>
> I've been looking at a potential problem, as documented here: 
>
> http://projects.puppetlabs.com/issues/19241 
>
> To do with a leak within the KahaDB persistence layer of ActiveMQ. 
> Specifically, there are reports of the db.data file growing unbounded: 
>
> https://issues.apache.org/jira/browse/AMQ-3956 
>
> I'm hoping to find out information from other PuppetDB users to see if 
> this is happening in the wild. What I'm hoping is that users can 
> provide me with information around the size of the files in 
> /var/lib/puppetdb/localhost/KahaDB. For example, here is the size on 
> my test machine: 
>
> root@puppetdb1:/var/lib/puppetdb/mq/localhost/KahaDB# pwd 
> /var/lib/puppetdb/mq/localhost/KahaDB 
> root@puppetdb1:/var/lib/puppetdb/mq/localhost/KahaDB# du -sk * 
> 5552 db-1.log 
> 32 db.data 
> 32 db.redo 
> 0 lock 
> root@puppetdb1:/var/lib/puppetdb/mq/localhost/KahaDB# 
>
> And an indication of how long its been running: 
>
> $ ps auxw | grep java 
> puppetdb 52606  0.3  3.6 1536236 216136 ?  Sl   13:34   0:55 
> /usr/bin/java -XX:OnOutOfMemoryError=kill -9 %p -Xmx1g 
> -XX:+HeapDumpOnOutOfMemoryError 
> -XX:HeapDumpPath=/var/log/puppetdb/puppetdb-oom.hprof -jar 
> /usr/share/puppetdb/puppetdb.jar services -c /etc/puppetdb/conf.d 
>
> And the version of PuppetDB: 
>
> # dpkg -l puppetdb 
> ... 
> ii  puppetdb1.1.1-1puppetlab all  PuppetDB 
> Centralized Storage. 
>
> (rpm -qi puppetdb on Redhat based machines). 
>
> I've so far had 1 suspected case of this (the directory was reported 
> at 17 GB), but no data to back it up - if you use PuppetDB and have 
> the time and inclination, I'd appreciate some outputs from your 
> PuppetDB hosts like the ones shown above (scrubbing private 
> information of course) - even if it looks fine - as it will help us 
> decide on the priority of this bug. 
>
> Thanks in advance! 
>
>
/var/lib/puppetdb/mq/localhost/KahaDB$ du -sk *
7800db-1366.log
32  db.data
32  db.redo
0   lock

$ ps auxw | grep java
puppetdb 10913  1.5  9.1 1639876 370180 ?  Sl   Jan16 622:58 
/usr/bin/java -XX:OnOutOfMemoryError=kill -9 %p -Xmx192m 
-XX:+HeapDumpOnOutOfMemoryError 
-XX:HeapDumpPath=/var/log/puppetdb/puppetdb-oom.hprof -jar 
/usr/share/puppetdb/puppetdb.jar services -c /etc/puppetdb/conf.d


$ dpkg -l puppetdb
ii  puppetdb  1.0.1-1puppetlabs1PuppetDB 
Centralized Storage.

 

> ken. 
>

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




[Puppet Users] Re: How to call one manifset from another

2013-02-13 Thread llowder


On Wednesday, February 13, 2013 3:03:15 AM UTC-6, yarlagadda ramya wrote:
>
> Hi all,
>
> I have 3 different manifests. How can i call one manifest from another 
> manifest?
>
> Please do help me with this.
>

It depends on what is in the manifests...  if you used modules and classes 
and have things on the file system in the layout the autoloader works with, 
it's as easy as just doing:

include myclass 

or

include myclass::otherclass

If you didn't follow the guidelines... can't answer your question without 
seeing code.

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




[Puppet Users] Re: Alternatives to attempting self-modifying puppet code....

2013-02-12 Thread llowder


On Tuesday, February 12, 2013 8:28:18 AM UTC-6, jcbollinger wrote:
>
>
>
> On Monday, February 11, 2013 4:30:16 PM UTC-6, llowder wrote:
>>
>> The title pretty much sums it up.
>>
>> I've got a situation where I need to have puppet enforce a given state 
>> most of the time, then when a certain flag is present it needs to use a 
>> different state - but only until a certain amount of time has passed, at 
>> which point it needs to go back to the normal state of things.
>>
>> I've got some ideas on how I can make this happen, but I am looking for 
>> some more sane alternatives.
>>
>> I have setup a question with details here: 
>> https://ask.puppetlabs.com/question/447/best-way-to-deal-with-temporary-state-changes/
>>
>> But the short version is I don't want to get up at 0200 to stop services 
>> in prod for developers when they need to update database tables, and I 
>> don't want to have to remember to revoke their access (controlled via 
>> puppetized likewise config) the morning after the changes.
>>
>>
>
> How about instead of using a simple flag in your hiera data, you use a 
> timestamp (in some form) of when the permissive access is supposed to 
> expire?  When choosing which config to use, the master then just compares 
> the timestamp to its system date/time.  I'd write the comparison as a 
> custom function, but you could do it in an inline template for proof of 
> concept.
>
>
I did wind up using a custom function (first time writing one, was 
relatively painless), but I think on home time rather than work time I will 
do a self-modifying solution just as a proof of concept, and to serve as an 
example of what NOT to do.

 

>
> 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 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] Getting dangerous with hiera

2013-02-12 Thread llowder


On Tuesday, February 12, 2013 8:09:49 AM UTC-6, jcbollinger wrote:
>
>
>
> On Tuesday, February 12, 2013 7:16:21 AM UTC-6, Drew Blessing wrote:
>>
>>
>> Then you can go about adding any parameters that need defined for those 
>> classes:
>>
>> class1::param1: 'boom'
>> class2::array1:
>>   - 'foo'
>>   - 'bar'
>>   - 'baz'
>> class2::param2: 'thing'
>>
>> That's it.  You're done.  I hope this helps.  Please let me know if you 
>> need more help with this example.  
>>
>>
> +1
>
> With the Puppet's integration of Hiera with parametrized classes and its 
> support for array arguments to the 'include' function, I cannot think of a 
> case where it makes sense to declare classes via create_resources().
>
>
I never said it made sense... just that you could. :D
 

>
> 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 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] Getting dangerous with hiera

2013-02-12 Thread llowder


On Tuesday, February 12, 2013 7:16:21 AM UTC-6, Drew Blessing wrote:
>
> Ellison is right, it really doesn't make much sense to create one resource 
> with create_resources.  In fact, I'm not even sure it will work with 
> classes because I've never tried it.  However, it works great for defined 
> types.  I think I understand what you're trying to do so let me give an 
> example of how you could accomplish it.
>
>
While I have not done it myself, create_resources() can work with classes,  

As far as using create_resources() on a single resource, I do that in a few 
cases because while I only need one right now but I expect to need more 
later, or some nodes need one one and others need more, and the data comes 
from hiera.
 

> I *think* your goal is to be able to define not only parameters in hiera 
> but also classes to be applied to a node.  You need an additional piece in 
> your site.pp file to do this. 
>
> include hiera_array('classes',['hiera','puppet'])
> The array at the end is optional, and represents defaults.  In our case, 
> we included hiera and puppet classes as defaults because there was a 
> chicken and the egg scenario on the puppet master.  That's above and beyond 
> this example, though.  What the above will do is collect all values defined 
> as an array called "classes" from hiera.  It will merge results all the way 
> down the hierarchy so you can define your 'base' classes in your global 
> hiera file and get more specific as you go down and it will all be picked 
> up.  In hiera, define classes like this:
> ---
> classes:
>   - 'class1'
>   - 'class2::foo'
>   - 'class3::bar'
>   - etc
>
> Then you can go about adding any parameters that need defined for those 
> classes:
>
> class1::param1: 'boom'
> class2::array1:
>   - 'foo'
>   - 'bar'
>   - 'baz'
> class2::param2: 'thing'
>
> That's it.  You're done.  I hope this helps.  Please let me know if you 
> need more help with this example.  
>
> On Monday, February 11, 2013 7:58:08 PM UTC-6, Ygor wrote:
>>
>> OK.  Lets try it like this: 
>>
>> .pp 
>> - 
>> class main_class_foo::subclass_one ( 
>> $parameter_one_a, 
>> $parameter_one_b 
>> ) { 
>>  ... 
>> } 
>>
>> class main_class_foo::subclass_two ( 
>> $parameter_two_a, 
>> $parameter_two_b 
>> ) { 
>>  ... 
>> } 
>> - 
>>
>> .yaml 
>> - 
>> main_class_foo: 
>> subclass_one: 
>> parameter_one_a: this 
>> parameter_one_b: that 
>> subclass_two: 
>> parameter_two_a: other 
>> parameter_two_b: whatever 
>> - 
>>
>>
>> .pp 
>> - 
>> $main_class_stuff = hiera_hash ( 'main_class_foo' ) 
>> create resources (main_class_foo, $main_class_stuff ) 
>>
>> Main_class_foo <| |> 
>> - 
>>
>> Or do I need to do it like this: 
>>
>> Same .pp 
>>
>> .yaml 
>> - 
>> main_class_foo::subclass_one: 
>> parameter_one_a: this 
>> parameter_one_b: that 
>> main_class_foo::subclass_two: 
>> parameter_two_a: other 
>> parameter_two_b: whatever 
>> - 
>>
>> .pp 
>> - 
>> $main_class_one_stuff = hiera_hash ( 'main_class_foo::subclass_one’ ) 
>> create resources (main_class_foo::subclass_one, $main_class_one_stuff ) 
>>
>> $main_class_two_stuff = hiera_hash ( 'main_class_foo::subclass_two' ) 
>> create resources (main_class_foo::subclass_two, $main_class_two_stuff ) 
>>
>> Main_class_foo::Subclass_one <| |> 
>> Main_class_foo::Subclass_two <| |> 
>> - 
>>
>> On Feb 11, 2013, at 5:00 PM, Ellison Marks wrote: 
>>
>> > I don't see your spaceship, but that aside, I believe that your create 
>> resources call will try to instantiate two main_class_foo classes, named 
>> subclass_one and subclass_two, with the listed parameters. I don't think 
>> you can use create_resources to instantiate different kinds of classes. 
>> > 
>> > On Monday, February 11, 2013 11:41:33 AM UTC-8, Ygor wrote: 
>> > OK, I have a collection of related classes -- 
>> > 
>> > main_class_foo::subclass_one 
>> > main_class_foo::subclass_two 
>> > ... etc 
>> > 
>> > And each subclass has parameters, 
>> > 
>> > class main_class_foo::subclass_one ( $parameter_one_a, $parameter_one_b 
>> ) { ... } 
>> > class main_class_foo::subclass_two ( $parameter_two_a, $parameter_two_b 
>> ) { ... } 
>> > 
>> > 
>> > so can I make a hiera file like this: 
>> > 
>> > 
>> > main_class_foo: 
>> > subclass_one: 
>> > parameter_one_a: this 
>> > parameter_one_b: that 
>> > subclass_two: 
>> > parameter_two_a: other 
>> > parameter_two_b: whatever 
>> > 
>> > ...and then load it with create_resources and instantiate it with an 
>> empty spaceship operator like this: 
>> > 
>> > $main_class_stuff = hiera_hash ( 'main_class_foo' ) 
>> > create 

[Puppet Users] Alternatives to attempting self-modifying puppet code....

2013-02-11 Thread llowder
The title pretty much sums it up.

I've got a situation where I need to have puppet enforce a given state most 
of the time, then when a certain flag is present it needs to use a 
different state - but only until a certain amount of time has passed, at 
which point it needs to go back to the normal state of things.

I've got some ideas on how I can make this happen, but I am looking for 
some more sane alternatives.

I have setup a question with details 
here: 
https://ask.puppetlabs.com/question/447/best-way-to-deal-with-temporary-state-changes/

But the short version is I don't want to get up at 0200 to stop services in 
prod for developers when they need to update database tables, and I don't 
want to have to remember to revoke their access (controlled via puppetized 
likewise config) the morning after the changes.

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.




Re: [Puppet Users] RFC: Default File Permissions

2013-02-08 Thread llowder


On Friday, February 8, 2013 6:56:55 AM UTC-6, nikolavp wrote:
>
> I have seen this issue for sure many times. I always forget this and 
> when I see it while running with --noop, I change the owner and the 
> group on the file resource. I am +1 on fixing this to have a more 
> deterministic behaviour 
>
>
It seems like a good idea, though to maintain backwards compatibilty, would 
it be better to have the proposed fixed default to false (ie, maintain 
current behavior)?

 

> Best, Nikola 
>
> On Thu, Feb 07, 2013 at 05:48:58PM -0800, Josh Cooper wrote: 
> > Recently, the issue of copying file modes from remote sources was 
> discussed 
> > on the puppet-users mailing list[1], although it equally applies to 
> owner 
> > and group. 
> > 
> > One issue is what permissions to apply to newly created files when none 
> are 
> > specified? Historically, Puppet has always copied the permissions from 
> the 
> > file source to the newly created one. However, this causes problems on 
> > Windows[2] agents due to the way that Puppet emulates POSIX permissions. 
> We 
> > break NTFS access control inheritance to ensure the effective 
> permissions 
> > are not greater than what Puppet has granted. It also causes problems on 
> > *nix agents, when the files' source is remote and uid/gids are not 
> > synchronized. 
> > 
> > A second, but related issue, is that Puppet applies the same 
> > copy-permissions logic to files that already exist. This goes against 
> what 
> > jcbollinger said, "unmanaged resources and resource properties should 
> not 
> > be modified by Puppet"[3], and what Nigel said, "A core principle of 
> Puppet 
> > is that you can choose to only manage the attributes of a resource that 
> you 
> > care about, and can leave the rest unmanaged."[4] However, this "bug" 
> has 
> > been around so long, at least 0.24.8, that we can't change behaviors in 
> a 
> > minor release.[5] 
> > 
> > Patrick and I talked about this and would like to propose adding a file 
> > parameter, something like `use_source_permissions`. If true and 
> permissions 
> > are unspecified, Puppet would continue copying source permissions as it 
> > does today, for both newly created and existing files. This would be the 
> > default. 
> > 
> > If false and permission are unspecified, Puppet would never copy them 
> from 
> > the source. Instead the permission defaults for newly created files 
> would 
> > be based on the user that Puppet is running as. And the permissions for 
> > existing files would be unmodified. 
> > 
> > Doing so would provide a mechanism for resolving both #5240 and #18931. 
> > 
> > Comments and feedback welcome. 
> > 
> > Josh 
> > 
> > [1] 
> > 
> https://groups.google.com/forum/#!msg/puppet-users/CI7pEUHknm4/x-hCGJn6Ms8J 
> > [2] https://projects.puppetlabs.com/issues/18931 
> > [3] 
> https://groups.google.com/d/msg/puppet-users/CI7pEUHknm4/VtCl9YmeIS0J 
> > [4] http://projects.puppetlabs.com/issues/5240#note-16 
> > [5] https://projects.puppetlabs.com/issues/5240 
> > 
>

-- 
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: Need a solution for "puppet node clean" (puppet v3.0.2)

2013-02-06 Thread llowder


On Wednesday, February 6, 2013 6:06:49 AM UTC-6, Ken Barber wrote:
>
> Perhaps you want to use 'puppet node deactivate' for now: 
>
>
> http://docs.puppetlabs.com/puppetdb/1.1/maintain_and_tune.html#deactivate-decommissioned-nodes
>  
>
> This will at least remove it from being collected immediately, but it 
> leaves it in the database. 
>
> So beyond that we are working on an automated clean mechanism in 
> PuppetDB: https://projects.puppetlabs.com/issues/18682#change-82618 
> ... which as you can see is in code review right now. If all goes well 
> this should be in a release coming to your cinemas soon ... :-). 
>
> ken. 
>


I would also take a look 
at 
https://ask.puppetlabs.com/question/88/how-can-i-purge-exported-resources-from-puppetdb/
 
which discusses this same issue and has a couple of alternatives, though 
YMMV, emptor caveat and all that type of thing.
 

>
> On Wed, Feb 6, 2013 at 4:59 AM, David Kerr > 
> wrote: 
> > On Tuesday, February 5, 2013 8:54:47 PM UTC-8, Josh Cooper wrote: 
> >> 
> >> Hi David, 
> >> 
> >> On Tue, Feb 5, 2013 at 7:44 PM, David Kerr  wrote: 
> >> > We upgraded to the new release of Puppet 3.1 and puppet node clean 
> still 
> >> > doesn't work. 
> >> > 
> >> > I've found that the delete query comes back empty, but the node is 
> still 
> >> > in 
> >> > the system. 
> >> > 
> >> > puppet node deactivate still works. 
> >> > 
> >> > -- 
> >> > 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. 
>
> >> > For more options, visit https://groups.google.com/groups/opt_out. 
> >> > 
> >> > 
> >> 
> >> Sounds like you're running into 
> >> http://projects.puppetlabs.com/issues/15051 
> >> 
> >> Josh 
> >> 
> >> -- 
> >> Josh Cooper 
> >> Developer, Puppet Labs 
> > 
> > 
> > 
> > ah, ok, i thought it was supposed to be fixed in 3.1 
> > 
> > 5 months old on the last update, any hope for a solution soon? 
> > 
> > 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...@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. 
> > 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.




[Puppet Users] Re: Need a solution for "puppet node clean" (puppet v3.0.2)

2013-01-31 Thread llowder


On Thursday, January 31, 2013 3:10:12 PM UTC-6, David Kerr wrote:
>
> I am using PuppetDB and I'd love the links, I did some searching and 
> wasn't able to find the conversation.
>
> Thanks for the reply!
>

This may help.

https://ask.puppetlabs.com/question/88/how-can-i-purge-exported-resources-from-puppetdb/
 

>
>
> On Thursday, January 31, 2013 12:55:54 PM UTC-8, Chris Price wrote:
>>
>> David,
>>
>> Are you using PuppetDB?  There was a thread on this list recently about 
>> the same topic, and there was some example SQL that could be used in the 
>> short-term.  We have a few open tickets around coming up with better 
>> solutions for this and we expect to be addressing them Very Soon Now.  If 
>> you are using PuppetDB and you are interested in links (to either the 
>> tickets or the previous thread) let me know and I'll dig them up.
>>
>> Thanks!
>> Chris
>>
>> On Thursday, January 31, 2013 10:26:18 AM UTC-8, David Kerr wrote:
>>>
>>> My environment heavily depends on exported resources to detect our mongo 
>>> instances and to populate our haproxies. 
>>>
>>> When we bring up and down nodes in AWS "puppet node clean" isn't 
>>> cleaning up the exported resources so we get ghost
>>> machines loaded into those config files.
>>>
>>> Up until today I've attempted to limp along by doing:
>>> puppet node clean
>>> sudo puppet cert clean
>>> delete from catalog_resources where title like '%%'
>>> delete from resource_params where value like '%%'
>>>
>>> That's been "pretty good", but today I ran into a problem where even 
>>> that didn't work.
>>>
>>> I'm comfortable working in the DB, but what's tough is trying to match 
>>> the 
>>> hashed ID's across tables (the data model doesn't make it exactly clear 
>>> what's going on)
>>>
>>> If someone's already tackled this beast and has a script that does it 
>>> right, that would be fantastic.
>>> I also understand that this is solved in 3.1, but I'm not too keen on 
>>> upgrading to an RC just to
>>> get exported resources working correctly.
>>>
>>> If someone has insight into the data model and can help me fill the gaps 
>>> that would be wonderful
>>>
>>> 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.




[Puppet Users] Re: Multiple hierarchies with Hiera

2013-01-31 Thread llowder


On Thursday, January 31, 2013 8:38:34 AM UTC-6, Schofield wrote:
>
> I am evaluating Hiera for use in our puppet setup to handle overrides 
> based on facts.  Unfortunately the documentation is  slim 
> http://projects.puppetlabs.com/issues/15295.  I am wondering if it is 
> possible to have multiple hierarchies and be able to choose which  
> hierarchy to use when calling the hiera functions from a module?  
>
> My line of thought is that operational concerns for configuring the 
> network/OS/middleware is independent from application environmental 
> concerns.  For example when configuring the OS I care if if the node is in 
> the DMZ or a specialized firewall'd network segment.  I don't care if the 
> node is going to be used for dev/test/qa/production release path of the 
> applications.  The opposite is true when installing applications.  I don't 
> care about the network since it should already be setup and the OS services 
> should already just work.  I do care if I am in dev/test/qa/production so I 
> can configure the application properly for that environment.  So I would 
> like to keep the overrides for network/OS/middleware separate from the 
> application level overrides.
>

If you call hiera like $somevalue = hiera(key, default,  source) (not sure 
that is the best name for the 3rd argument) it will, for that call only, 
override the hierarchy and inject 'source' at the top of the hierarchy.

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




[Puppet Users] Re: Hyperic monitoring of Puppet master and nodes?

2013-01-30 Thread llowder


On Wednesday, January 30, 2013 7:46:53 AM UTC-6, Thomas wrote:
>
> I'll be looking at having Hyperic monitor our Puppet master and nodes.
>
> Maybe I'm lucky but I've never found any thing errors in the puppet logs 
> to indicate any problems. Are there any messages I should look for? Is 
> there any information documented on best practices for assuring Puppet is 
> running properly?
>
> So far I'm planning to have Hyperic monitor that the required services are 
> running on all agents and the master. Is there any thing else I should 
> consider having Hyperic monitor to assure my Puppet infrastructure is 
> running properly?
>
>
You can have Hyperic monitor logs, but doing so tends to be very resource 
intensive, and you can get the same results using The Foreman or tagmail.

I use hyperic as well, and have been looking at a way to setup hyperic 
monitoring on my nodes automatically via puppet.

If this is something you would find useful, or would be interested in 
working on with me, please let me know.
 

> Thanks! Thomas
>
>

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




[Puppet Users] Re: puppetdb catalog duplication

2013-01-29 Thread llowder


On Tuesday, January 29, 2013 8:54:43 AM UTC-6, olli...@googlemail.com wrote:
>
> Hello,
>
> Just kicking the tyres with PuppetDB (1.1.0) on a test setup with 100-odd 
> nodes running only once an hour by default.
>
> Looking at the dashboard the catalog duplication is showing 0.0% which 
> seems a little odd to me. Any way to track
> down why this is and how to correct it as presumably this is not desired 
> behaviour.
>
>
If you have puppet-dashboard or the foreman, you can easily scan reports to 
see what changed. If you just had report set to store, still do able but 
will take a bit more work.

My guess is that you have a notify() or exec() that is running every time 
there is a puppet run, as a 0% catalog duplication means that evey catalog 
that comes in is unique, or had some sort of change in it.

 

> Cheers
> Paul
>

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




[Puppet Users] Re: Custom Error/Exception Handler

2013-01-22 Thread llowder


On Monday, January 21, 2013 5:42:41 PM UTC-6, James Birchfield wrote:
>
> I have looked over the documentation, but I did not see anything 
> pertaining to this subject.  If there is documentation of such sort, could 
> someone please point me to it?
>
> Is it possible to register some sort of custom error/exception handler?  I 
> would like to be able to register for any exception or error during a 
> catalog run and potentially act upon said errors (i.e. create an SNMP trap, 
> generate an email, etc.).  Is there a prescribed way to do this?
>
>
The only thing I know of would be after the fact, report based things using 
a custom report processor. I

 

> Thanks!
>
> Birch
>

-- 
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/-/gF-egCgv1moJ.
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: How to watch a logfile in Puppet?

2013-01-21 Thread llowder


On Monday, January 21, 2013 3:32:51 PM UTC-6, Andrey Brindeyev wrote:
>
> Hi!
>
> I'm a newbie in Puppet with some Chef experience.
>
> Now trying to convert my pet project from Chef to Puppet.
>
> When I start a Tomcat is takes some time (several seconds).
>
> I need to wait a line "Server startup in" in Tomcat's log before 
> proceeding.
>
> Here is a way which I used in Chef:
>
>
> https://github.com/abrindeyev/documentr-tomcat-cookbooks/blob/master/cookbooks/tomcat7/providers/logwatcher.rb
>
> And include following in your recipe:
>
> tomcat7_logwatcher "#{tc7target}/apache-tomcat-#{tc7ver}/logs/catalina.out" do
>   pattern "Server startup in"
>   timeout 60
>   action :watch_for_line
> end
>
>
> What is an easy way to do the same in Puppet world?
>
>
There isn't, really. Puppet is more about the state a node should be in, 
not so much the exact order the steps need to be done in. Puppet and Chef, 
while having the same end goals, are use two very different approaches.

If you can better describe what it is you are trying to accomplish, we can 
more than likely help you find the best way to do that.
 

> Andrey.
>

-- 
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/-/z1B7xdLhBJ8J.
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: Announce: Puppet Dashboard 1.2.19 Available

2013-01-16 Thread llowder


On Wednesday, January 16, 2013 7:22:15 AM UTC-6, bernard...@morpho.com 
wrote:
>
> I did not understand : there is a new version of the dashboard ? I thought 
> that the dashboard was deprecated and that Puppet Lab will no work on it 
> anymore ... 
>
> What is the status please ? 
>
>
Work on Dashboard by PuppetLabs is ending, as a replacement is created in 
terms of a standalone ENC and also enhancements to PuppetDB.

However, it is not fully going away, as someone from the community has 
stepped forward to take over the project. This person has already been 
given commit access as I recall.
 

> Cordialement, 
>
> Bernard Granier 
> CE Plateforme Système 
> bernard...@morpho.com  
> 01 58 11 32 51 
>
>
> -Original Message- 
> From: puppet...@googlegroups.com  [mailto:
> puppet...@googlegroups.com ] On Behalf Of Moses Mendoza 
> Sent: Wednesday, January 16, 2013 3:30 AM 
> To: puppet...@googlegroups.com ; 
> puppe...@googlegroups.com 
> Subject: Re: [Puppet Users] Re: Announce: Puppet Dashboard 1.2.19 
> Available 
>
> Hi Ellison, 
>
> You're right! Thanks for pointing that out. I failed to update the VERSION 
> file at the top of dashboard, which gets sourced for that link. Otherwise, 
> this is indeed 1.2.19:) 
>
> Moses 
>
> On Tue, Jan 15, 2013 at 6:04 PM, Ellison Marks 
> > 
> wrote: 
> > Just updated and noticed that the version number at the top of the 
> > page in dashboard didn't bump, and it still lists 1.2.18 in 
> > /usr/share/puppet-dashboard/VERSION. This is on CentOS 6 from yum. 
> > 
> > 
> > On Tuesday, January 15, 2013 4:59:45 PM UTC-8, Moses Mendoza wrote: 
> >> 
> >> Puppet Dashboard 1.2.19 is now available. 
> >> 
> >> This release of Puppet Dashboard addresses CVE-2013-0155.  All users 
> >> are strongly encouraged to update when possible. 
> >> 
> >> This vulnerability exposes ActiveRecord to unsafe query generation. 
> >> 
> >> More information on the vulnerability can be found here: 
> >> http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-0155, and in 
> >> this post: 
> >> https://groups.google.com/group/rubyonrails-security/browse_thread/th 
> >> read/73b8d3f8478df5e2 
> >> 
> >> Downloads 
> >>  
> >> 
> >> RPM packages for are available at https://yum.puppetlabs.com/el or 
> >> /fedora 
> >> 
> >> Debian packages are available at https://apt.puppetlabs.com 
> >> 
> >> Source can be downloaded from 
> >> https://puppetlabs.com/downloads/dashboard/puppet-dashboard-1.2.19.ta 
> >> r.gz, along with the accompanying signature file, 
> >> 
> >> 
> https://puppetlabs.com/downloads/dashboard/puppet-dashboard-1.2.19.tar.gz.asc.
>  
>
> >> 
> >> See the Verifying Puppet Download section at: 
> >> http://projects.puppetlabs.com/projects/puppet/wiki/Downloading_Puppe 
> >> t 
> >> 
> >> 1.2.19 Security Fixes 
> >>  
> >> Ernie Miller (1): 
> >>   04c1dba Fix for CVE-2013-0155 
> > 
> > -- 
> > 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/-/r7xJE--NIDIJ. 
> > To post to this group, send email to 
> > puppet...@googlegroups.com. 
>
> > To unsubscribe from this group, send email to 
> > puppet-users...@googlegroups.com . 
> > For more options, visit this group at 
> > http://groups.google.com/group/puppet-users?hl=en. 
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group. 
> To 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. 
>
> # 
> " This e-mail and any attached documents may contain confidential or 
> proprietary information. If you are not the intended recipient, you are 
> notified that any dissemination, copying of this e-mail and any attachments 
> thereto or use of their contents by any means whatsoever is strictly 
> prohibited. If you have received this e-mail in error, please advise the 
> sender immediately and delete this e-mail and all attached documents from 
> your computer system." 
> # 
>
>

-- 
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/-/v7S6UBKQmvgJ.
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] Couple of blog posts on puppet design

2013-01-15 Thread llowder
After reading recent posts by R.I. Pienaar [1] and Craig Dunn [2] I was 
inspired to not only refactor my puppet code, but also write about the 
process and one idea on how to combine these two patterns.

I've currently completed parts 1 and 2, and plan on completing part 3 this 
week.  Part 1 can be found at http://blog.keepingyouhonest.net/?p=435

I'm sharing this to solicit feedback about this approach, and also in the 
hope that people will find it helpful.

So, if you have questions or comments, please let me know.


[1] 
http://www.devco.net/archives/2012/12/13/simple-puppet-module-structure-redux.php
[2] http://www.craigdunn.org/2012/05/239/

-- 
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/-/Zbj8L4be_vIJ.
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: Version 2.6 Future Updates?

2013-01-15 Thread llowder


On Tuesday, January 15, 2013 10:53:55 AM UTC-6, Michael Hrivnak wrote:
>
> I am trying to determine how much longer, if at all, version 2.6 of Puppet 
> Open Source will get security fixes. Any guidance?
>
> The only documentation I can find is this link, stating that 2.6 is 
> currently "a security-fixes only branch". 
> http://projects.puppetlabs.com/projects/puppet/wiki/Release_Notes
>
>
I'm not positive, but I think it will end around the time 3.1 comes out, as 
the 2.7 line has also moved more or less into a security fix only state if 
I remember correctly.
 
 

> I work on Pulp  and am implementing new 
> support for managing the installation of modules onto puppet masters. 
> Answering this question about security updates will help us decide how old 
> of a puppet version we will support.
>
> Thanks,
> Michael
>

-- 
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/-/fYjQqlx-TOIJ.
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: Access variables defined in defined type

2013-01-11 Thread llowder


On Friday, January 11, 2013 4:45:49 AM UTC-6, Vladimir Rutsky wrote:
>
> Thank you for your reply.
>
> On Fri, Jan 11, 2013 at 1:06 AM, llowder  >wrote:
>
>>
>>
>> On Thursday, January 10, 2013 2:53:34 PM UTC-6, Vladimir Rutsky wrote:
>>>
>>> Sorry, there is a typo in example:
>>>
>>> define python_virtualenv( $directory ) {
>>>   # Setup virtualenv in directory here
>>>   ...
>>>
>>>   $easy_install = "${directory}/bin/easy_**install"
>>> }
>>>
>>> And use it in this way:
>>>
>>> python_virtualenv { 'env for Django':
>>>   directory => '/opt/django/env'
>>> }
>>>
>>> python_virtualenv { 'env for Worker':
>>>   directory => '/opt/worker/env'
>>> }
>>>
>>> # Now I want to use easy_install from created virtual environments:
>>> class { 'django':
>>>   easy_install => ???$Python_virtualenv['env for 
>>> Django']::easy_install???
>>> }
>>>
>>> class { 'django-cache':
>>>   easy_install => ???$Python_virtualenv['env for 
>>> Django']::easy_install???
>>> }
>>>
>>> class { 'worker':
>>>   easy_install => ???$Python_virtualenv['env for 
>>> Worker']::easy_install???
>>> }
>>>
>>> Question remains the same: how to access $easy_install variable defined 
>>> inside type define resource?  
>>>
>>>
>> You can't.  Defines, or as the are more formally called, defined types, 
>> act more like the built in resource types rather than classes. The 
>> variables and parameters from a define can only be accessed from the define 
>> itself, and from templates invoked within the define.
>>
>>
> Can you suggest solution to my problem?
>
> I want to create multiple Python virtual environments in different 
> directories and use files from them in other resources (like Django 
> installation and some other Python programs) in such way, that single 
> Python virtual environment can be used in multiple other resources.
>
> I don't want to manually specify paths relative to environment root 
> because it differs depending on OS (e.g. easy_install in GNU/Linux will be 
> in bin/easy_install, in Windows in Scripts/easy_install.exe)
>
>
You might be able to create a custom fact, have it look at the hostname 
then set the value of the fact to the proper easy_install value 
(bin/easy_install or Scripts_easy_install.exe) then you can reference the 
fact like you would any top scope variable.

 

>  
>
>>  
>>
>>>
>>> Vladimir Rutsky
>>>
>>>  -- 
>> 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/-/ZIhCgvZ_C6oJ.
>>
>> 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.
>>
>
> --
> Vladimir Rutsky
>

-- 
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/-/4lE4BveUp_0J.
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: Access variables defined in defined type

2013-01-10 Thread llowder


On Thursday, January 10, 2013 2:53:34 PM UTC-6, Vladimir Rutsky wrote:
>
> Sorry, there is a typo in example:
>
> define python_virtualenv( $directory ) {
>   # Setup virtualenv in directory here
>   ...
>
>   $easy_install = "${directory}/bin/easy_install"
> }
>
> And use it in this way:
>
> python_virtualenv { 'env for Django':
>   directory => '/opt/django/env'
> }
>
> python_virtualenv { 'env for Worker':
>   directory => '/opt/worker/env'
> }
>
> # Now I want to use easy_install from created virtual environments:
> class { 'django':
>   easy_install => ???$Python_virtualenv['env for Django']::easy_install???
> }
>
> class { 'django-cache':
>   easy_install => ???$Python_virtualenv['env for Django']::easy_install???
> }
>
> class { 'worker':
>   easy_install => ???$Python_virtualenv['env for Worker']::easy_install???
> }
>
> Question remains the same: how to access $easy_install variable defined 
> inside type define resource?  
>
>
You can't.  Defines, or as the are more formally called, defined types, act 
more like the built in resource types rather than classes. The variables 
and parameters from a define can only be accessed from the define itself, 
and from templates invoked within the define.

 

>
> Vladimir Rutsky
>
>

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



[Puppet Users] Re: Hiera hashes and arrays in ERB templates

2013-01-04 Thread llowder


On Friday, January 4, 2013 9:11:28 AM UTC-6, Andy Taylor wrote:
>
> Hi,
>
> I'm trying to build a module for haproxy which fetches all the 
> configuration data from Hiera to populate the haproxy config file. I've run 
> into a number of issues though when I try to use hashes. Ideally, I want to 
> use something like this:
>
> haproxy_listeners :
>  "cluster1" :
>   ip : '192.168.0.2'
>   port : '80'
>   servers : 
>"server1" :
> ip : '192.168.0.3'
> port : '8080'
>
> So a hash of clusters with each cluster containing a nested hash of 
> servers. Is this possible with Hiera/ERB? It's easy enough to iterate over 
> the first hash, but I can't work out how to extract the contents of the 
> nested hash. Or I might just be approaching this in entirely the wrong 
> way... Any help would be much appreciated.
>
>
I haven't used the function myself, but this looks like it would be a good 
case for a define + create_resources(), which I think is part of stdlib. 
You might need to restructure the hashes slightly, but I think that will be 
the best approach.

 

> Thanks,
>
> Andy
>

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



[Puppet Users] Re: Hiera, AIX, please help :)

2012-12-19 Thread llowder


On Wednesday, December 19, 2012 1:21:04 PM UTC-6, Worker Bee wrote:
>
> Hi Everyone;
>
> First, is my understanding correct that all boxes with agents >3.0 will 
> need to have hiera installed?  I have gotten conflicting answers and I have 
> found different answers in the documentation as well.  Can anyone clear 
> this up for me?
>
>
If you are using hiera, then it must be installed on the master, regardless 
of the version. However, puppet 3.0.0+ have it listed as a dependency so 
will install it when you install the puppetmaster package.

If you are running in a master/agent setup, you do NOT need hiera on the 
agent nodes. If you are running masterless, then every node will need it 
installed.
 

> And, if it is needed.. has anyone gotten it working on AIX?
>
> Thanks!
> Bee
>

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



[Puppet Users] Re: Puppet Reporting

2012-12-11 Thread llowder


On Tuesday, December 11, 2012 3:58:00 PM UTC-6, GregC wrote:
>
> I'd like to be able to load my puppet reports generated on my Puppet 
> production server onto my Puppet development server using dashboard, I 
> rsync the directory for my reports from the Puppet production host, 
> from /etc/puppet/reports, to the development server. 
>
> It doesn't appear that the development server picks up the reports to 
> be displayed in dashboard. Is there a way to get this to work? or is 
> there a better overall strategy to do puppet reporting when my 
> dashboard or reporting structure sits outside of production. 
>
>
That should work, but refer to 
http://docs.puppetlabs.com/dashboard/manual/1.2/maintaining.html#importing-pre-existing-reports
 
and have that task run after you sync,

If you are using a different version of dashbaord, refer to the docs for 
that one.


 

> I appreciate any help or guidance on how others might be dealing with 
> this issue in reporting on Production host, 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/-/W5VqeFkLJ34J.
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: Pre-commit hooks for your modules?

2012-12-10 Thread llowder


On Monday, December 10, 2012 4:27:26 PM UTC-6, Jakov Sosic wrote:
>
> Hi. 
>
> I was wondering what kind of precommit hooks are you guys using? 
>
>
> Here is what I use:

#!/bin/bash
# pre-commit git hook to check the validity of a puppet manifest
#
# Prerequisites:
# gem install puppet-lint puppet
#
# Install:
# /path/to/repo/.git/hooks/pre-comit

# Source RVM if needed
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load 
RVM into a shell session *as a function*

echo "### Checking puppet syntax, for science! ###"
# for file in `git diff --name-only --cached | grep -E '\.(pp|erb)'`
for file in `git diff --name-only --cached | grep -E '\.(pp)'`
do
# Only check new/modified files
if [[ -f $file ]]
then
puppet-lint \
--error-level all \
--fail-on-warnings \
--no-80chars-check \
--no-class_parameter_defaults-check \
--with-filename $file

# Set us up to bail if we receive any syntax errors
if [[ $? -ne 0 ]]
then
syntax_is_bad=1
else
echo "$file looks good"
fi
fi
done
echo ""

echo "### Checking if puppet manifests are valid ###"
# validating the whole manifest takes too long. uncomment this
# if you want to test the whole shebang.
# for file in `find . -name "*.pp"`
# for file in `git diff --name-only --cached | grep -E '\.(pp|erb)'`
for file in `git diff --name-only --cached | grep -E '\.(pp)'`
do
if [[ -f $file ]]
then
puppet parser validate --mode user --environment test $file
if [[ $? -ne 0 ]]
then
echo "ERROR: puppet parser failed at: $file"
syntax_is_bad=1
else
echo "OK: $file looks valid"
fi
fi
done
echo ""

if [[ $syntax_is_bad -eq 1 ]]
then
echo "FATAL: Syntax is bad. See above errors"
echo "Bailing"
exit 1
else
echo "Everything looks good."
fi

-- 
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/-/isWjIWaZjFEJ.
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: Defined Type and Scoping ...

2012-12-10 Thread llowder


On Monday, December 10, 2012 3:47:21 PM UTC-6, Reginald Choudari wrote:
>
> In the defined type, no I did not. Is that required for a defined typed 
> declared as a child of the class's scope?
>

If you want to notify some resource, it has to be included in that catalog 
somewhere. So either in that define, or your node def from the ENC, you 
will have to also include that class.

 

>
> On Monday, December 10, 2012 4:39:57 PM UTC-5, llowder wrote:
>>
>>
>>
>> On Monday, December 10, 2012 3:36:55 PM UTC-6, Reginald Choudari wrote:
>>>
>>> Hello,
>>>
>>> I've got a module with an 'init.pp' like so:
>>>
>>> class test_backend {
>>>
>>> ...
>>>
>>> exec {'reset':
>>>
>>> refreshonly => true,
>>>
>>> command => 'C:\blah.exe',
>>>
>>> }
>>>
>>> ...  
>>>
>>> }
>>>
>>>  
>>> And I declare a defined resource type 'cmd.pp' below:
>>>
>>>
>>> define test_backend::cmd($var1, $var2) {
>>>
>>> ...
>>>
>>> file {'$var1':
>>>
>>> ensure => file,
>>>
>>> content => $var2, 
>>>
>>> notify => Test_backend::Exec['reset'], 
>>>
>>> }
>>>
>>> ...  
>>>
>>> }
>>>
>>>
>>> And this is what I get:
>>>
>>> Failed to apply catalog: Could not find dependent 
>>> Test_backend::Exec[reset] for File[bobloblaw]
>>>
>>>
>>>
>> Did you "include test_backend" or "class { 'test_backend': }" anywhere?
>>
>>  
>>
>>> How should I go about doing this?
>>>
>>> Thanks,
>>> Reginald 
>>>  
>>>
>>

-- 
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/-/z2NH9d7rsDkJ.
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: Defined Type and Scoping ...

2012-12-10 Thread llowder


On Monday, December 10, 2012 3:36:55 PM UTC-6, Reginald Choudari wrote:
>
> Hello,
>
> I've got a module with an 'init.pp' like so:
>
> class test_backend {
>
> ...
>
> exec {'reset':
>
> refreshonly => true,
>
> command => 'C:\blah.exe',
>
> }
>
> ...  
>
> }
>
>  
> And I declare a defined resource type 'cmd.pp' below:
>
>
> define test_backend::cmd($var1, $var2) {
>
> ...
>
> file {'$var1':
>
> ensure => file,
>
> content => $var2, 
>
> notify => Test_backend::Exec['reset'], 
>
> }
>
> ...  
>
> }
>
>
> And this is what I get:
>
> Failed to apply catalog: Could not find dependent 
> Test_backend::Exec[reset] for File[bobloblaw]
>
>
>
Did you "include test_backend" or "class { 'test_backend': }" anywhere?

 

> How should I go about doing this?
>
> Thanks,
> Reginald 
>  
>

-- 
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/-/GJMB5Ex6msoJ.
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: Module class parameter override question

2012-12-07 Thread llowder


On Friday, December 7, 2012 1:37:20 PM UTC-6, Ugo Bellavance wrote:
>
> I realize that maybe these modules have been built to be used only with 
> foreman.  Is that a decent assumption?  And if so, is there a simple apache 
> module somewhere?  I only want to do the basics, check packages, service, 
> and create vhosts.  I may be better writing my own... 
>

Yes, the foreman* modules are designed to be used as a set to install 
foreman.

As for what to use, take a look at the puppet module forge, puppetlabs has 
a module for apache.

I generally look at the forge, give modules a read, then either hack it or 
write my own.
 

>
> On Friday, December 7, 2012 11:49:19 AM UTC-5, Ugo Bellavance wrote:
>>
>> Hi,
>>
>> I am experimenting with foreman's apache module and there is this class 
>> here:
>>
>> class apache::service {
>>   $http_service = $::operatingsystem ? {
>> /(Debian|Ubuntu)/ => 'apache2',
>> default   => 'httpd',
>>   }
>>
>>   service { $http_service:
>> ensure => running,
>> enable => true,
>> hasstatus  => true,
>> hasrestart => true,
>> alias  => 'httpd',
>> subscribe  => Package['httpd']
>>   }
>>
>>   exec { 'reload-apache':
>> command => "/etc/init.d/${http_service} reload",
>> onlyif  => '/usr/sbin/apachectl -t',
>> require => Service['httpd'],
>> refreshonly => true,
>>   }
>>
>> }
>>
>> I want to apply this class to a specific host, but I want to override the 
>> enable parameter so that it is false.
>>
>> I tried this:
>>
>> node 'server1' {
>>   class { 'apache::service':
>>   enable  => false,}
>> }
>>
>> But I always get this error:
>>
>> Could not retrieve catalog from remote server: Error 400 on SERVER: 
>> Invalid parameter enable at /etc/puppet/manifests/nodes/nodes.pp:40
>>
>> Any help would be appreciated.
>>
>> Thanks,
>>
>> Ugo
>>
>

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



[Puppet Users] Puppet and Hyperic

2012-12-07 Thread llowder
I was just wodnering - has anyone puppetized hyperic? Specifically, the 
configuration of groups, resources, alertdefs etc.

I'm starting such a project, but am unsure how to approach some of it. I 
think eventually I will wind up needing to do a set of types and providers, 
comparable to the nagios_* types.

Is this something others would be interested in?

-- 
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/-/5sSk2aSQ9u0J.
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: Environmets doesnt work on Puppet 2.7

2012-12-03 Thread llowder


On Thursday, November 29, 2012 9:02:27 AM UTC-6, Fran Rodríguez wrote:
>
> Hi group, 
>
> I got a problem with environments, im getting this erros from the client:
>
>  Could not retrieve catalog from remote server: Error 400 on SERVER: 
> Failed to parse template ssh/retrieve_priv_key.erb: cannot find key 
> directory: /etc/puppet/environments/production/modules/ssh/private_keys at 
> /etc/puppet/environments/development/modules/ssh/manifests/init.pp:91 
>
> I dont know what is happening because it works before. My puppet.conf on 
> master is this:
>
> [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
> server = puppetserver.in.rentalia.com
> environment = production
>
> prerun_command = /etc/puppet/etckeeper-commit-pre
> postrun_command = /etc/puppet/etckeeper-commit-post
>
> [master]
> manifest = $confdir/environments/$environment/manifests/site.pp
> modulepath = $confdir/environments/$environment/modules
>
>
You need to either make sure that every environment has a copy of every 
module you want to use in that environment, OR change your modulepath to 
include a common, shared area.

I use environments on 2.7.x w/o any problems.

My modulepath is:
modulepath = $confdir/environments/$environment/modules:$confdir/modules

I use the environments directory for all of my custom / normal modules, and 
then put all of my plugin type / shared modules (like stdlib, concat, 
hiera-puppet and the 'custom' module I use for distributing my custom 
facts, types, providers, functions etc)


 

> # 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
>
> storeconfigs = true
> dbadapter = mysql
> dbname = puppetdb
> dbuser = puppet
> dbpassword = hola
> dbserver = localhost
> dbsocket = /var/run/mysqld/mysqld.sock
>
> reports = log, foreman
>
> [agent]
> environment = production
> report = true
> pluginsync = true
> show_diff = true
>
> Anybody knows what happen?¿
>
> Cheers from Madrid
>
>

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



[Puppet Users] Re: hiera default values for a variable

2012-12-03 Thread llowder


On Sunday, December 2, 2012 9:42:08 PM UTC-6, Pete wrote:
>
> Hi everyone,
>
> I currently have a giant file with default variables I use in a lot of my 
> modules and I override those at the node level if I need to.
> I thought I would give porting that data into a hiera setup.
>
> I worked out how to specify my data sources and started to make a go at 
> moving some of my variables in the default data file.
>
> I thought heira would be smart and set a variable to undef if it couldn't 
> find it but that doesn't seem to be the case. (unless I missed something in 
> the rather sparse documentation)
> Is there a way of telling it to do this?
>
> I was also trying to work out how I automagically get my parametized 
> classed to pull in vars from hiera. (The docs on that don't tell me much 
> either.)
> Can anyone tall me how that works? Or do I have to use the hiera functions 
> which isn't automagical in my book.
>
>
If you are using puppet 3, then if you do:

class foo ( $bar = bat ) { ... }

puppet will look in hiera for a key named foo::bar if no param is supplied. 
If it does not find it, then it will use "bat" for the default.
 

> My current variables are set with a default value in my main file and then 
> I override those at the node level if I need to (so kind of the same way 
> hiera does it anyway)
>
> So given all of that I can't see any reason to switch to using heira 
> because my current setup works as-is (my variable file is getting pretty 
> huge anyway but that isn't going to change with heira if it won't set a var 
> to undef).
>
> What are the benefits or using an external source for variables instead of 
> sticking them in my node definitions (which seems like it would be faster 
> because it doesn't have to use an external source)?
>
>
Separating code from data makes it easier to share / reuse your modules, 
and can make it possible for "less trustworthy" people to be involved in 
the editing / creation of nodes
 

> Thanks in advance.
> Pete.
>

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



[Puppet Users] Re: [hiera] Hierarchy modification takes long time to be effective

2012-11-28 Thread llowder


On Wednesday, November 28, 2012 8:38:37 AM UTC-6, AnOnJoe wrote:
>
> Hello,
>
> I've something strange : 
> When I modify my hierarchy in my hiera.yaml, it can take up to several 
> hours, for the modification to work.
>
> eg : I create a subdir in my hieradata, move all the concerned files into, 
> modify my hiera.yaml 
>
>> from :
>> :hierarchy:
>> - %{operatingsystem}
>>
>
> to : 
>
>> :hierarchy:
>> - *os/*%{operatingsystem}
>>
>
> but the changes don't work immediatly.
>
>

Did you restart your master? 

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



[Puppet Users] Puppet and Hyperic

2012-11-27 Thread llowder
Was just wondering, before I went too far down this path...

I have to use Hyperic for monitoring and alerting.

I've got... 110+ apps to monitor spread across 3 clusters of 3 nodes. I've 
puppetized nearly every other aspect of this setup, so am now looking to 
puppetize the monitoring.

I know that puppet has rather extensive, built in support for Nagios, and I 
have heard that Nagios style scripts can be used with Hyperic.

I also know that Hyperic has a couple of APIs for programmatically adding 
services/applications/groups/alerts/etc.

I did not find any hyperic modules on the forge - though I don't need any 
for installing the server and agents as I already have that done.

Has anyone attempted this so far? If so, any pointers or caveats you could 
share? Or, if not on this specifically, any pointers as to a general 
approach that I should take?

I do have, in hiera, a list of what apps belong on what nodes in each 
cluster, so I don't need to export that, and would like to use that for my 
monitoring.  I also know that if I am not careful, the monitoring will 
hammer my servers when the scripts run, and these tend to take a fair 
amount of abuse as it is, so don't want to add to it too much if I can.

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/-/-NfCQGnwPgAJ.
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: Technical Reviewers Needed

2012-11-26 Thread llowder


On Monday, November 26, 2012 6:32:36 AM UTC-6, joa...@packtpub.com wrote:
>
> I am searching for a number of technical reviewers for a Puppet 
> Beginner's Guide that is currently in production. You need to have 
> good technical knowledge, and be able to spare a few hours every 
> couple of weeks to review the chapters. Please get in touch if you're 
> interested! 
>

I would be interested as well. 

-- 
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/-/IV_FkX3bK9YJ.
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: Question about a node that includes a class of the same name...

2012-11-26 Thread llowder


On Monday, November 26, 2012 10:10:06 AM UTC-6, jcbollinger wrote:
>
>
>
> On Tuesday, November 20, 2012 3:32:07 PM UTC-6, llowder wrote:
>>
>> I was going through the open bugs and came across an interesting one[1], 
>> where if a node has a certain name, and includes a class of the same name, 
>> the class doesn't get loaded.
>>
>> I did discover a workaround - two of them, actually.
>>
>> However, I was somewhat curious.  Is this something people do?
>>
>
>
> Some people do create "node classes", but as you can imagine, it doesn't 
> scale very well.  Nevertheless, it shouldn't break.
>
> I wonder whether you can work around the issue by using the absolute name 
> of the class, like this:
>
> node 'centos' {
>   include '::centos'
> }
>
>
I have found 2 ways to get around this. The first is to use a wild card 
regex as the node name:

  node /cento./{
   include centos
  }

And the other is to use paramater syntax, which works with "node centos" 
"node /centos/" and "node /cento./"

 

> Likewise, I wonder whether you can work around the issue of referencing 
> class variables inside node blocks by referring to them via their absolute 
> names.
>
>
> The class variables are only available in the node if the class itself 
gets loaded. I put together a set of tests that show the different 
combinations, you can see them at https://gist.github.com/4090041

 

> John
>
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/Tg-1MWNlVSQJ.
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] Question about a node that includes a class of the same name...

2012-11-20 Thread llowder
I was going through the open bugs and came across an interesting one[1], 
where if a node has a certain name, and includes a class of the same name, 
the class doesn't get loaded.

I did discover a workaround - two of them, actually.

However, I was somewhat curious.  Is this something people do?

The example listed in the bug report was a node named 'centos' and 
including a class named 'centos'.

If this is a pattern you use (having a node and class name match) could you 
please let me know?

Thanks.


[1] http://projects.puppetlabs.com/issues/1372

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



[Puppet Users] Re: puppet dashboard

2012-11-16 Thread llowder


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

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

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

> Cheers,
> Oli
>
 

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



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

2012-11-15 Thread llowder


On Thursday, November 15, 2012 8:47:29 AM UTC-6, vioilly wrote:
>
> Hi,
>
> I am just rolling out a new puppet deployment. Which version should i go 
> for, 2.7 or 3.1? I am looking to use the open source version.
>
>
If you plan on using an ENC, specifically TheForeman, or a lot of modules 
from the Puppet Forge, you might want to start with 2.7

That being said, Foreman is very close to having Puppet 3 support working, 
and more and more modules on the Forge are being made 3.0 compatible every 
day.

Puppet 2.7 is currently on 2.7.19 with 2.7.20 in RCs, and Puppet 3 is at 
3.0.1, so it is still a little rough around the edges, but the fact that 
hiera is integrated and it has the databindings is one very nice feature of 
3.0.x. It's also considerably faster.

There are advantages and disadvantages to both, and I am sure others will 
weigh in as well, but hope this helps.
 

> Many thanks,
> Oli

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

2012-11-13 Thread llowder


On Tuesday, November 13, 2012 12:41:38 PM UTC-6, Eric Sorenson wrote:
>
> use the attribute syntax in the config file, that way puppet won't clobber 
> it
>
> ## puppet.conf
> [main]
>rrddir = /var/lib/puppet/rrd { mode=0755 }
>
>
That was mentioned to me in IRC, and it did fix it.
 

> note this is currently not working under 3.0.1, tracking under #17371
>
 

>
> On Monday, November 12, 2012 7:54:57 AM UTC-8, llowder wrote:
>>
>> I recently enabled the rrdgraph reporting on my 2.7.19 master.
>>
>> I set it to create the graphs in /var/lib/puppet/rrd.
>>
>> In order to be able to access the things from the web, I set this 
>> directory to have mode 755.
>>
>> However, it keeps getting switched back to 750 during certain (all?) 
>> puppet runs.
>>
>> I then added the directory to one of my manifests to have puppet enforce 
>> the desired permissions. Now I keep seeing "mode changed '0750' to '0775'" 
>> for this resource.
>>
>> How can I make puppet stop fighting with itself and maintain the mode I 
>> want?
>>
>> I'm on Ubuntu 10.04, with my puppet installed from packages.
>>
>> 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/-/I5yZJFWV5-QJ.
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] Couple of dashbaord issues

2012-11-13 Thread llowder


On Tuesday, November 13, 2012 12:41:58 PM UTC-6, Matthaus Litteken wrote:
>
> Which activerecord is in use on the master? Does anything appear in 
> the master logs? It looks like it's related to 
> https://projects.puppetlabs.com/issues/16376, which is fixed in the 
> current rc series for 2.7.20. 
>
>
I recently switched over to using puppetdb from storeconfigs, if that makes 
a difference.

I'm not sure which version of the activerecord is installed - there isn't a 
package or a system gem installed, so it's whatever is vendored by puppet 
(2.7.19) or dashboard (just upgraded from 1.2.10 to 1.2.12)

As for the logs, I could not find anything in:
/var/log/apache2/error.log
/var/log/puppet/*
/var/log/puppet-dashboard/*

I am running my puppet master via Apache + passenger, but Dashboard via 
webrick.

Looking at that ticket, I think it may be the problem with the inventory 
issue, though there is still the filebucket issue to address.
 

> On Tue, Nov 13, 2012 at 8:18 AM, llowder > 
> wrote: 
> > I'm running dashbaord 1.2.12 on Ubuntu 10.04, with puppet 2.7.19 
> > 
> > When I try to do an inventory search, I just get a blank screen. 
> > 
> > When I try to view a changed file, I get a white box w/ "i/o error". 
> > 
> > I have asked about this once before in IRC, and the fix involved using a 
> > backported package, which I was unable to do at the time. Unfortunately, 
> I 
> > am unable to recall the version or the package(s) needed. 
> > 
> > Can someone please let me know how to fix these issues? 
> > 
> > (non-vendored) gem list: 
> > 
> > bundler (1.1.4) 
> > diff-lcs (1.1.3) 
> > gorgeous (0.1.2) 
> > gpgme (2.0.1) 
> > hiera (1.1.0) 
> > hiera-gpg (1.1.0) 
> > hiera-puppet (1.0.0) 
> > json (1.5.4) 
> > metaclass (0.0.1) 
> > mocha (0.12.1) 
> > puppet-lint (0.3.2) 
> > puppetlabs_spec_helper (0.2.0) 
> > rack (1.1.2) 
> > rake (0.9.2.2) 
> > rdoc (3.11) 
> > rspec (2.11.0) 
> > rspec-core (2.11.1) 
> > rspec-expectations (2.11.2) 
> > rspec-mocks (2.11.1) 
> > rspec-puppet (0.1.3) 
> > 
> > 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/-/0Pr5Kw0OaeEJ. 
> > To post to this group, send email to 
> > puppet...@googlegroups.com. 
>
> > To unsubscribe from this group, send email to 
> > puppet-users...@googlegroups.com . 
> > For more options, visit this group at 
> > http://groups.google.com/group/puppet-users?hl=en. 
>
>
>
> -- 
> Matthaus Owens 
> Release Manager, Puppet Labs 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/HPAzArbIr_8J.
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] Couple of dashbaord issues

2012-11-13 Thread llowder
I'm running dashbaord 1.2.12 on Ubuntu 10.04, with puppet 2.7.19

When I try to do an inventory search, I just get a blank screen.

When I try to view a changed file, I get a white box w/ "i/o error".

I have asked about this once before in IRC, and the fix involved using a 
backported package, which I was unable to do at the time. Unfortunately, I 
am unable to recall the version or the package(s) needed.

Can someone please let me know how to fix these issues? 

(non-vendored) gem list:

bundler (1.1.4)
diff-lcs (1.1.3)
gorgeous (0.1.2)
gpgme (2.0.1)
hiera (1.1.0)
hiera-gpg (1.1.0)
hiera-puppet (1.0.0)
json (1.5.4)
metaclass (0.0.1)
mocha (0.12.1)
puppet-lint (0.3.2)
puppetlabs_spec_helper (0.2.0)
rack (1.1.2)
rake (0.9.2.2)
rdoc (3.11)
rspec (2.11.0)
rspec-core (2.11.1)
rspec-expectations (2.11.2)
rspec-mocks (2.11.1)
rspec-puppet (0.1.3)

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/-/0Pr5Kw0OaeEJ.
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] rrdgraph issues

2012-11-12 Thread llowder
I recently enabled the rrdgraph reporting on my 2.7.19 master.

I set it to create the graphs in /var/lib/puppet/rrd.

In order to be able to access the things from the web, I set this directory 
to have mode 755.

However, it keeps getting switched back to 750 during certain (all?) puppet 
runs.

I then added the directory to one of my manifests to have puppet enforce 
the desired permissions. Now I keep seeing "mode changed '0750' to '0775'" 
for this resource.

How can I make puppet stop fighting with itself and maintain the mode I 
want?

I'm on Ubuntu 10.04, with my puppet installed from packages.

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



[Puppet Users] Puppet in SW MO

2012-11-06 Thread llowder
i am currently located in southwest MIssouri. Springfield, MO to be precise.

I'd like to get some sort of Puppet user group / meetup going in the area, 
but so far have not been able to locate anyone. I had looked on some of the 
Springfield based DevOps and related LInkedIn groups, but got no response, 
so I figured I'd ask here.

Anyone in the SW MO area and interested in something like this?

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/-/k0zz4l5ahC4J.
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: Run Exec without notifying Puppet as a change

2012-11-05 Thread llowder


On Monday, November 5, 2012 3:03:57 PM UTC-6, Thomas Biddle wrote:
>
> I just switched from an in-house APT module to the Puppetlabs one thinking 
> that it may solve this, but after looking at the code (And installing to 
> confirm) it did not.
>
> Seeing Puppet be notified of a "change" just when `apt-get update` is run 
> is a bit annoying to me. I was wondering if there was a way to avoid 
> notifying Puppet of a change when an Exec command is run? (Or if there's 
> another way we can run this)
>  
>
TJ
>

ONly way I know of is to use a fake exec (calling /bin/true or /bin/false 
(so it'll raise an error if it does get called) or something like that.) 
and use an only if with the real command (the update).

-- 
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/-/rSh7yc3i0psJ.
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: Really long puppet runs...

2012-11-02 Thread llowder


On Friday, November 2, 2012 1:10:37 PM UTC-5, nikolavp wrote:
>
> Is there any particular reason that you are using an older master than 
> the client. If not now it will pop up as a problem in the future. Why 
> don't you just make the move? 
>
>
2 of my nodes got provisioned wrong. I am ready to upgrade my master and 
the rest of my nodes, but corporate policy will not allow me to at this 
point in time.

As it currently stands, 3.0.0 client talking to a 2.7.19 master is 
relatively safe. The issue I was having was unrelated to the versions being 
used.

I am well aware of the potential problems when a client is newer than a 
master, and I do not plan on running this way any longer than I have to.
 

> Best, Nikola 
>
> On Fri, Nov 02, 2012 at 08:28:12AM -0700, llowder wrote: 
> > Turns out it was a stray recurse => true 
> > 
> > On Friday, November 2, 2012 9:56:40 AM UTC-5, llowder wrote: 
> > > 
> > > I've got a 3.0.0 node on Ubuntu 12.04 talking to a 2.7.19 master on 
> Ubuntu 
> > > 10.04.  Until yesterday, this worked fine (and the other 3.0.0 node 
> works 
> > > fine as well) 
> > > 
> > > This node is in my 'test' environment and the other node uses  an 
> almost 
> > > identical node def except is in the 'prod' environment. 
> > > 
> > > I don't know exactly what changed, but I am hoping someone can help me 
> > > track this down. 
> > > 
> > > Of the two nodes, I did move the one that is still functioning 
> normally 
> > > out of test and into prod, but other than hostnames and environments, 
> they 
> > > use the same code base and settings. 
> > > 
> > > I've posted a partial log (sudo puppet agent -t --debug) from the node 
> > > having problems at https://gist.github.com/4001797 
> > > 
> > > But the basic issue is that puppet runs have started taking 15-20 
> minutes, 
> > > and in each case, the long pause is after 
> > > 
> > > Debug: /Schedule[puppet]: Skipping device resources because running on 
> a 
> > > host 
> > > Debug: file_metadata supports formats: b64_zlib_yaml pson raw yaml; 
> using 
> > > pson 
> > > Debug: file_metadata supports formats: b64_zlib_yaml pson raw yaml; 
> using 
> > > pson 
> > > 
> > > is displayed. 
> > > 
> > > I commented out a section of the node def to simplify, and same 
> issues. 
> > > 
> > > Any help in tracking this down would be much appreciated. 
> > > 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "Puppet Users" group. 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msg/puppet-users/-/WtV8zCBVI1YJ. 
> > To post to this group, send email to 
> > puppet...@googlegroups.com. 
>
> > To unsubscribe from this group, send email to 
> puppet-users...@googlegroups.com . 
> > For more options, visit this group at 
> http://groups.google.com/group/puppet-users?hl=en. 
> > 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/NNSHa0-HkNQJ.
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: Really long puppet runs...

2012-11-02 Thread llowder
Turns out it was a stray recurse => true

On Friday, November 2, 2012 9:56:40 AM UTC-5, llowder wrote:
>
> I've got a 3.0.0 node on Ubuntu 12.04 talking to a 2.7.19 master on Ubuntu 
> 10.04.  Until yesterday, this worked fine (and the other 3.0.0 node works 
> fine as well)
>
> This node is in my 'test' environment and the other node uses  an almost 
> identical node def except is in the 'prod' environment.
>
> I don't know exactly what changed, but I am hoping someone can help me 
> track this down.
>
> Of the two nodes, I did move the one that is still functioning normally 
> out of test and into prod, but other than hostnames and environments, they 
> use the same code base and settings.
>
> I've posted a partial log (sudo puppet agent -t --debug) from the node 
> having problems at https://gist.github.com/4001797
>
> But the basic issue is that puppet runs have started taking 15-20 minutes, 
> and in each case, the long pause is after 
>
> Debug: /Schedule[puppet]: Skipping device resources because running on a 
> host
> Debug: file_metadata supports formats: b64_zlib_yaml pson raw yaml; using 
> pson
> Debug: file_metadata supports formats: b64_zlib_yaml pson raw yaml; using 
> pson
>
> is displayed.
>
> I commented out a section of the node def to simplify, and same issues.
>
> Any help in tracking this down would be much appreciated.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/WtV8zCBVI1YJ.
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] Really long puppet runs...

2012-11-02 Thread llowder
I've got a 3.0.0 node on Ubuntu 12.04 talking to a 2.7.19 master on Ubuntu 
10.04.  Until yesterday, this worked fine (and the other 3.0.0 node works 
fine as well)

This node is in my 'test' environment and the other node uses  an almost 
identical node def except is in the 'prod' environment.

I don't know exactly what changed, but I am hoping someone can help me 
track this down.

Of the two nodes, I did move the one that is still functioning normally out 
of test and into prod, but other than hostnames and environments, they use 
the same code base and settings.

I've posted a partial log (sudo puppet agent -t --debug) from the node 
having problems at https://gist.github.com/4001797

But the basic issue is that puppet runs have started taking 15-20 minutes, 
and in each case, the long pause is after 

Debug: /Schedule[puppet]: Skipping device resources because running on a 
host
Debug: file_metadata supports formats: b64_zlib_yaml pson raw yaml; using 
pson
Debug: file_metadata supports formats: b64_zlib_yaml pson raw yaml; using 
pson

is displayed.

I commented out a section of the node def to simplify, and same issues.

Any help in tracking this down would be much appreciated.

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



[Puppet Users] 'puppet resource user' questions

2012-10-26 Thread llowder
When I run "puppet resource user " I get a resource definition 
back for that user. However, when I run "puppet resource user" I do NOT see 
 in the list.

Is this intended behavior? Is there a way to get a list of all users, 
whether they are ldap or local?

This node is running puppet 2.7.19 on Ubuntu 12.04 against a 2.7.19 master 
on Ubuntu 10.04.

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/-/xzPXljvjvGoJ.
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: Managing untemplatable configuration files

2012-10-24 Thread llowder


On Wednesday, October 24, 2012 1:24:07 PM UTC-5, David Reagan wrote:
>
> I'm brand new to Puppet. Just read through the tutorial online, and the 
> first couple chapters of Pro Puppet.
>
> As I've experimented with managing Apache, I ended up storing my wildcard 
> ssl cert on the puppetmaster. Since my Apache hosts will all use it.
>
> I'm also looking at managing Shibboleth with Puppet. I don't know the 
> application well enough to figure out how to template the various 
> configuration files correctly. So it seems like I might want to store them 
> on the puppetmaster.
>
> I'm sure I'll run into other applications with the same problem.
>
> So, does it make sense to store files with host specific configuration in 
> them on the puppet master? Files that are either unable to be turned into 
> templates, or that I don't know enough about the application to make 
> templates. Or is there a better way?
>

For complex configs, I either use ageaus or a define that builds fragments 
to be put together using puppet-concat.
I also wind up having to spend a lot of time studying docs and existing 
configs so that I can properly build the config files.
 

-- 
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/-/1uklKbOw-HUJ.
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: How to remove data from hiera programtically

2012-10-23 Thread llowder


On Tuesday, October 23, 2012 4:22:59 PM UTC-5, Nishant Jain wrote:
>
> Hello Everybody,
>   Is it possible to store and remove data from 
> hiera(the yaml files) programatically ???
>

Sure, just use one of the YAML libraries and whatever language you want. 

-- 
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/-/K6lu2GfrNTwJ.
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] Your number of resources and time of your catalog runs

2012-10-22 Thread llowder


On Monday, October 22, 2012 4:12:15 PM UTC-5, Jakov Sosic wrote:
>
> On 10/22/2012 09:04 PM, Bostjan Skufca wrote: 
> > Hi, 
> > 
> > I was just wondering what is someone else's number of manager resources 
> > and catalog run time. 
> > Mine is 1,700 resources and average catalog run of 70-100 seconds (40 
> > seconds for catalog retrieval, 30-60 for catalog run), depending on the 
> > network distance between puppetmaster and managed node. 
> > Then there are few more seconds for provider cache stuff, and report 
> > uploading takes it's tool too, together adding some 20 seconds. 
> > 
> > Care to share your puppet agent performance details? 
>
> We're not as near in the number of resources per node yet, so no point 
> in comparing :) Let's just say my client run is less then 10 seconds on 
> average :) 
>
>
> But as a side note, I'm wondering at what number of nodes one must 
> replace puppetmaster with Apache+Passanger? Just a rough estimate, let's 
> say master runs on 2 socket quadcore. 
>
>
I replaced it at around 35 nodes I think. I've currently got 42. Before 
making the change to Apache + Passenger, we were seeing timeouts with 
webrick.

And in all honestly, I would make that change if you were using puppet in 
any sort of production environment. The only time I use webrick is for 
throwaway VMs where I have 1-3 nodes (including the master itself) running 
off a master so I can test something outside of my main master.

 

> Is it 50 agents? 100 agents? 200 agents? 
>
>

-- 
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/-/Uwq22fPQi5gJ.
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: Using Hiera with Parameters set for the Puppet Node

2012-10-19 Thread llowder


On Friday, October 19, 2012 3:18:59 PM UTC-5, Thomas Biddle wrote:
>
> Is it possible to have Hiera look at a key set for the node first, before 
> looking at other items in the hierarchy?
>
> In particular - I'm using Puppet Dashboard and am setting keys & params 
> for there, so I would like for any value set there for a node to be used 
> over another item in the hiera hierachy. What value would I have to specify 
> in the hierarchy for this, if it is possible?
>
>
Only option I can think of would be to write a custom hiera backend that 
checks with the ENC for the value, and then setup your hiera.yaml so it 
looks there first.

 

> Thanks,
> TJ
>

-- 
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/-/9cBneeZpsscJ.
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] pocco - a puppet manifest documentation experiment

2012-10-19 Thread llowder
Comments in line

On Friday, October 19, 2012 12:11:59 PM UTC-5, Ryan Coleman wrote:
>
>
>
> On Thu, Oct 18, 2012 at 10:06 PM, Nan Liu 
> > wrote:
>
>> Hi!
>>
>> The existing puppet manifests documentation generated via rdoc isn't
>> very dry. I quite like docco generated documentation so I borrowed
>> from rocco to create a puppet manifests documentation tool called
>> pocco.
>>
>
> Awesome Nan! What's the usage for this? Is one to run rocco against a 
> manifest?
>

I would like to know this as well, though from looking at the code, I think 
I saw an exec that updates the documentation if any of the manifests on the 
master changes.
 

>  
>
>>
>> Here's a module that will install the tool:
>> https://github.com/nanliu/puppet-pocco
>
>
> Sweet! Would you please throw this up on the Forge?
>

+1
 

>  
>
>>
>>
>> Here's a sample documentation generated from the manifest in the module:
>> http://nanliu.github.com/puppet-pocco/
>
>
> This is very slick. Is there an option to get the documentation back 
> without the manifest code if that's desired?
>

+1
 

>  
>
>>
>>
>> WARNING: unless pymentize is installed, manifests are shipped to
>> pygments.appspot.com for highlighting, so don't try this on anything
>> sensitive.
>>
>> It's just an experiment, but feel free to provide feedback.
>>
>
> Would anyone be interested in seeing the Forge processing documentation 
> like this and displaying it on a module page? This tool is very manifest 
> centric so the challenge would be to compose module-wide documentation in a 
> meaningful way but this is the awesome-sauce.
>

I think that would be an excellent addition to the forge, and would go a 
long way towards helping decide which modules are good quality and will 
work with a given site, especially if it can be expanded to cover full 
modules.
 

>  
>
>>
>> Thanks,
>>
>> Nan
>>
>
>
> -- 
> Ryan Coleman | Modules & Forge @PuppetLabs
> Want to get a hold of me?
>   - @ryanycoleman on Twitter
>   - ryancoleman in #puppet on Freenode
>   - https://tungle.me/ryanycoleman to schedule a Skype meeting
>  
>
>
>

-- 
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/-/5mFm-3KScW4J.
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: Install application that isn't in a package - need a nudge

2012-10-12 Thread llowder


On Friday, October 12, 2012 10:34:57 AM UTC-5, Brian Dunbar wrote:
>
> I apologize in advance - this might be covered elsewhere and I simply lack 
> the vocabulary to find it.
>
> I have Puppet 2.7.
> I have some linux hosts in a sandbox.
> I have some working modules for cron, files, packages, services.
>
> I need to maintain software that isn't in a package.  
> - I have the .bin from the vendor.
> - I have the parameters to pass for 'silent' install.
>
> I see that I can use exec function to run the .bin ... but that doesn't 
> feel like the 'Puppet' way of doing things.
>

You can either use an exec, or use fpm or whatever tool to make a package 
for your os and add it to your local repo then install it using a package 
resource.

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



[Puppet Users] Re: hiera && Boolean values

2012-10-12 Thread llowder


On Friday, October 12, 2012 9:51:22 AM UTC-5, guymatz wrote:
>
> Hi!  Sorry if this has already been discussed . . .
>
> I have a requirement to disallow root logins on my UK servers, but allow 
> them on my US servers.  I have an sshd_config template and am hoping to use 
> hiera to get a Yes/No depending on the country.  However It seems that 
> hiera is having a hard time dealing with Yes/No:
>
>
Try wrapping the Yes/No in single quotes, I've found that it makes a 
difference with true/false, at least on hiera 0.30.
 

> [root@gmatzpupmaster hieradata] $ grep estate_root_perm 70-country/u*
> 70-country/uk.yaml:estate_root_perm: No
> 70-country/us.yaml:estate_root_perm: Yes
> [root@gmatzpupmaster hieradata] $ hiera  estate_root_perm mserv_loc=uk
> /opt/puppet/lib/ruby/gems/1.8/gems/hiera-puppet-0.3.0/lib/hiera/backend/puppet_backend.rb:41:in
>  
> `lookup': uninitialized constant Hiera::Backend::Puppet_backend::Puppet 
> (NameError)
> from 
> /opt/puppet/lib/ruby/gems/1.8/gems/hiera-0.3.0/lib/hiera/backend.rb:160:in 
> `lookup'
> from 
> /opt/puppet/lib/ruby/gems/1.8/gems/hiera-0.3.0/lib/hiera/backend.rb:157:in 
> `each'
> from 
> /opt/puppet/lib/ruby/gems/1.8/gems/hiera-0.3.0/lib/hiera/backend.rb:157:in 
> `lookup'
> from /opt/puppet/lib/ruby/gems/1.8/gems/hiera-0.3.0/lib/hiera.rb:59:in 
> `lookup'
> from /opt/puppet/lib/ruby/gems/1.8/gems/hiera-0.3.0/bin/hiera:208
> from /opt/puppet/bin/hiera:19:in `load'
> from /opt/puppet/bin/hiera:19
> [root@gmatzpupmaster hieradata] $ hiera  estate_root_perm mserv_loc=us
> true
>
> If I change the value to something else it works:
>
> [root@gmatzpupmaster hieradata] $ vi 70-country/u*
> 2 files to edit
> [root@gmatzpupmaster hieradata] $ grep estate_root_perm 70-country/u*
> 70-country/uk.yaml:estate_root_perm: ukukukuk
> 70-country/us.yaml:estate_root_perm: usususus
> [root@gmatzpupmaster hieradata] $ hiera  estate_root_perm mserv_loc=uk
> ukukukuk
> [root@gmatzpupmaster hieradata] $ hiera  estate_root_perm mserv_loc=us
> usususus
>
>
> Any thoughts?
>
> Thanks a lot,
> Guy
>

-- 
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/-/dda0lXy3o3MJ.
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: Wrapper classes, ordering & anchors

2012-10-11 Thread llowder


On Thursday, October 11, 2012 8:37:39 AM UTC-5, alcy wrote:
>
> Hello, 
>
> I have a class like: 
>
> class wrapper { 
>   include foo 
>   include bar 
>   include baz 
> } 
>
> And a node like: 
>
> node x { 
>   include someclass 
>   include wrapper 
>   Class["someclass"]->Class["wrapper"] 
> } 
>
> The class chaining in node x doesn't get respected. In irc I was 
> suggested there being a possibility of this being related to #8040. 
> Can anyone suggest if that indeed might be the case ? Is there a clear 
> process to tell if certain chaining of classes or resources would 
> mandate using anchors or not ? Just to be clear, there is no order 
> required in the classes inside the wrapper class. But just that to 
> ensure before any of these, the class "someclass" gets applied. Any 
> ideas, and possible approaches would be nice. 
>


>From what I can tell, this looks like the main use case for the "anchor 
pattern" in stdlib.

https://github.com/puppetlabs/puppetlabs-stdlib
 

-- 
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/-/vd9gYqJEADgJ.
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: Need help with rspec-puppet

2012-10-10 Thread llowder


On Wednesday, October 10, 2012 9:43:47 AM UTC-5, Jian wrote:
>
> Anybody else received this or similar error?
>  
> What I was able to figure out so far is that:
> by adding "require 'puppet' to the spec test my error changes to:
>  
>  Error converting value for param 'plugindest': Error converting value for 
> param 'libdir': Could not find value for $vardir on node puppet-demo
>  
> So not a big improvement. The error probably occurs before the test 
> itself. Because the error is the same even if I delete the tested .pp file.
>  
> Any help would be appreciated :-). 
>

What version of puppet are you using?

Can you share your code - module and test? Either put in the email, or for 
better readability, use pastie or gist.
 

>  
>
> Dňa štvrtok, 4. októbra 2012 10:24:48 UTC+2 Jian napísal(-a):
>
>> Hello Everyone,
>>  
>> I am fairly new to puppet and I would like to run som unit tests. I hope 
>> rspec is the right tool for it. Unfortunately, after setting it up, when I 
>> try to execute it I receive the following error:
>>  
>> Failures:
>>   1) helloworld
>>  Failure/Error: it { should include_class('helloworld') }
>>  Puppet::Error:
>>Error converting value for param 'deviceconfig': Could not find 
>> value for $confdir on node puppet-demo
>>  # ./spec/classes/helloworld_spec.rb:8
>> Thiss error pops up for any test I try.
>>  
>> I wasn't able to find a solution yet. Can you please give me any advice? 
>>  
>> 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/-/LjuS6r4Q0DEJ.
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: How to remove warnings related to Resource references should now be capitalized when starts with number?

2012-10-08 Thread llowder

comments in line..
On Monday, October 8, 2012 9:38:05 AM UTC-5, jcbollinger wrote:
>
>
>
> On Thursday, October 4, 2012 8:42:39 AM UTC-5, Carlos Tapia wrote:
>>
>> Hi Guys!
>>
>> I want to clean warning messages: "*warning: Deprecation notice: 
>>  Resource references should now be capitalized*... "
>> It is related to following line:
>>
>> *  -> appcmd::32Bit['32BitappPool']*
>>
>> If I try to change any piece of the code using caps. for the fisrt 
>> letter, a syntax error is displayed.
>>
>> *   err: Could not parse for environment production: Syntax error at 
>> ':'; expected '}' *
>>
>> Any suggestion?
>>
>
>
"32Bit" isn't a legal name.. the regex is [a-z][a-z0-9_]* for classes and 
defines. Variables are a little more relaxed, but it is recommended that 
you stick to that same pattern for forwards compatibility.


 

> What is the actual name of the definition?  It probably should be 
> appcmd::32bit (not appcmd::32Bit; type names should not contain capital 
> letters).  If you are using an all-lowercase name, I would expect 
> references to it to require the form:
>
> Appcmd::32bit[]
>
> If Puppet raises a syntax error on that then I'll need to see a more 
> complete piece of code to guess at why.
>
>
> John
>
>

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



[Puppet Users] Puppet Conf Slides

2012-10-05 Thread llowder
While waiting for the video and audio to be published, I went through a 
bunch of the tweets and collected links to slides already out there.

That list is at 
https://docs.google.com/document/d/1rtrwrSEsXXM5gwaH7cUSkJ-pMbnmedMTdgvONO5k728/edit

If you know of any I missed, let me know by mail, twitter or IRC (I am 
FriedBob on both) and I will update.

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



[Puppet Users] Puppet Dashboard inventory search problems.

2012-10-05 Thread llowder
I'm using Dashboard 1.2.10 on an Ubuntu 10.04 LTS system, and Puppet 2.7.19

When I do an inventory search, I get a blank screen.

In the logs, I found the following:

Processing NodesController#search (for X.X.X.X at 2012-10-05 08:44:57) [GET]
  Parameters: {"action"=>"search", "controller"=>"nodes", 
"search_params"=>[{"fact"=>"OSFamily", "comparator"=>"eq", "value"=>"Debian"}]}

Errno::EIO (Input/output error):
  /usr/lib/ruby/1.8/net/http.rb:564:in `write'
  /usr/lib/ruby/1.8/net/http.rb:564:in `warn'
  /usr/lib/ruby/1.8/net/http.rb:564:in `connect'
  /usr/lib/ruby/1.8/net/http.rb:553:in `do_start'
  /usr/lib/ruby/1.8/net/http.rb:542:in `start'
  lib/puppet_https.rb:18:in `make_ssl_request'
  lib/puppet_https.rb:33:in `get'
  app/models/node.rb:85:in `find_from_inventory_search'
  app/controllers/nodes_controller.rb:44
  app/controllers/nodes_controller.rb:40:in `search'
  sass (3.1.2) [v] rails/./lib/sass/plugin/rack.rb:54:in `call'
  /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/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'

Rendering /usr/share/puppet-dashboard/public/500.html (500 Internal Server 
Error)

Any ideas as to the cause?


-- 
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/-/G1TyOXTlJKsJ.
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: How to prevent puppet clients from updating to version 3?

2012-10-04 Thread llowder


On Thursday, October 4, 2012 2:49:03 PM UTC-5, Jo wrote:
>
> On Oct 4, 2012, at 12:39 PM, Jeff McCune wrote:
>
> Either just use installed, or a specific version, and then you can upgrade
>
> when you are ready to.
>
>
> Even if you use ensure => installed, newly provisioned nodes will get
> the latest available version at the time Puppet first runs, which will
> cause issues unless you're also running a compatible Puppet master.
>
>
> We have solved this here by only copying down the RPMs to a local 
> repository after they have been tested. We've had too many puppet and 
> facter versions cause major problems to take anything without a full 
> testing cycle.
>
> That said, it's a lot of work. I'd love to see the yum/etc resources 
> updated to allow for < and <= versions.
>
>
Having that allowed as an option for all package providers would be nice.

You should open a ticket for that if you haven't already.

If you don't want to, let me know and I will open one.
 

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

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

2012-10-03 Thread llowder


On Wednesday, October 3, 2012 4:40:59 AM UTC-5, Mister Guru wrote:
>
>
> On 3 Oct 2012, at 03:35, Ryan Coleman wrote: 
>
> > Hello, 
> > 
> > If you weren't at PuppetConf or didn't catch my talk, here's a quick 
> > recap. I'm product owner for the Puppet Forge team which formed in 
> > July with 2 awesome engineers and an equally awesome designer. We're a 
> > team dedicated to the Forge and while ramping up, we've shipped three 
> > small improvements to the Forge that we hope you enjoy. 
>
> Good Morning Ryan! Nice to hear news about the puppet forge! Product owner 
> huh?? Hey guys, now we know who to bug when it come to the Forge! 
>
> > 
> > * Two lists were added to the homepage, highlighting recently active 
> > modules and contributors 
> > * An authors Gravatar is now displayed on each module page. 
> > * Today, the Forge will now retrieve information about GitHub issues 
> > and pull requests for a module for display on a module page. This has 
> > been automatically enabled for any module that lists GitHub as its 
> > 'Project Issue Tracker URL'. 
>
> I noticed this last night, it was great. I was stuck with a module I 
> downloaded - I looked it up on the forge, and I noticed a link to the git 
> page - I then realised the problem was ummm. me, using the module in 
> the not right way. Most useful, saved me bashing my keyboard against the 
> computer 
>
> > The team is just getting started. In the mean-time, we've been making 
> > improvements to our back-end services, user-testing new feature ideas 
> > and getting ready for the next wave of functionality. Our next 
> > features will focus on these two areas. A) Making it easy for you to 
> > contribute your module & B) Improve the information you have to make a 
> > decision about which module to use. 
> > 
> > As we develop and test ideas to address these goals, we want your 
> feedback! 
> > 
>
> Ah yes - Point B - How about ranking by downloads? I'm sure you can pull 
> the stats from Forge servers. I'm assuming people log into the forge to do 
> some background before running public code, for compliance, and in my case 
> to suppress paranoia :) 
>
> How about making the forge a bit more social - For example how about being 
> able to review a module, or write a comment about it on the forge? That 
> way, it's a bit easier for the author to get some feedback, and also for 
> others to get an idea how 'good' the module is. 
>
> That would come in useful when some modules depend on others, if I'm 
> trying to install module A, and A insists on B, C, and D - I'd rather read 
> up on others, who went live straight away without testing and are 
> complaining about their broken systems  Oh, I mean, I'd like to read 
> the reviews from other users praising the awesomeness of the forge. 
>
> Imagine that - In 6 months we could have modules writers competing against 
> each other - now that would be cool - Author rankings, (obviously Puppet 
> Labs Employees and modules excluded!) - and peer competition could only 
> lead to better code 
>

+1 on all these ideas, though I don't think that the "number of downloads" 
metric is really useful, a high number could just mean that it is easrlier 
in the list and still a crappy module..

But I do really like the idea of being able have some sort of community 
review on the modules, be that comments or even a simple up/down voting 
type system. 

>
> > Feel free to file bugs, features --anything really-- to our Redmine 
> > project: https://projects.puppetlabs.com/projects/module-site/issues 
> > Aside from that and this user list, you may always email me directly 
> > -- ry...@puppetlabs.com  -- or find me on #puppet as 
> ryancoleman. I'm 
> > always connected via ZNC so if you don't get an immediate response in 
> > IRC, know that I'll see your message and reply if I can. 
> > 
> > 
> > Finally, if you haven't tried out the Forge in a while, please give it 
> > another go. http://forge.puppetlabs.com -- Each day new content is 
> > added or updated and there's some truly awesome stuff amongst the 500+ 
> > Forge modules. There's also a blog-post series showcasing a new one 
> > each week. links.puppetlabs.com/motw 
> > 
> > Thanks for your time and for being an awesome community! 
> > 
> > --Ryan 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "Puppet Users" group. 
> > To post to this group, send email to 
> > puppet...@googlegroups.com. 
>
> > To unsubscribe from this group, send email to 
> puppet-users...@googlegroups.com . 
> > For more options, visit this group at 
> http://groups.google.com/group/puppet-users?hl=en. 
> > 
>
>

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

[Puppet Users] Re: activerecord and puppet-3.0.0

2012-10-03 Thread llowder
Comments inline.

On Wednesday, October 3, 2012 1:55:35 PM UTC-5, Joehillen wrote:
>
> Same issue here. I'd love to get some info on this.
>
> On Wednesday, October 3, 2012 2:26:42 AM UTC-7, Jonathan Gazeley wrote:
>>
>> Yesterday my puppetmaster and nodes got upgraded to puppet-3.0.0. 
>>
>> Since then, all puppet runs have been failing with this error: 
>>
>> Error: Could not retrieve catalog from remote server: Error 400 on 
>> SERVER: Could not autoload puppet/indirector/node/active_record: 
>> uninitialized constant ActiveRecord 
>>
>>
>> My colleague and I have put a few hours into trying to work out what's 
>> wrong. rubygem-activerecord-2.1.1-2.el6.noarch is installed from the 
>> puppetlabs RPM repo. We've reinstalled all components but made no 
>> progress. 
>>
>> I found this thread which seems to describe the same behaviour, but 
>> there are no replies: 
>>
>> https://groups.google.com/forum/?fromgroups=#!topic/puppet-dev/D85TsZ70LKQ 
>>
>> Anyone got any ideas? 
>>
>>
I can't find the sources now, but I vaguely remember seeing something 
related to this and they had to downgrade their activerecord install. But 
unfortunately, I do not remember the specifics.

 

> Thanks, 
>> Jonathan 
>>
>

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



[Puppet Users] Re: hiera and fallback to params?

2012-10-03 Thread llowder


On Wednesday, October 3, 2012 10:03:17 AM UTC-5, Jakov Sosic wrote:
>
> Hi. 
>
> I would like to setup my manifests, so that variable data is gathered 
> from hiera, if it's available there, and if not, then to fallback on 
> some predefined value... 
>
> Something like this: 
>
> $my_var = hiera('myvar') || 'base_value' 
>
> So if there is no myvar in hiera data, that manifest falls back to 
> base_value. Is that possible somehow? 
>
>
$my_var = hiera('somevar', 'some_default') will do exactly that.
 

-- 
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/-/5vVlXJWbRIUJ.
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: How to prevent puppet clients from updating to version 3?

2012-10-03 Thread llowder


On Wednesday, October 3, 2012 9:37:01 AM UTC-5, Mister Guru wrote:
>
> I'm sending this email to start this thread, feel free to comment as 
> appropriate. I'm going to assume that it's going to take a while for most 
> people to actually realise that the puppet update may be giving them some 
> issues, so, comments and suggestion please! 
>

Don't use ensure => latest.

Either just use installed, or a specific version, and then you can upgrade 
when you are ready to.

-- 
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/-/lPyCxjld3_MJ.
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: Puppetd

2012-10-01 Thread llowder
puppet agent has replaced the puppetd command.

On Monday, October 1, 2012 2:38:39 PM UTC-5, Douglas Brancaglion wrote:
>
> Hi guys, I updated my 3.0.1 to 2.7.19 puppet, puppet command but 
> disappeared.
>
> How do I sync manually?
>
> example "pupped-vt"
>
> hugs,
>
> -- 
> Douglas Brancaglion
> Security Analist
>
>  

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