[Puppet Users] File handling

2013-11-27 Thread Raj kumar V
Hi There, I am trying to do the following using puppet 1. Create a dir call mydir 2. Download a file from internet using Exec 3. Change the mode of the file 3. Install it and ensure running and service is enabled. 4. Delete it the installer file. When I do this until 3 rd step I am fine. But

[Puppet Users] external facts cause puppet apply to take inordinately longer to run

2013-11-27 Thread Glenn Poston
My external fact script takes 5s to run. With external fact... puppet takes 2.5m to run facter takes 33s to run Without external fact... puppet takes 27s to run facter takes 0.68s Bottom line... there's no significant change in facter runtime when parsing the external fact, but the puppet runti

[Puppet Users] facter --timing does not show timing of external facts

2013-11-27 Thread Glenn Poston
>From http://docs.puppetlabs.com/guides/custom_facts.html If you are interested in finding out where any bottlenecks are, you can run > Facter in timing mode and it will reflect how long it takes to parse your > external facts:facter --timingThe output should look similar to the > timing for R

Re: [Puppet Users] puppet client automatic self enrollment to puppet enterprise

2013-11-27 Thread Jo Rhett
There's nothing special. The only thing you'll need is either auto sign or automation on your side to pre-sign certs and deliver them to the VM. On Nov 27, 2013, at 6:30 AM, Martin Knott wrote: > I'm developing templates for vm cloud provisioning and would like to include > puppet client in th

Re: [Puppet Users] Custom Functions and hash as parameter

2013-11-27 Thread Henrik Lindberg
On 2013-27-11 17:33, Israel Calvete wrote: Hi all, I try write a custom function My code: / $gluster = {/ /'10.241.5.6' => '/data/gv0/brick1',/ /'10.241.5.7' => '/data/gv0/brick1',/ / }/ / / / $a = glusterFunctions($gluster)/ / / / notify{$a:}/ My simple custom function: /requir

[Puppet Users] analyzing Puppet's actions and proposed actions via comprehensive reporting

2013-11-27 Thread Stuart Cracraft
Anyone know of a Ruby, Perl, Python, Bash, etc. script to do this already written? Summarize /var/lib/puppet/reports/*all hosts*/*.yaml Assume infinite store in above. For any given period in the above, summarize: action that was performed by puppet or would be performed if in noop includin

Re: [Puppet Users] Problem with facter/puppet on smartos

2013-11-27 Thread Jo Rhett
On Nov 22, 2013, at 9:57 AM, Don Jackson wrote: > Trying to get puppet & factor working on SmartOS. Installed first from > pkgsrc, then upgraded puppet via gem. > I've never had luck mingling them. Either use the version from your package manager, or use them installed from gem. They have dif

Re: [Puppet Users] OSX 10.9 appdmg/pkgdmg

2013-11-27 Thread Zachary Vida
Frank, I was doing a puppet apply --debug init.pp to get the output shown above. I forgot when apply manifest directly in that manner that I would need a have an include somewhere. I just removed my outside class as this is just a test at this point, and everything starting to work. Thanks for

Re: [Puppet Users] package conflict resolution method:

2013-11-27 Thread Thomas Noonan II
I personally went the tiny class route, creating a module with a bunch of little classes for various packages. I opted for this route as it let me deal with naming differences between apt and yum, and let me do repo dependencies for stuff in Epel. Here is an example: https://github.com/TJNII/pupp

Re: [Puppet Users] Problem with PuppetDB and OpenSSL

2013-11-27 Thread Deepak Giridharagopal
On Nov 27, 2013, at 9:11 AM, Jonathan Gazeley wrote: > Hmm, well I removed java-1.6.0-openjdk and installed java-1.7.0-openjdk. > Reinstalled puppetdb, which pulled java-1.6.0-openjdk back in again, so the > two javas were installed simultaneously. Restarted puppetdb and puppetmaster > and ev

[Puppet Users] Custom Functions and hash as parameter

2013-11-27 Thread Israel Calvete
Hi all, I try write a custom function My code: * $gluster = {* *'10.241.5.6' => '/data/gv0/brick1',* *'10.241.5.7' => '/data/gv0/brick1',* * }* * $a = glusterFunctions($gluster)* * notify{$a:}* My simple custom function: *require 'rubygems'* *module Puppet::Parser::Functions*

Re: [Puppet Users] Problem with PuppetDB and OpenSSL

2013-11-27 Thread Jonathan Gazeley
Hmm, well I removed java-1.6.0-openjdk and installed java-1.7.0-openjdk. Reinstalled puppetdb, which pulled java-1.6.0-openjdk back in again, so the two javas were installed simultaneously. Restarted puppetdb and puppetmaster and everything works again I have no idea what was wrong. -- You

Re: [Puppet Users] get a *structured* version of the puppet agent output

2013-11-27 Thread Dan White
This one: http://shop.oreilly.com/product/9780596529864.do ? “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” Bill Waterson (Calvin & Hobbes) - Original Message - From: "Stuart Cracraft" To: puppe

Re: [Puppet Users] get a *structured* version of the puppet agent output

2013-11-27 Thread Stuart Cracraft
Get the book Learning Ruby. Worth it. > On Nov 27, 2013, at 7:44 AM, Dan White wrote: > > Very nice. > I am still learning Ruby and this will help > > Thanks. > > “Sometimes I think the surest sign that intelligent life exists elsewhere in > the universe is that none of it has tried to con

Re: [Puppet Users] get a *structured* version of the puppet agent output

2013-11-27 Thread Jeffrey Watts
+1 I've been using this script for the last month to view the "last run" details, and it works very well. Here at my shop I am not worried about changes, but I am worried about errors. I wrote a small Python script that queries PuppetDB (if you're not using it, use it) and reports if there were

[Puppet Users] puppet client automatic self enrollment to puppet enterprise

2013-11-27 Thread Martin Knott
Hi I'm developing templates for vm cloud provisioning and would like to include puppet client in the template has anybody have knowledge or experience to assist with my objective of puppet client automatic self enrollment to puppet enterprise e.g. as a new vm is built Any help appreciated Re

Re: [Puppet Users] get a *structured* version of the puppet agent output

2013-11-27 Thread Dan White
Very nice. I am still learning Ruby and this will help Thanks. “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” Bill Waterson (Calvin & Hobbes) - Original Message - From: "David Portabella" To:

Re: [Puppet Users] Problem with PuppetDB and OpenSSL

2013-11-27 Thread Jonathan Gazeley
Oops, I was a bit premature firing off my previous response. Here are the responses to your questions - and thanks very much for your help. Sorry for the massive email... On 27/11/13 14:55, Ken Barber wrote: * What_exact_ version of the JDK is PuppetDB using? The output of 'jinfo ' (pid of th

Re: [Puppet Users] Problem with PuppetDB and OpenSSL

2013-11-27 Thread Jonathan Gazeley
On 27/11/13 14:55, Ken Barber wrote: This all sounds pretty serious, but something isn't quite right here with the information you have provided. This error: >puppetdb.resnet.bris.ac.uk:8081: Connection refused - connect(2) Its very rare that a bug in a running piece of code/framework whatever

Re: [Puppet Users] get a *structured* version of the puppet agent output

2013-11-27 Thread David Portabella
Thanks again! It is great to use the puppet report yaml files! here there is an example script that prints all resources statuses, then it filters them by taking only the services, then it filters them by taking only the services changed to running. test.ruby #!/usr/bin/ruby require 'puppet' f

Re: [Puppet Users] Problem with PuppetDB and OpenSSL

2013-11-27 Thread Darin Perusich
On Wed, Nov 27, 2013 at 9:55 AM, Ken Barber wrote: >> I run all my Puppetised servers on CentOS 6.4. Overnight there were a load >> of updates for CentOS including an update to openssl-1.0.1e-15.el6. Since >> installing the updates, PuppetDB is no longer working and seems to be having >> troubles

Re: [Puppet Users] Problem with PuppetDB and OpenSSL

2013-11-27 Thread Ken Barber
> I run all my Puppetised servers on CentOS 6.4. Overnight there were a load > of updates for CentOS including an update to openssl-1.0.1e-15.el6. Since > installing the updates, PuppetDB is no longer working and seems to be having > troubles with SSL. > > All my puppet nodes show: > > Error: Could

Re: [Puppet Users] scope for templates that is called from a class that includes the class that calls the template.

2013-11-27 Thread David Portabella
and according to http://docs.puppetlabs.com/guides/templating.html *All of the variables visible in the current scope are available as Ruby instance variables* but out of the scope variables should be accessed by scope.lookupvar. so, why does the previous example works? why does file.txt get the

[Puppet Users] Java REST Client to access Puppet API

2013-11-27 Thread Naveen Desu
Hi, I am building a Java RESTful Client to connect & access Puppet Master services. While attempting this, I am unable to get SSLHandshake through. Can you pls let me know where I am going wrong: Puppet Master: puppetmaster.domain.com Java Client: javaclient.domain.com Obtained required signed

Re: [Puppet Users] scope for templates that is called from a class that includes the class that calls the template.

2013-11-27 Thread David Portabella
according to http://docs.puppetlabs.com/guides/scope_and_puppet.html about dynamic lookup from an included puppet file: puppet 2.7 warns about it, and puppet 3.2 stops working, as expected. however, about dynamic lookup from a template called on an included puppet file: both puppet 2.7 and puppet

[Puppet Users] Nsclient install

2013-11-27 Thread Jeffrey Smith
I am trying to install NSClient on windows 2008r2 using the below manifest class nsclient ($nagiosservers) { if ($operatingsystem == "windows") { file { 'C:/NSClient': ensure => directory, owner => 'Administrator', mode=> '0755', }

Re: [Puppet Users] puppet won't change user's password

2013-11-27 Thread Dan White
Just my attention-to-detail before sufficient coffee :P I see down the thread that this was fixed. “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” Bill Waterson (Calvin & Hobbes) - Original Message -

Re: [Puppet Users] Is it possible to puppet agent applies the config even when puppet master is unreachable?

2013-11-27 Thread Armindo Silva
Hi, first thank you for all your answers :) I also dislike using cache on production, but if a node can not reach the master it should still be able to enforce the configuration it already received from the master. I tried several options on puppet.conf from the node *usecacheonfailure=trueu

[Puppet Users] Re: Duplicate declaration

2013-11-27 Thread Raj kumar V
I read the JCBollingers advice and removed the Class[blah blah] stuff and it worked... On Wednesday, 27 November 2013 15:02:18 UTC+5:30, Raj kumar V wrote: > > I have module, for which if I add the class in the UI and run the agent > with --test it fails with the following error. But If I just a

[Puppet Users] Problem with PuppetDB and OpenSSL

2013-11-27 Thread Jonathan Gazeley
Hi chaps, I run all my Puppetised servers on CentOS 6.4. Overnight there were a load of updates for CentOS including an update to openssl-1.0.1e-15.el6. Since installing the updates, PuppetDB is no longer working and seems to be having troubles with SSL. All my puppet nodes show: Error: Cou

Re: [Puppet Users] Puppet agent messages with rsyslog

2013-11-27 Thread Andreas Dvorak
Hi, I solved it with this: if $programname == 'puppet-agent' and $syslogseverity <= '6' then /var/log/puppet/agent.log if $programname == 'puppet-agent' and $syslogseverity > '3' then ~ Regards, Andreas -- You received this message because you are subscribed to the Google Groups "Puppet Users

Re: [Puppet Users] puppet won't change user's password

2013-11-27 Thread Felix Frank
Hi Dan, I hope this was indeed intended for the list, seeing as I just received two messages from you to me directly. Something wonky on your end? As for the issue below - in the OP's case, *no* run ever lead to a change of passwords. Cheers, Felix On 11/27/2013 12:46 PM, y...@comcast.net wrote

[Puppet Users] Re: Status of Data in modules

2013-11-27 Thread Jon Shanks
Hey, Just to jump in at the end, (been following the thread) and looked at the implementatino of data in modules, but found that the complexity surrounding it was a bit much for people who were not experienced. Also, troubleshooting issues with data, i.e. some form of outcome of a puppet run

Re: [Puppet Users] puppet won't change user's password

2013-11-27 Thread Felix Frank
Way to go! On 11/27/2013 12:12 PM, Sergey Arlashin wrote: > So I installed libshadow and everything's working now! -- 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

Re: [Puppet Users] puppet won't change user's password

2013-11-27 Thread Sergey Arlashin
Seems to be useradd issue.. Debug: /User[testuser]: Provider useradd does not support features manages_passwords; not managing attribute password http://docs.puppetlabs.com/references/latest/type.html#user-provider-useradd: "useradd User management via useradd and its ilk. Note that you will ne

Re: [Puppet Users] puppet won't change user's password

2013-11-27 Thread Felix Frank
Hi, no good then. Please run again with an added -dv switch to puppet apply, and share the debug output. Thanks in advance. On 11/27/2013 12:02 PM, Sergey Arlashin wrote: > # puppet apply -e 'user { "testuser": password => > "$6$MhRLkUTo$9RhLb3AfsO4HSxeHdLOLCPBj7LRH6vGOx1zPcvpfVRGOuJPczjEyaYoS

Re: [Puppet Users] puppet won't change user's password

2013-11-27 Thread Sergey Arlashin
# puppet apply -e 'user { "testuser": password => "$6$MhRLkUTo$9RhLb3AfsO4HSxeHdLOLCPBj7LRH6vGOx1zPcvpfVRGOuJPczjEyaYoS3SyQ6MESctWarz2VDhD4ZT9wHe61v/" }' Notice: Compiled catalog for db-node2.site in environment production in 0.07 seconds Notice: Finished catalog run in 0.06 seconds Best regard

Re: [Puppet Users] puppet won't change user's password

2013-11-27 Thread Felix Frank
Ugh. So, does it work with other values (e.g., actual password hashes)? On 11/27/2013 11:57 AM, Sergey Arlashin wrote: > > # puppet apply -e 'user { "testuser": password => "*" }' > Notice: Compiled catalog for db-node2.site in environment production in 0.07 > seconds > Notice: Finished catalog

Re: [Puppet Users] puppet won't change user's password

2013-11-27 Thread Sergey Arlashin
# uname -a Linux db-node2 3.2.0-55-generic #85-Ubuntu SMP Wed Oct 2 12:29:27 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux # cat /etc/issue Ubuntu 12.04.3 LTS \n \l # puppet -V 3.3.2 # cat /etc/passwd |grep ^testuser testuser:x:1002:1002::/home/testuser:/bin/sh # cat /etc/shadow |grep ^testuser test

Re: [Puppet Users] Warning: Unable to fetch my node definition, but the agent run will continue:

2013-11-27 Thread Felix Frank
Hi, On 11/27/2013 02:01 AM, Shawn Parker wrote: > Error: Could not retrieve catalog from remote server: Error 400 on > SERVER: Failed when searching for node puppetnode.localdomain: Failed to > find puppetnode.localdomain via exec: Execution of > '/etc/puppet/snc_enc.py puppetnode.localdomain' ret

Re: [Puppet Users] puppet won't change user's password

2013-11-27 Thread Felix Frank
Hi, no, it's not. What version of puppet are you using? To make sure there is nothing funny going on with your overall manifest structure, can you try this as root on the agent machine: puppet apply -e 'user { "username": password => "*" }' For me, this yields Notice: /User[username]/password:

Re: [Puppet Users] can I pass a class or type to be executed into another class?

2013-11-27 Thread Felix Frank
Hi, I think you're overcomplicating. I suppose you have something like class mywebapp { tomcat7::war { "mywebapp": ... } } You can wrench your code inbetween if you slightly modify your defined type like so: define tomcat7::war(...) { file { "tomcat7-war-file-$name": path => "${tomcat7

Re: [Puppet Users] get a *structured* version of the puppet agent output

2013-11-27 Thread David Portabella
Thanks Ygor and R.I. Pienaar. that's exactly what i was looking for! Regards, David On Tuesday, November 26, 2013 8:27:20 PM UTC+1, Ygor wrote: > > Reference: > http://docs.puppetlabs.com/puppet/3/reference/format_report.html > > Start with this: >

Re: [Puppet Users] Is it possible to puppet agent applies the config even when puppet master is unreachable?

2013-11-27 Thread R.I.Pienaar
- Original Message - > From: "Felix Frank" > To: puppet-users@googlegroups.com > Sent: Wednesday, November 27, 2013 10:00:37 AM > Subject: Re: [Puppet Users] Is it possible to puppet agent applies the config > even when puppet master is unreachable? > > On 11/24/2013 11:17 PM, Jo Rhett

Re: [Puppet Users] Is it possible to puppet agent applies the config even when puppet master is unreachable?

2013-11-27 Thread Felix Frank
On 11/24/2013 11:17 PM, Jo Rhett wrote: > You want > this: > http://docs.puppetlabs.com/references/latest/configuration.html#usecacheonfailure +1 Also, note that --test explicitly disables this option, but it should default to enabled when *not* using --test, i.e. just --onetime --no-daemonize.

Re: [Puppet Users] Puppet 3x Debian Wheezy and Phusion Passenger

2013-11-27 Thread Felix Frank
Hi, what are the actual issues you are facing? What errors are being reported and where? Which howto are you using for the dashboard setup? On 11/23/2013 11:53 PM, Doe John wrote: > Hello, > > I'm trying to install puppet-dashboard with Phusion Passenger. It seems > to be a bugs or unsupported r

Re: [Puppet Users] OSX 10.9 appdmg/pkgdmg

2013-11-27 Thread Felix Frank
Hi, uhm, looking at your log, it would appear that the package in question is not part of your catalog at all. I gotta ask: Are you including the max-firefox class at all? Aside: Please note that dashes in class names are not strictly valid syntax and should be avoided. HTH, Felix On 11/23/201

[Puppet Users] Re: Puppet Agent does not connect to master after installing Dashboard

2013-11-27 Thread shlo . afgin
I think the problem is with *merging Dashboard with Passenger*. What I need to have in my Apache config file? For *Passenger* I need to have in the Apache configuration file the lines: Listen 8140 SSLEngine On SSLProtocol All -SSLv2 SSLCipherSuite HIGH:!ADH:RC4+R

[Puppet Users] Duplicate declaration

2013-11-27 Thread Raj kumar V
I have module, for which if I add the class in the UI and run the agent with --test it fails with the following error. But If I just add the include in the init class and run, it works. Any idea? Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Duplicate declaration: