[Puppet Users] Re: useradd Duplicate declaration: Group

2013-08-07 Thread Andreas Dvorak
Thank you very much John, to explain that.
My module is working now.
 
But what I tried was to have a list of user outside of the module. I would 
like to seperate the values of the user from the module. Have you got a 
hint to do that for me?
 
Best regards,
Andreas

-- 
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] Increment variable each time a definition is called.

2013-08-07 Thread Jurgen
Douglas Garstang  gmail.com> writes:

>how can I do this?



you ever find a way to do this? I am looking for the same thing.

-- 
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: node_aws installation problem

2013-08-07 Thread Piotr Jasiulewicz
It's somewhat disappointing that puppet labs expresses commercialism in 
such a nasty way, just breaking the free stuff and giving you an option to 
pay for it... will try on a different system and then switch to Chef.

Cheers,
Piotr

W dniu czwartek, 25 lipca 2013 17:35:10 UTC+1 użytkownik Piotr Jasiulewicz 
napisał:
>
> Is puppet enterprise free also? Not sure I would get consent from my 
> boss... it's a bit sad that the provisioning project looks totally 
> neglected by puppet labs.

-- 
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] introducing puppetboard 0.0.1

2013-08-07 Thread Daniele Sluijters


Hello everyone,


It’s a lovely grey and rainy day here in the Dutch summer, as good a day as 
any to release a new little project.


Its name is Puppetboard and has as aim to replace Puppet Dashboard’s 
reporting functionality. It does not nor will it include ENC features. It 
does all this without storing any data itself but querying PuppetDB instead.


The whole thing is built in Python and relies on Flask and WTForms. The 
communication logic has been split of in its own library called pypuppetdb 
which makes heavy use of the requests library. The interface is powered by 
Twitter Bootstrap with the Flatly theme.


Though I’ve pushed all the code out and made it public it’s all very young 
but it works fairly well. However, I’ve committed numerous barbarities in 
the code just to get things working and to figure out how to handle certain 
things. For the foreseeable time in the future I’ll be working on cleaning 
all this up and figuring out what I can do on my side and on PuppetDB’s 
side to make all this work a little better. Especially when it comes to 
dealing with big responses from PuppetDB...


This is the first time I’m open sourcing a project so that too is all new 
to me. I’d welcome the feedback and if someone feels brave enough even 
commits on the projects but try and be gentle about it :-). I’ll also be at 
PuppetConf including the Developer Day so feel free to reach out to me in 
person.


To the code:


 * puppetboard: https://github.com/nedap/puppetboard

 * pypuppetdb:  https://github.com/nedap/pypuppetdb


I realise that puppetboard doesn't have a test suite right now but it will 
soon. In order to do so I have to restructure a few things about it first. 
The installation documentation will improve with it.


Pypuppetdb's test suite will be expanding the coming days once I'm done 
mocking the HTTP requests _query() makes and manage to get a decent and big 
enough set of test data to feed into PuppetDB. This will allow me to run 
integration tests and benchmark certain changes I have in mind.


I’m hoping to be able to get a release out every month with improvements to 
both projects, perhaps even faster in the beginning but it remains to be 
seen how much time I’ll be able to spend on it.


A special thanks goes out to Ken Barber for helping out with all things 
PuppetDB and coming up with a way to run PuppetDB on Travis so we can run 
integration tests. Hunter, thank you for being so interested in this 
project and pushing me to release it.


— 

Daniele Sluijters

Nedap | Steppingstone

-- 
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] Increment variable each time a definition is called.

2013-08-07 Thread jcbollinger


On Wednesday, August 7, 2013 5:52:06 AM UTC-5, Jurgen wrote:
>
> Douglas Garstang  gmail.com> writes: 
>
> >how can I do this? 
>
>
>
> you ever find a way to do this? I am looking for the same thing. 
>
>
The values of Puppet variables cannot be changed once set.  If you somehow 
found a way around that restriction then it would necessarily involve 
manipulating a Puppet bug, therefore you would have no guarantee that it 
would continue to work if you change anything.  Just don't do it.

Instead, take a step back and consider the larger objective you are trying 
to achieve, rather than focusing on this particular, unviable, approach to 
achieving it.  If you explain, then we may be able to help devise an 
alternative approach.


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.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: useradd Duplicate declaration: Group

2013-08-07 Thread jcbollinger


On Wednesday, August 7, 2013 5:10:56 AM UTC-5, Andreas Dvorak wrote:
>
> Thank you very much John, to explain that.
> My module is working now.
>  
> But what I tried was to have a list of user outside of the module. I would 
> like to seperate the values of the user from the module. Have you got a 
> hint to do that for me?
>
>
What prevents you from doing that?

If you are specifically talking about the admin users class, which I 
suggested putting into the 'user' module, then you can instead put it in 
some other module, or else just get rid of it and put its contents into one 
or more node blocks.  The point of using a class is to facilitate re-use 
and/or multiple points of use.  I had supposed you wanted one or both of 
those because of the way you were trying to use 'import', but if you don't 
need either then you don't need a class.

Also, Puppet provides no name hiding, so you can refer to any class, 
definition, or variable anywhere via its qualified name (e.g. 
"user::adduser").  For variables only, the variable declaration must 
already have been parsed.  Module boundaries present no barrier here.

More generally, there are several ways you could record data specific to 
your site's nodes, and communicate it to Puppet to inform catalog 
compilation.  They fall into two general categories:

   1. Encode the data into your Puppet manifests.  There are several 
   variations on this theme, varying from simply including the data directly 
   in declarations (your present approach) to declaring literal data 
   structures in variables that your classes and definitions can process.
   2. Load your data from an external source.  There are innumerable ways 
   to do this, but in practice, the best place for you to start if you want to 
   go this route would be Hiera.  Generally, this route proceeds via loading 
   the external data into one or more Puppet variables, which your classes and 
   definitions thereafter process.
   
I should say that if you were using an external node classifier (ENC) then 
you could rely on that to feed some or all of the needed data to Puppet by 
setting global variables.  I would put that in category 2, but others might 
categorize it differently.

I apologize if that's more information than you wanted, or if it's not 
specific enough.  If you want better targeted advice then I need to 
understand the problem better.


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.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: introducing puppetboard 0.0.1

2013-08-07 Thread Klavs Klavsen
It seems very cool. Thank you for sharing.

One thing that I would be missing, before being able to switch (as gathered 
from screenshots - I haven't tested it yet :) - is the overview of failed, 
unreported and unresponsive hosts.
Also - there would need to be a way to query this - just as I currently do 
from puppet-dashboard (for my nagios monitoring) - so that I can alert when 
I started getting failed runs etc.

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




Re: [Puppet Users] Re: Windows Issue: Package ensure: change from absent to present failed

2013-08-07 Thread Michael Lück
Hi,

don't know if it helps you too, but this post
https://groups.google.com/forum/#!topic/puppet-users/Ll1VIWSbmO8
helped me when i got that error.

I just replaced the forward-slashes in the source attribute by double 
backslashes and i could install the msi.

Regards,
Michael

Am Donnerstag, 18. Juli 2013 05:49:40 UTC+2 schrieb Josh Cooper:
>
>
>
>
> On Wed, Jul 17, 2013 at 1:29 PM, Josh D 
> > wrote:
>
>> On Wednesday, July 17, 2013 1:56:42 PM UTC-6, Josh Cooper wrote:
>>
>>>
>>> Another user had to modify the NTFS and Share permissions for 'Domain 
>>> Computers' to access the share (map the drive)[2]. This is because 
>>> LocalSystem doesn't have any credentials with which to access the network.
>>>
>>> Josh
>>>
>>> [1] https://groups.google.com/**d/msg/puppet-users/**
>>> 86dBOxvirK0/I6CtTH_BGEgJ
>>> [2] https://groups.google.com/**d/topic/puppet-users/**
>>> xoJpt6ARe0Y/discussion
>>>
>>
>> I think that's the issue:
>> G:\Tools\Puppet\win64\Python>psexec -i -s msiexec.exe /qn /norestart /i 
>> Puppet\win64\Python\python-2.7.5.amd64.msi 
>> TARGETDIR=C:\Python27 ALLUSERS=1
>>
>> PsExec v1.98 - Execute processes remotely
>> Copyright (C) 2001-2010 Mark Russinovich
>> Sysinternals - www.sysinternals.com
>>
>>
>> msiexec.exe exited on SSCLD134G82G with error code 1619. 
>>
>
> This exit code means "This installation package could not be opened. 
> Verify that the package exists and that you can access it."[1]
>
> Side note, I think the error code (1619) isn't getting picked up by Puppet 
>> correctly.
>>
>
> Yes, ruby truncates windows exit codes to a single byte[2]
>
> C:\work\puppet>ruby --version
> ruby 1.9.3p374 (2013-01-15) [i386-mingw32]
> C:\work\puppet>ruby -e "%x{cmd.exe /c exit 1619}; puts $?.exitstatus
> 83
>
> where 1619 = 0x653 and 83 = 0x53
>
> A fellow puppet user has tried to work around this in the dism module[3]. 
> I would hate to see this proliferate across modules, surely ruby will fix 
> this, though I can't understand why the ticket is marked as a feature.
>
>  So I'm trying to weigh my options.  I'm a lowly developer and can't muck 
>> with domain users, nor can I change the security permissions on any of the 
>> CIFS network shares.  Running puppet agent manually, works on my test 
>> machine because I'm local admin, but won't work for other users who aren't. 
>>  I think I've tried copying installers using a File resource and then 
>> requiring and installing from said file in a package, but I recall that 
>> causing issues.
>>  
>> In the windows world, you'll either need to modify the network shares 
> (which you can't do), configure the puppet agent service to run as a domain 
> user that does have permission (not sure if that's an option for you), or 
> serve the packages through some other means, e.g. puppet master file 
> server[4], apache, etc.
>
> Josh
>
> [1] http://support.microsoft.com/kb/290158
> [2] https://bugs.ruby-lang.org/issues/8083
> [3] https://github.com/puppetlabs/puppetlabs-dism/pull/14
> [4] http://docs.puppetlabs.com/guides/file_serving.html
>
> -- 
> Josh Cooper
> Developer, Puppet Labs
>
> *Join us at PuppetConf 2013, August 22-23 in San Francisco - *
> http://bit.ly/pupconf13*
> **Register now and take advantage of the Final Countdown discount - save 
> 15%!*
>  

-- 
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] puppet-3.2.2 server not working - my 2.7.22 does

2013-08-07 Thread Klavs Klavsen
Hi,

I've setup a new puppet 3.2.2 server - next to my current 2.7.22 server.

When I connect with a client against it (changed puppet.conf to use the new 
server), then it removes facts and all (and runs no rules) - but it doesn't 
complain anywhere - not on the new puppetmaster either :(

I'm hoping you can give me some ideas, as how to debug this further. 

I'm running Passenger btw (on both servers).

Output from client run is this:
# puppet agent -t 
Info: Retrieving plugin
Notice: /File[/var/lib/puppet/lib/puppet]/ensure: removed
Notice: /File[/var/lib/puppet/lib/provider]/ensure: removed
Notice: /File[/var/lib/puppet/lib/facter]/ensure: removed
Notice: /File[/var/lib/puppet/lib/type]/ensure: removed
Info: Caching catalog for login01.example.dk
Info: Applying configuration version '1375874403'

Puppet.conf is copied from my existing master:
[main]
# The Puppet log directory.
# The default value is '$vardir/log'.
logdir = /var/log/puppet

# Where Puppet PID files are kept.
# The default value is '$vardir/run'.
rundir = /var/run/puppet

# Where SSL certificates are kept.
# The default value is '$confdir/ssl'.
ssldir = $vardir/ssl
modulepath = /etc/puppet/modules
pluginsync = true
dns_alt_names = puppet,puppet.example.dk,puppetmaster.example.dk

[user]
# These are needed when the puppetmaster is run by passenger
# and can safely be removed if webrick is used.
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY

[agent]
# The file in which puppetd stores a list of the classes
# associated with the retrieved configuratiion.  Can be loaded in
# the separate ``puppet`` executable using the ``--loadclasses``
# option.
# The default value is '$confdir/classes.txt'.
classfile = $vardir/classes.txt

# Where puppetd caches the local configuration.  An
# extension indicating the cache format is added automatically.
# The default value is '$confdir/localconfig'.
localconfig = $vardir/localconfig
server = puppetmaster.example.dk
ca = false
ca_server = puppetmaster-01.example.dk
report = true
runinterval = 1800
[master]
certname=puppetmaster.example.dk
ca_server=puppetmaster-01.example.dk
templatedir=/var/lib/puppet/templates
reports = store, http
#reports = http
 reporturl = http://localhost:3000/reports/upload
storeconfigs = true
storeconfigs_backend = puppetdb
facts_terminus = rest
inventory_server = localhost
inventory_port = 8081
#ENC
node_terminus = exec
external_nodes = /usr/local/bin/puppet_node_classifier_enc.sh
modulepath = /home/$environment/puppet/modules/
manifest = /home/$environment/puppet/manifests/site.pp

[production]
modulepath = /etc/puppet/modules
manifest = /etc/puppet/manifests/site.pp

-- 
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] Puppetdb install from sources

2013-08-07 Thread Joffrey Koenig
Hi everyone

I'm currently trying to install Puppetdb on my puppet master server (on 
Suse 11 SP2 64bits) using the Source 
methodand I 
can't figure out why it is not working. It's seems to be stuck at the 
begining of the rake install

I have Facter in version 2.0.0
# facter -v
2.0.0

I installed Leiningen (2.2.0) with the installation procedure I found on 
the official page . I put the lein script in 
/usr/local/bin. I'm using the Root account.
On the first run, lein tried to get the leiningen-2.2.0-standalone.jar from 
internet but since I disabled this possibility for my server I put it 
myself in the .lein/self-installs/ folder.

I installed the Java JDK 1.7u25
# java -version
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

Since I don't let the possibilty to my server to get files from the 
internet, I went on the github page of 
PuppetDBand I downloaded the zip file 
with the projet.

I extracted this zip file in /tmp/puppetdb and so I got the puppetdb-master 
once 
extracted.

Then I go in this folder and try to run rake install
I got this error 
WARNING: You're currently running as root; probably by accident.
Press control-C to abort or Enter to continue as root.
Set LEIN_ROOT to disable this warning.

So I just set $LEIN_ROOT with export LEIN_ROOT=1 to continue in with the 
root user.

I'm now able to launch rake install but I got stuck.


 # rake install
lein uberjar

I have no more information, it's the only thing displayed on my screen.

Do you have an idea why I can't go further in my installation?

Thank you!

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




Re: [Puppet Users] How to manage third-party module?

2013-08-07 Thread JuanBrein

Hi Faifel, 

this is the way I like to organize my modues:

modules/$environment/$type

where $environment usually is one of dev qa stg and prd

and type is one of base common and roles. 

So in a typical configuration it would be something like:

modules/dev/common
modules/dev/base
modules/dev/roles


modules/qa/common
modules/qa/base
modules/qa/roles


modules/stg/common
modules/stg/base
modules/stg/roles

Now

base contain base modules that configure your OS. ie:

companyname_ldap
companyname_ntp
companyname_network
companyname_mail

and usually you have something like:

companyname_base

that will include all the rest of the modules.

Common will contain all the external modules

apache
postfix
ldap

Roles will contain application modules

companyname_role_frontend
companyname_role_webapp
companyname_role_dbserver

Now. here is the important bit:

Each module is a git repo with one or more remotes. If it is a base or a 
role module, then the remote will be a private repo. If it is a common 
module then it will have 2 remotes, a private one and the mantainer repo.

All modules are tagged. Tags can be different among environments but you 
should always push forward incremental tags, never backwards. IE:

GOOD: 

dev/common/apache -> tag 1.4
qa/common/apache -> tag 1.2
stg/common/apache -> tag 1.1
prd/common/apache -> tag 1.1

WRONG:

dev/common/apache -> tag 1.0
qa/common/apache -> tag 1.3
stg/common/apache -> tag 1.3
prd/common/apache -> tag 1.1

That is a little bit of common sense. You should never push higher tags in 
more critical environments if they never were tested in the testing 
environments.

Finally with common modules it works something like this:

1- clone the module and create tag 1.0
2- New release by the developer, pull the changes from the remote and 
create a new tag 1.1
3- push the new tag in dev environment and test it against that.
4- If all is good, promote the tag to the rest of the environments.

Hope it make sense, bug if you have any question just let me know

Cheers

Juan



On Wednesday, August 7, 2013 3:18:02 AM UTC+1, Feifei Jia wrote:
>
> Thanks for the reply, Brian.
>
> I have looked into librarian-puppet, a good tool, just like ruby bundler. 
> Will give it a try.
>
> And I'm also interested in your alternative way to organise your module. 
> Could you explain more on that? What the modules directory structure look 
> like? Just like the following?
>
> /etc/puppet/modules/{library_modules, your_module_a, your_module_z}
>
>
> On Tuesday, August 6, 2013 5:52:12 PM UTC+8, blalor wrote:
>>
>> On Aug 6, 2013, at 5:27 AM, Feifei Jia  wrote:
>>
>> This is very inconvenient, obviously. So how do you guys manage 
>> third-party modules, except using git submodule? Thanks.
>>
>>
>> I use librarian-puppet https://github.com/rodjek/librarian-puppet for 
>> one of my projects.  It's basically a dependency management system for 
>> Puppet modules, a la Maven, Ruby gems, etc.  The problem is that I find its 
>> resolution of versions quite unreliable, for example grabbing apache 0.8.1 
>> when 0.6.x is specified.  The author is working on a replacement called 
>> Henson https://github.com/wfarr/henson.
>>
>> Librarian-puppet has some (undocumented) functionality that looks like 
>> it'll allow you to cache your dependencies and work from those, so I'm 
>> considering looking into that and committing the cardinal version control 
>> sin of checking in 3rd-party dependencies.  For right now, tho, despite my 
>> concerns with it, I find it a huge improvement over submodules or managing 
>> others modules in my source.
>>
>> An alternative may be to separate out your own modules from 3rd-party 
>> modules.  As it is, I put librarian-puppet-managed modules into a 
>> "library_modules" folder and ones developed just for a given project into 
>> "modules".  That will give you some separation of code and at least make it 
>> easier to manage updates.
>>
>> --
>> Brian Lalor
>> bla...@bravo5.org
>> http://github.com/blalor
>>  
>>

-- 
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: Newbie: Could not retrieve catalog from remote server: Error 400 on SERVER

2013-08-07 Thread jcbollinger


On Tuesday, August 6, 2013 5:29:32 PM UTC-5, Dan M wrote:
>
> In a simplified form, the issue occurs when "include" statement appears in 
> the script.
> For instance, below script executes just fine without .
> It still runs on the Master node (with warnings) with  but 
> fails on Agent node:
>
> /biz/puppet/hieradata/devbranch/site.pp:
> node default {
>
>   include apache
>
>   file { "/etc/sudoers":
> owner => root, group => root, mode => 660
>   }
> }
>
> Above site.pp executes on Master node:
> [me@ip-10-0-8-10 ~]$ sudo puppet apply --verbose 
> /biz/puppet/hieradata/devbranch/site.pp 
> Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/root_home.rb
> Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/pe_version.rb
> Info: Loading facts in 
> /etc/puppet/modules/stdlib/lib/facter/facter_dot_d.rb
> Info: Loading facts in 
> /etc/puppet/modules/stdlib/lib/facter/puppet_vardir.rb
> Info: Loading facts in 
> /etc/puppet/modules/concat/lib/facter/concat_basedir.rb
> Warning: Could not retrieve fact fqdn
> Warning: Host is missing hostname and/or domain: ip-10-0-8-10
> Warning: Config file /etc/puppet/hiera.yaml not found, using Hiera defaults
> Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/root_home.rb
> Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/pe_version.rb
> Info: Loading facts in 
> /etc/puppet/modules/stdlib/lib/facter/facter_dot_d.rb
> Info: Loading facts in 
> /etc/puppet/modules/stdlib/lib/facter/puppet_vardir.rb
> Info: Loading facts in 
> /etc/puppet/modules/concat/lib/facter/concat_basedir.rb
> Info: Applying configuration version '1375827325'
> Error: Could not start Service[httpd]: Execution of '/sbin/service httpd 
> start' returned 1: 
> Error: /Stage[main]/Apache/Service[httpd]/ensure: change from stopped to 
> running failed: Could not start Service[httpd]: Execution of '/sbin/service 
> httpd start' returned 1: 
> Notice: Finished catalog run in 4.04 seconds
>
> But fails for the Agent node:
> [me@ip-10-0-8-11 puppet-skeleton]$ sudo puppet agent --test
> Info: Retrieving plugin
> Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
> Info: Loading facts in /var/lib/puppet/lib/facter/concat_basedir.rb
> Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb
> Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb
> Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
> Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
> syntax error on line 13, col 10: `' at 
> /biz/puppet/hieradata/devbranch/site.pp:3 on node ip-10-0-8-11
> Warning: Not using cache on failed catalog
> Error: Could not retrieve catalog; skipping run
>
> Any ideas?
>


That compilation fails when your node declares class "apache" but not when 
it doesn't seems to pin the blame on that class.  You should run the master 
with debug logging enabled, and check whether its log has anything more 
illuminating to say.

Also, you should check whether there is more than one 'apache' module in 
your modulepath.  Inasmuch as the modulepath does not vary with environment 
I don't think that should be an issue, but all the same, I would like to 
rule it out.

Additionally, verify that every directory in your module path, everything 
in each one, and every directory in the paths to them are readable by the 
puppet user, and that all the directories are traversable by that user.  
The master process does not normally run with elevated privilege, so you do 
have to pay attention to file and directory permissions.  Even if the 
initial setup were correct, you might conceivably cause yourself trouble 
later by performing module installs with privilege, as you in fact did.


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.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: introducing puppetboard 0.0.1

2013-08-07 Thread Daniele Sluijters
Hi Klavs,

Thanks, I'll think about that. An API that could be used for notifications 
and such was already on my mind. Unfortunately I don't think I can 
currently ask PuppetDB for the statistics you mention but perhaps that can 
be added to PuppetDB.

As far as notifying about failed runs through Nagios, we actually use a 
plugin that checks the report age and its content on every node.

-- 
Daniele Sluijters

On Wednesday, 7 August 2013 15:32:48 UTC+2, Klavs Klavsen wrote:
>
> It seems very cool. Thank you for sharing.
>
> One thing that I would be missing, before being able to switch (as 
> gathered from screenshots - I haven't tested it yet :) - is the overview of 
> failed, unreported and unresponsive hosts.
> Also - there would need to be a way to query this - just as I currently do 
> from puppet-dashboard (for my nagios monitoring) - so that I can alert when 
> I started getting failed runs etc.
>

-- 
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: Installing Puppet Agent on Solaris without root privileges

2013-08-07 Thread jcbollinger


On Tuesday, August 6, 2013 5:10:04 PM UTC-5, Ken Weiss wrote:
>
> Can anyone point me to a procedure to install only the Puppet Agent on a 
> Solaris 10 system for which I do not have root access? Everything I have 
> found online involves using pkgadd and/or pkgutil, both of which require 
> root privileges to run.



You should be able to grab the source and perform an installation somewhere 
in your home directory.  You cannot perform a system-wide installation 
without root, however, and if you do not have root access then you cannot 
run Puppet as root.  That greatly limits what Puppet can actually do for 
you.


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.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] node definition too big in mutualized hosting context

2013-08-07 Thread mezcalito38
Hi,

I use puppet to manage servers in a mutualized hosting context and I get 
some trouble concerning the node definitions.

For example on dns nodes I have to declare many `bind::zone` resources like 
this:

bind::zone { ['website1.com']:
  expire => 604800,
  minimum => 3600,
  ttl => 38400,
  …
  records => [
'wwwINAxxx.xxx.xxx.xxx'
…
]
}

bind::zone { ['website2.com']:
  expire => 604800,
  minimum => 3600,
  ttl => 38400,
  …
  records => [
'wwwINAxxx.xxx.xxx.xxx'
…
]
}

… and hundred others like this.

Finally, the file containing node definition became very big and difficult 
to maintain.
I have the same issue for a webserver with apache::vhost resources for 
example.

For the moment I use a workaround like this:

import vhosts/*.pp

And in each files I put a condition to make a restriction for a particular 
nodes like this:

if $::fqdn =~ /^web(\d*)\.example\.net$/ {
apache::vhost { 'website2':
…
}
}

I suppose that many puppet users use puppet to manage nodes in mutualized 
hosting context and I would ask if someone have a better solution for this 
issue?

Regards,

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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Puppetdb install from sources

2013-08-07 Thread Ken Barber
Lein is probably trying to retrieve clojure/java related jars from the
internet. You should probably look at setting up your server to
utilise a proxy server and have Lein use that, its going to be far
easier than trying to download everything manually, I assure you.

ken.

On Wed, Aug 7, 2013 at 12:20 PM, Joffrey Koenig
 wrote:
> Hi everyone
>
> I'm currently trying to install Puppetdb on my puppet master server (on Suse
> 11 SP2 64bits) using the Source method and I can't figure out why it is not
> working. It's seems to be stuck at the begining of the rake install
>
> I have Facter in version 2.0.0
> # facter -v
> 2.0.0
>
> I installed Leiningen (2.2.0) with the installation procedure I found on the
> official page. I put the lein script in /usr/local/bin. I'm using the Root
> account.
> On the first run, lein tried to get the leiningen-2.2.0-standalone.jar from
> internet but since I disabled this possibility for my server I put it myself
> in the .lein/self-installs/ folder.
>
> I installed the Java JDK 1.7u25
> # java -version
> java version "1.7.0_25"
> Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
> Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)
>
> Since I don't let the possibilty to my server to get files from the
> internet, I went on the github page of PuppetDB and I downloaded the zip
> file with the projet.
>
> I extracted this zip file in /tmp/puppetdb and so I got the puppetdb-master
> once extracted.
>
> Then I go in this folder and try to run rake install
> I got this error
> WARNING: You're currently running as root; probably by accident.
> Press control-C to abort or Enter to continue as root.
> Set LEIN_ROOT to disable this warning.
>
> So I just set $LEIN_ROOT with export LEIN_ROOT=1 to continue in with the
> root user.
>
> I'm now able to launch rake install but I got stuck.
>
>
>  # rake install
> lein uberjar
>
> I have no more information, it's the only thing displayed on my screen.
>
> Do you have an idea why I can't go further in my installation?
>
> Thank you!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

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




[Puppet Users] Re: Puppet first run timing out

2013-08-07 Thread jcbollinger


On Tuesday, August 6, 2013 3:59:36 PM UTC-5, Cesar Covarrubias wrote:
>
> I'm working on deploying Puppet to our environment and after reinstalling 
> some nodes, I run Puppet for the first time. It appears to be updating some 
> Puppet specific files (see below), and then times out with the error: 
>
> "Error: /File[/var/lib/puppet/lib/facter/ip6tables_version.rb]/ensure: 
> change from absent to file failed: execution expired Error: Could not 
> retrieve plugin: execution expired". 
>
> The file it errors on varies, depending on how many times the agent has 
> run. Once I run Puppet a few times to get all the updates, and applies all 
> my configs fine. All my DNS settings are correct and have been tested. Is 
> it possible to extend the timeout on this sync? Any other thoughts?
>
>
> Environment: Centos 6.4 64Bit. ruby 1.8.7 Puppet 3.2.2 Facter 1.7.1
>
> Sample Output:
>
>> # puppet agent -t
>> Info: Retrieving plugin
>> Notice: 
>> /File[/var/lib/puppet/lib/puppet/parser/functions/defined_with_params.rb]/ensure:
>>  defined content as '{md5}ffab4433d03f32b551f2ea024a2948fc'
>> Notice: 
>> /File[/var/lib/puppet/lib/puppet/parser/functions/bool2num.rb]/ensure: 
>> defined content as '{md5}8e627eee990e811e35e7e838c586bd77'
>> Notice: 
>> /File[/var/lib/puppet/lib/puppet/parser/functions/README.markdown]/ensure: 
>> defined content as '{md5}e596ce938864a80fd1e51640cca7f612'
>> Notice: /File[/var/lib/puppet/lib/puppet/parser/functions/hash.rb]/ensure: 
>> defined content as '{md5}75fd86c01d5b1e50be1bc8b22d3d0a61'
>> Notice: /File[/var/lib/puppet/lib/puppet/parser/functions/prefix.rb]/ensure: 
>> defined content as '{md5}6a2d86233c9435afc1738f60a0c34576'
>> Notice: 
>> /File[/var/lib/puppet/lib/puppet/parser/functions/is_integer.rb]/ensure: 
>> defined content as '{md5}6520458000b349f1c7ba7c9ed382ae0b'
>> Notice: 
>> /File[/var/lib/puppet/lib/puppet/parser/functions/swapcase.rb]/ensure: 
>> defined content as '{md5}4902f38f0b9292afec66d40fee4b02ec'
>> Notice: 
>> /File[/var/lib/puppet/lib/puppet/parser/functions/to_bytes.rb]/ensure: 
>> defined content as '{md5}83f23c33adbfa42b2a9d9fc2db3daeb4'
>> Notice: 
>> /File[/var/lib/puppet/lib/puppet/parser/functions/has_interface_with.rb]/ensure:
>>  defined content as '{md5}8d3ebca805dc6edb88b6b7a13d404787'
>> Notice: /File[/var/lib/puppet/lib/puppet/parser/functions/lstrip.rb]/ensure: 
>> defined content as '{md5}210b103f78622e099f91cc2956b6f741'
>> Notice: 
>> /File[/var/lib/puppet/lib/puppet/parser/functions/is_array.rb]/ensure: 
>> defined content as '{md5}875ca4356cb0d7a10606fb146b4a3d11'
>> Notice: /File[/var/lib/puppet/lib/puppet/parser/functions/min.rb]/ensure: 
>> defined content as '{md5}35f1e50e7f9ff6d5b04e48952d4e13bd'
>> Notice: /File[/var/lib/puppet/lib/puppet/parser/functions/sort.rb]/ensure: 
>> defined content as '{md5}504b033b438461ca4f9764feeb017833'
>> Notice: /File[/var/lib/puppet/lib/puppet/parser/functions/merge.rb]/ensure: 
>> defined content as '{md5}52281fe881b762e2adfef20f58dc4180'
>> Notice: /File[/var/lib/puppet/lib/puppet/parser/functions/member.rb]/ensure: 
>> defined content as '{md5}541e67d06bc4155e79b00843a125e9bc'
>> Notice: 
>> /File[/var/lib/puppet/lib/puppet/parser/functions/capitalize.rb]/ensure: 
>> defined content as '{md5}14481fc8c7c83fe002066ebcf6722f17'
>> Notice: /File[/var/lib/puppet/lib/puppet/parser/functions/values.rb]/ensure: 
>> defined content as '{md5}066a6e4170e5034edb9a80463dff2bb5'
>> Notice: /File[/var/lib/puppet/lib/puppet/parser/functions/chomp.rb]/ensure: 
>> defined content as '{md5}7040b3348d2f770f265cf4c8c25c51c5'
>> Notice: /File[/var/lib/puppet/lib/puppet/parser/functions/unique.rb]/ensure: 
>> defined content as '{md5}217ccce6d23235af92923f50f8556963'
>> Notice: 
>> /File[/var/lib/puppet/lib/puppet/parser/functions/shuffle.rb]/ensure: 
>> defined content as '{md5}6445e6b4dc62c37b184a60eeaf34414b'
>> Notice: 
>> /File[/var/lib/puppet/lib/puppet/parser/functions/num2bool.rb]/ensure: 
>> defined content as '{md5}dbdc81982468ebb8ac24ab78d7097ad3'
>> Error: 
>> /File[/var/lib/puppet/lib/puppet/parser/functions/join_keys_to_values.rb]/ensure:
>>  change from absent to file failed: execution expired
>> Error: Could not retrieve plugin: execution expired
>> Info: Caching catalog for hostname.domain.com
>>
>>

Puppet is timing out during plugin synchronization, which is normally very 
fast.  That it times out several times, at different points, before going 
to completion points to a capacity problem at your master, rather than a 
problem associated with a specific file or module.  There is a config 
parameters by which you can tweak the timeout for catalog retrieval, but 
none specific to plugin sync.  Even if there were such a config option, 
tweaking it would not resolve the root problem.

There are a host of areas that contribute to aspects of your master's 
capacity, but the first thing that is usually suggested here is to run the 
master under apache/passenger, so as to allow multiple clients to be 
s

Re: [Puppet Users] node definition too big in mutualized hosting context

2013-08-07 Thread Mason Turner
Assuming all the dns servers are getting the same config, We break big chunks 
like that out into their own modules. So:

node dns1.myco.com {
  include myco::dns
}

node web1.myco.com {
  include myco::web
}

If the servers have different configs, you can make myco::dns::common, 
myco::dns::this myco::dns::that myco::dns::other.

We also use a "role" fact instead of a regex on the fqdn for case statements, 
but even those are fragile. I prefer to explicitly include things in the node 
definitions. It's a bit verbose, but its also clear for anyone else that has to 
maintain the code.

— Mason Turner

On Aug 7, 2013, at 9:55 AM, mezcalit...@gmail.com wrote:

> Hi,
> 
> I use puppet to manage servers in a mutualized hosting context and I get some 
> trouble concerning the node definitions.
> 
> For example on dns nodes I have to declare many `bind::zone` resources like 
> this:
> 
> bind::zone { ['website1.com']:
>   expire => 604800,
>   minimum => 3600,
>   ttl => 38400,
>   …
>   records => [
> 'wwwINAxxx.xxx.xxx.xxx'
> …
> ]
> }
> 
> bind::zone { ['website2.com']:
>   expire => 604800,
>   minimum => 3600,
>   ttl => 38400,
>   …
>   records => [
> 'wwwINAxxx.xxx.xxx.xxx'
> …
> ]
> }
> 
> … and hundred others like this.
> 
> Finally, the file containing node definition became very big and difficult to 
> maintain.
> I have the same issue for a webserver with apache::vhost resources for 
> example.
> 
> For the moment I use a workaround like this:
> 
> import vhosts/*.pp
> 
> And in each files I put a condition to make a restriction for a particular 
> nodes like this:
> 
> if $::fqdn =~ /^web(\d*)\.example\.net$/ {
> apache::vhost { 'website2':
> …
> }
> }
> 
> I suppose that many puppet users use puppet to manage nodes in mutualized 
> hosting context and I would ask if someone have a better solution for this 
> issue?
> 
> Regards,
> 
> 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.
> 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] new install with external ca - puppet agent complains "wrong public key type"

2013-08-07 Thread btb

hi-

i'm setting up a new puppet environment, with an existing, separate ca. 
 to that end, i've been referring to this document:


http://docs.puppetlabs.com/puppet/3/reference/config_ssl_external_ca.html

here is my agent config:
[main]
vardir = /var/lib/puppet
rundir = /var/run/puppet
logdir = /var/log/puppet
ssldir = $vardir/ssl
templatedir = $confdir/templates
server = config.example.com

[agent]
hostprivkey = /etc/puppet/pki/$certname-key.pem
hostpubkey = /etc/puppet/pki/$certname-key-public.pem
hostcert = /etc/puppet/pki/$certname-cert.pem
localcacert = /etc/pki/trusted_root_authorities/ca-certificates.crt
certificate_revocation = false

when starting the puppet agent, the following is logged:

Aug  7 09:07:38 fester puppet-agent[5281]: Starting Puppet client 
version 3.2.2

Aug  7 09:07:38 fester puppet-agent[5281]: Reopening log files
Aug  7 09:07:43 fester puppet-agent[5287]: Unable to fetch my node 
definition, but the agent run will continue:
Aug  7 09:07:43 fester puppet-agent[5287]: SSL_connect returned=1 
errno=0 state=SSLv3 read server certificate B: certificate verify 
failed: [wrong public key type]

Aug  7 09:07:43 fester puppet-agent[5287]: Retrieving plugin
Aug  7 09:07:43 fester puppet-agent[5287]: (/File[/var/lib/puppet/lib]) 
Failed to generate additional resources using 'eval_generate: 
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: 
certificate verify failed: [wrong public key type]
Aug  7 09:07:44 fester puppet-agent[5287]: (/File[/var/lib/puppet/lib]) 
Could not evaluate: SSL_connect returned=1 errno=0 state=SSLv3 read 
server certificate B: certificate verify failed: [wrong public key type] 
Could not retrieve file metadata for 
puppet://config.example.com/plugins: SSL_connect returned=1 errno=0 
state=SSLv3 read server certificate B: certificate verify failed: [wrong 
public key type]
Aug  7 09:07:44 fester puppet-agent[5287]: Could not retrieve catalog 
from remote server: SSL_connect returned=1 errno=0 state=SSLv3 read 
server certificate B: certificate verify failed: [wrong public key type]

Aug  7 09:07:44 fester puppet-agent[5287]: Using cached catalog
Aug  7 09:07:44 fester puppet-agent[5287]: Could not retrieve catalog; 
skipping run
Aug  7 09:07:44 fester puppet-agent[5287]: Could not send report: 
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: 
certificate verify failed: [wrong public key type]


openssl seems to indicate the public key is at least valid within a 
general context:


>openssl pkey -pubin -in $(puppet agent --configprint hostpubkey) -text 
-noout

Public-Key: (4096 bit)
Modulus:
00:d1:be:fc:cb:7c:76:e1:16:f1:b4:92:e9:c4:e5:
f0:9b:a4:da:8a:b5:89:7c:2c:c5:7f:4d:b5:08:5d:
fa:1a:6a:b2:76:c2:8c:92:23:66:75:66:50:53:8e:
15:c8:94:c8:6d:cd:b6:b3:a8:f5:25:69:d4:f9:71:
07:dd:32:8c:f0:17:3d:33:a1:10:0f:fd:a0:b6:0d:
d4:e9:3e:35:a6:3d:64:16:c9:26:a4:fc:07:da:2c:
74:7b:84:8b:6a:12:e1:2b:f1:3c:b8:34:e4:45:ec:
fb:68:2b:c5:00:a4:90:91:b6:a9:5f:01:88:31:cc:
98:a9:97:f1:c4:ea:81:e0:9f:da:55:a3:c6:95:7b:
b5:25:0a:bc:eb:d1:ef:56:7f:88:10:7b:e7:8a:4f:
d9:d0:67:e4:b3:84:f0:37:f3:b9:71:c8:0c:06:75:
a3:68:43:f0:ab:47:32:96:01:4d:a0:b4:fd:49:0f:
44:30:d2:48:2f:33:1c:48:1b:0b:d4:05:2c:b6:35:
42:ca:16:b3:da:7b:f1:27:c0:52:75:ac:09:c6:3b:
97:0a:dc:1f:b1:24:f4:43:f9:ce:f0:9d:e1:62:37:
cb:3c:7f:4a:2e:65:52:de:9d:9d:d9:28:51:69:69:
a9:1b:c1:aa:87:e4:ad:66:c2:a4:1c:e5:20:85:2a:
b2:fe:94:c1:b1:4c:df:1b:e2:e2:39:80:6b:b5:31:
44:07:08:3d:1b:a3:b3:6a:a2:f9:fd:ae:fc:de:f5:
78:fd:92:10:5d:09:cd:78:e0:6d:3a:84:93:55:f9:
7e:e6:8b:89:e9:72:e5:07:c3:48:0e:fc:c8:5a:16:
90:18:fa:6f:6e:fc:b2:5f:9b:bd:6d:85:cb:f0:62:
0b:d5:c0:50:a2:af:23:be:85:5f:5c:42:42:58:65:
c5:39:56:4b:b1:b9:31:03:fe:44:43:02:05:92:28:
f5:30:de:18:42:bd:66:87:04:ad:7d:0b:14:8d:ba:
e4:5a:09:04:e3:75:1a:db:68:11:e8:c5:3e:28:a2:
4d:41:20:94:10:37:d5:13:1e:7d:e9:54:fe:ea:86:
b9:cf:fa:30:83:6d:d5:bc:9c:61:9c:19:e5:4a:ba:
bb:d8:2f:a0:57:50:65:3e:bd:35:7e:40:02:ec:0d:
00:df:e5:e8:c8:c0:5f:ee:da:5a:d8:2a:bf:6e:bb:
d8:70:b0:6d:0d:4a:e4:35:61:b4:8e:98:c0:2d:9a:
bb:b4:e7:80:49:f4:0c:58:77:da:d7:bc:4f:9f:b8:
08:ef:05:5f:3b:ba:d2:24:58:ae:94:be:6b:5d:9f:
c7:56:54:f7:b4:08:bc:93:f8:17:8a:26:7c:45:3c:
77:2a:5b
Exponent: 65537 (0x10001)

how can i further troubleshoot what is wrong?  i've not been able to 
find any references to "wrong public key type" in my research so far.


regards
-ben

--
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] Freebsd + Puppet 3.2.2 pkg_add -f ?

2013-08-07 Thread joel johnston
Shouldn't pkg_add be using the -r option for package management?  I worked 
around by forcing the client to use ports instead, but it stinks.  Any 
thoughts? 

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




Re: [Puppet Users] Re: Puppet first run timing out

2013-08-07 Thread Cesar Covarrubias
I am already using Passenger. My master is still being minimally utilized,
as I'm just now beginning the deployment process. In terms of specs, it is
running 4 cores and 8GB of mem and 4GB of swap. During a run, the total
system usage is no more than 2GB and no swap. No network congestion and I/O
is low on the SAN which these VMs use.

The odd thing is once the hosts get all the libs sync'd, performance is
fine on further changes. It's quite perplexing.


On Wed, Aug 7, 2013 at 7:07 AM, jcbollinger wrote:

>
>
> On Tuesday, August 6, 2013 3:59:36 PM UTC-5, Cesar Covarrubias wrote:
>>
>> I'm working on deploying Puppet to our environment and after reinstalling
>> some nodes, I run Puppet for the first time. It appears to be updating some
>> Puppet specific files (see below), and then times out with the error:
>>
>> "Error: /File[/var/lib/puppet/lib/**facter/ip6tables_version.rb]/**ensure:
>> change from absent to file failed: execution expired Error: Could not
>> retrieve plugin: execution expired".
>>
>> The file it errors on varies, depending on how many times the agent has
>> run. Once I run Puppet a few times to get all the updates, and applies all
>> my configs fine. All my DNS settings are correct and have been tested. Is
>> it possible to extend the timeout on this sync? Any other thoughts?
>>
>>
>> Environment: Centos 6.4 64Bit. ruby 1.8.7 Puppet 3.2.2 Facter 1.7.1
>>
>> Sample Output:
>>
>>> # puppet agent -t
>>> Info: Retrieving plugin
>>> Notice: 
>>> /File[/var/lib/puppet/lib/**puppet/parser/functions/**defined_with_params.rb]/**ensure:
>>>  defined content as '{md5}**ffab4433d03f32b551f2ea024a2948**fc'
>>> Notice: 
>>> /File[/var/lib/puppet/lib/**puppet/parser/functions/**bool2num.rb]/ensure: 
>>> defined content as '{md5}**8e627eee990e811e35e7e838c586bd**77'
>>> Notice: 
>>> /File[/var/lib/puppet/lib/**puppet/parser/functions/**README.markdown]/ensure:
>>>  defined content as '{md5}**e596ce938864a80fd1e51640cca7f6**12'
>>> Notice: 
>>> /File[/var/lib/puppet/lib/**puppet/parser/functions/hash.**rb]/ensure: 
>>> defined content as '{md5}**75fd86c01d5b1e50be1bc8b22d3d0a**61'
>>> Notice: 
>>> /File[/var/lib/puppet/lib/**puppet/parser/functions/**prefix.rb]/ensure: 
>>> defined content as '{md5}**6a2d86233c9435afc1738f60a0c345**76'
>>> Notice: 
>>> /File[/var/lib/puppet/lib/**puppet/parser/functions/is_**integer.rb]/ensure:
>>>  defined content as '{md5}**6520458000b349f1c7ba7c9ed382ae**0b'
>>> Notice: 
>>> /File[/var/lib/puppet/lib/**puppet/parser/functions/**swapcase.rb]/ensure: 
>>> defined content as '{md5}**4902f38f0b9292afec66d40fee4b02**ec'
>>> Notice: 
>>> /File[/var/lib/puppet/lib/**puppet/parser/functions/to_**bytes.rb]/ensure: 
>>> defined content as '{md5}**83f23c33adbfa42b2a9d9fc2db3dae**b4'
>>> Notice: 
>>> /File[/var/lib/puppet/lib/**puppet/parser/functions/has_**interface_with.rb]/ensure:
>>>  defined content as '{md5}**8d3ebca805dc6edb88b6b7a13d4047**87'
>>> Notice: 
>>> /File[/var/lib/puppet/lib/**puppet/parser/functions/**lstrip.rb]/ensure: 
>>> defined content as '{md5}**210b103f78622e099f91cc2956b6f7**41'
>>> Notice: 
>>> /File[/var/lib/puppet/lib/**puppet/parser/functions/is_**array.rb]/ensure: 
>>> defined content as '{md5}**875ca4356cb0d7a10606fb146b4a3d**11'
>>> Notice: 
>>> /File[/var/lib/puppet/lib/**puppet/parser/functions/min.**rb]/ensure: 
>>> defined content as '{md5}**35f1e50e7f9ff6d5b04e48952d4e13**bd'
>>> Notice: 
>>> /File[/var/lib/puppet/lib/**puppet/parser/functions/sort.**rb]/ensure: 
>>> defined content as '{md5}**504b033b438461ca4f9764feeb0178**33'
>>> Notice: 
>>> /File[/var/lib/puppet/lib/**puppet/parser/functions/merge.**rb]/ensure: 
>>> defined content as '{md5}**52281fe881b762e2adfef20f58dc41**80'
>>> Notice: 
>>> /File[/var/lib/puppet/lib/**puppet/parser/functions/**member.rb]/ensure: 
>>> defined content as '{md5}**541e67d06bc4155e79b00843a125e9**bc'
>>> Notice: 
>>> /File[/var/lib/puppet/lib/**puppet/parser/functions/**capitalize.rb]/ensure:
>>>  defined content as '{md5}**14481fc8c7c83fe002066ebcf6722f**17'
>>> Notice: 
>>> /File[/var/lib/puppet/lib/**puppet/parser/functions/**values.rb]/ensure: 
>>> defined content as '{md5}**066a6e4170e5034edb9a80463dff2b**b5'
>>> Notice: 
>>> /File[/var/lib/puppet/lib/**puppet/parser/functions/chomp.**rb]/ensure: 
>>> defined content as '{md5}**7040b3348d2f770f265cf4c8c25c51**c5'
>>> Notice: 
>>> /File[/var/lib/puppet/lib/**puppet/parser/functions/**unique.rb]/ensure: 
>>> defined content as '{md5}**217ccce6d23235af92923f50f85569**63'
>>> Notice: 
>>> /File[/var/lib/puppet/lib/**puppet/parser/functions/**shuffle.rb]/ensure: 
>>> defined content as '{md5}**6445e6b4dc62c37b184a60eeaf3441**4b'
>>> Notice: 
>>> /File[/var/lib/puppet/lib/**puppet/parser/functions/**num2bool.rb]/ensure: 
>>> defined content as '{md5}**dbdc81982468ebb8ac24ab78d7097a**d3'
>>> Error: 
>>> /File[/var/lib/puppet/lib/**puppet/parser/functions/join_**keys_to_values.rb]/ensure:
>>>  change from absent to file failed: execution expired
>>> Error

Re: [Puppet Users] node definition too big in mutualized hosting context

2013-08-07 Thread Ramin K

On 8/7/2013 6:55 AM, mezcalit...@gmail.com wrote:

Hi,

I use puppet to manage servers in a mutualized hosting context and I get
some trouble concerning the node definitions.

For example on dns nodes I have to declare many `bind::zone` resources
like this:

bind::zone { ['website1.com']:
   expire => 604800,
   minimum => 3600,
   ttl => 38400,
   …
   records => [
 'wwwINAxxx.xxx.xxx.xxx'
 …
 ]
}

bind::zone { ['website2.com']:
   expire => 604800,
   minimum => 3600,
   ttl => 38400,
   …
   records => [
 'wwwINAxxx.xxx.xxx.xxx'
 …
 ]
}

… and hundred others like this.

Finally, the file containing node definition became very big and
difficult to maintain.
I have the same issue for a webserver with apache::vhost resources for
example.

For the moment I use a workaround like this:

import vhosts/*.pp

And in each files I put a condition to make a restriction for a
particular nodes like this:

if $::fqdn =~ /^web(\d*)\.example\.net$/ {
 apache::vhost { 'website2':
 …
 }
}

I suppose that many puppet users use puppet to manage nodes in
mutualized hosting context and I would ask if someone have a better
solution for this issue?



You might consider using create_resources with hiera. Here's a simple 
example.


yaml data
---
apache::a2mods:
  expires: {}
  gnutls:  {}
  headers: {}
  rewrite: {}
apache::vhosts:
statsstage.example.com:
priority:   '99'
a_template: 'apache/vhosts/stats.example.com.erb'
stage.example.com:
priority:   '00'

And the class the queries Hiera and pumps the data through various defines.

class profile::apache {

  include ::apache
  include logrotate::apache

  $mymods = hiera('apache::a2mods', {})
  create_resources('apache::a2mod', $mymods)

  $myvhosts = hiera('apache::vhosts', {})
  create_resources('apache::vhost', $myvhosts)

}

Ramin

--
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: node_aws installation problem

2013-08-07 Thread Ellison Marks
Honestly, it just sounds like your system is having trouble locating the 
guid gem. try this script:

require 'guid'
 
  # generate a GUID
  g = Guid.new
  puts g
  puts g.to_s
  puts g.hexdigest
  puts g.raw.inspect
  puts g.raw.length

  # generate another GUID, should be different everytime
  g2 = Guid.new
  puts g == g2

  # convert a hexstring into Guid object
  g3 = Guid.from_s(g.to_s)
  puts g3
  puts g == g3

  # convert a raw 16-byte string into Guid object
  g4 = Guid.from_raw(g.raw.inspect)
  puts g4
  puts g == g4

Just some test functions for the gem. Run with ruby scriptname.rb. You should 
see some guids and hexy things and true or false values.

If it errors out, either you didn't install the guid gem correctly or your ruby 
environment is slightly borked. If it does work, something else is going on.



On Wednesday, August 7, 2013 5:27:38 AM UTC-7, Piotr Jasiulewicz wrote:
>
> It's somewhat disappointing that puppet labs expresses commercialism in 
> such a nasty way, just breaking the free stuff and giving you an option to 
> pay for it... will try on a different system and then switch to Chef.
>
> Cheers,
> Piotr
>
> W dniu czwartek, 25 lipca 2013 17:35:10 UTC+1 użytkownik Piotr Jasiulewicz 
> napisał:
>>
>> Is puppet enterprise free also? Not sure I would get consent from my 
>> boss... it's a bit sad that the provisioning project looks totally 
>> neglected by puppet labs.
>
>

-- 
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: introducing puppetboard 0.0.1

2013-08-07 Thread Ellison Marks
If it's something that means I can finally ditch puppet-dashboard's 
reporting functionality, I will be on that like jam on toast. Screenshots 
look very cool, I'll probably try to install it later this week.

On Wednesday, August 7, 2013 5:47:23 AM UTC-7, Daniele Sluijters wrote:
>
> Hello everyone,
>
>
> It’s a lovely grey and rainy day here in the Dutch summer, as good a day 
> as any to release a new little project.
>
>
> Its name is Puppetboard and has as aim to replace Puppet Dashboard’s 
> reporting functionality. It does not nor will it include ENC features. It 
> does all this without storing any data itself but querying PuppetDB instead.
>
>
> The whole thing is built in Python and relies on Flask and WTForms. The 
> communication logic has been split of in its own library called pypuppetdb 
> which makes heavy use of the requests library. The interface is powered by 
> Twitter Bootstrap with the Flatly theme.
>
>
> Though I’ve pushed all the code out and made it public it’s all very young 
> but it works fairly well. However, I’ve committed numerous barbarities in 
> the code just to get things working and to figure out how to handle certain 
> things. For the foreseeable time in the future I’ll be working on cleaning 
> all this up and figuring out what I can do on my side and on PuppetDB’s 
> side to make all this work a little better. Especially when it comes to 
> dealing with big responses from PuppetDB...
>
>
> This is the first time I’m open sourcing a project so that too is all new 
> to me. I’d welcome the feedback and if someone feels brave enough even 
> commits on the projects but try and be gentle about it :-). I’ll also be at 
> PuppetConf including the Developer Day so feel free to reach out to me in 
> person.
>
>
> To the code:
>
>
>  * puppetboard: https://github.com/nedap/puppetboard
>
>  * pypuppetdb:  https://github.com/nedap/pypuppetdb
>
>
> I realise that puppetboard doesn't have a test suite right now but it will 
> soon. In order to do so I have to restructure a few things about it first. 
> The installation documentation will improve with it.
>
>
> Pypuppetdb's test suite will be expanding the coming days once I'm done 
> mocking the HTTP requests _query() makes and manage to get a decent and big 
> enough set of test data to feed into PuppetDB. This will allow me to run 
> integration tests and benchmark certain changes I have in mind.
>
>
> I’m hoping to be able to get a release out every month with improvements 
> to both projects, perhaps even faster in the beginning but it remains to be 
> seen how much time I’ll be able to spend on it.
>
>
> A special thanks goes out to Ken Barber for helping out with all things 
> PuppetDB and coming up with a way to run PuppetDB on Travis so we can run 
> integration tests. Hunter, thank you for being so interested in this 
> project and pushing me to release it.
>
>
> — 
>
> Daniele Sluijters
>
> Nedap | Steppingstone
>

-- 
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] Adding Foreman to an existing Puppet master

2013-08-07 Thread Pablo Carranza
Greetings:

Sorry for cross-posting this question, but I haven't gotten any love 
over on the Google Forum for Foreman 
users (their 
forum isn't as active as this one). I only recently learned about The 
Foreman and I'd like to deploy it on a 64-bit Ubuntu 12.04 LTS workstation 
to provision/manage a bunch of VPSs. I have an existing master-agent Puppet 
deployment w/PuppetDB on it's own VPS. In the Foreman 1.2 Installation 
Manual, the following is mentioned in a couple of places:

The Foreman installer uses Puppet to install Foreman. This guide assumes 
> that you've already installed Puppet (without a master)...


Unless there's a huge benefit to allowing the Foreman installer to 
overwrite my current puppetmaster configs, I'd like to keep my existing 
Puppet master. In perusing through the manual, I then came across *3.2.2 
Installer Options*, which suggests that 'all with the world' will be grand 
and wonderful again, if I simply copy & edit the answers file found at 
/usr/share/foreman-installer/foreman_installer/answers.yaml.

I continued reading and then came across the following: "Other examples are 
given in /usr/share/foreman-installer/README.md." Being the obedient-fellow 
that I am, I went ahead and read the README file; because, at this point, 
my biggest question is this:

If I, in the *answers.yaml* file, set the *puppet* and *puppetmaster* variables 
> to *false*, do I need to go back once the Foreman install is finished and 
> patch The Foreman to my existing puppetmaster that I am stubbornly hanging 
> on to?


In the README file, I came across the following:

Extras

--

If you just want to include the relavant bits to run on your puppet master 
> you may

include foreman::params, foreman::config::enc, foreman::config::reports


What exactly does "If you just want to include the relavant bits to run on 
your puppet master you may" mean? Are those parameters what those with 
an existing Puppet master need to/should include? If so... where/when? 
Before running The Foreman Installer? In the *answers.yaml* file?

Thanks!

-Pablo

-- 
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] Nagios XI + Puppet?

2013-08-07 Thread Ryan Bowlby
Hi All,

I currently make use of Icinga (nagios fork) + Puppet for fully automated 
monitoring. It's worked great up to this point. I've recently been asked to 
integrate fine grained notifications support into icinga. I'm not entirely 
sure puppet manifests are the right place to manage contacts, contact 
groups, and their use within host and service definitions for notifications.

Has anyone made use of the puppet + Nagios XI? Would it be possible to 
manage notifications within the webUI while still using puppet for 
generating the host,hostgroup,service configs?

Pagerduty isn't an option for reasons I can't get into here.

Thanks,
Ryan

-- 
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: puppet master fails to set selinux context on /etc/puppet/auth.conf

2013-08-07 Thread Dan M
Mike

Thank you for solution.
Perhaps it would be useful to people facing same issue - full instruction 
set for CentOS looks like:

1. sudo vim /etc/selinux/targeted/contexts/files/file_contexts

Make sure that following line is there:
/etc/puppet(/.*)?   system_u:object_r:puppet_etc_t:s0

2. sudo restorecon -F -e /etc/puppet/puppet.conf 

3. Verify security context:
$> ls -l --context /etc/puppet/puppet.conf

Output should be something like 
-rw-r--r--. root root system_u:object_r:puppet_etc_t:s0 
/etc/puppet/puppet.conf

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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Newbie: Could not retrieve catalog from remote server: Error 400 on SERVER

2013-08-07 Thread Rilindo Foster
The syntax appears to be correct, from what I see. Being that this Apache 
module came from PuppetLabs, I think it is safe to assume that the module is 
robust. I would try to try enable full debugging on both the agent and the 
master. 

Also, on the agent, try to walk through the installation of Apache on the node. 
Sometimes what appears to be Puppet error is actually caused by the 
application. For example, I had an issue with nginx not starting up because of 
an error in the service code here:


class nginx::service (
  $svc = $nginx::params::svc,
) {
  
  service { $svc:
enable => true,
ensure => "running",
hasrestart => true,
hasstatus => true,
require => Class['nginx::install'],
  }
  
}


After verifying and modifying the code, I went and tried to start up nginx 
manually. Turns out that default configuration was missing a semi-colon on one 
of the lines. That caused nginx not to start - an error that wasn't exposed 
easily in the system log (where puppet usually logs by default). Fixing that 
misconfiguration resolved the nginx start problem. :)

- Rilindo

On Aug 6, 2013, at 5:29 PM, Dan M  wrote:

> In a simplified form, the issue occurs when "include" statement appears in 
> the script.
> For instance, below script executes just fine without .
> It still runs on the Master node (with warnings) with  but 
> fails on Agent node:
> 
> /biz/puppet/hieradata/devbranch/site.pp:
> node default {
> 
>   include apache
> 
>   file { "/etc/sudoers":
> owner => root, group => root, mode => 660
>   }
> }
> 
> Above site.pp executes on Master node:
> [me@ip-10-0-8-10 ~]$ sudo puppet apply --verbose 
> /biz/puppet/hieradata/devbranch/site.pp 
> Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/root_home.rb
> Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/pe_version.rb
> Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/facter_dot_d.rb
> Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/puppet_vardir.rb
> Info: Loading facts in /etc/puppet/modules/concat/lib/facter/concat_basedir.rb
> Warning: Could not retrieve fact fqdn
> Warning: Host is missing hostname and/or domain: ip-10-0-8-10
> Warning: Config file /etc/puppet/hiera.yaml not found, using Hiera defaults
> Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/root_home.rb
> Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/pe_version.rb
> Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/facter_dot_d.rb
> Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/puppet_vardir.rb
> Info: Loading facts in /etc/puppet/modules/concat/lib/facter/concat_basedir.rb
> Info: Applying configuration version '1375827325'
> Error: Could not start Service[httpd]: Execution of '/sbin/service httpd 
> start' returned 1: 
> Error: /Stage[main]/Apache/Service[httpd]/ensure: change from stopped to 
> running failed: Could not start Service[httpd]: Execution of '/sbin/service 
> httpd start' returned 1: 
> Notice: Finished catalog run in 4.04 seconds
> 
> But fails for the Agent node:
> [me@ip-10-0-8-11 puppet-skeleton]$ sudo puppet agent --test
> Info: Retrieving plugin
> Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
> Info: Loading facts in /var/lib/puppet/lib/facter/concat_basedir.rb
> Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb
> Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb
> Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
> Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
> syntax error on line 13, col 10: `' at 
> /biz/puppet/hieradata/devbranch/site.pp:3 on node ip-10-0-8-11
> Warning: Not using cache on failed catalog
> Error: Could not retrieve catalog; skipping run
> 
> 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.
> 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] Checking for the existence of a file

2013-08-07 Thread Ted Fiedler
I would like to check for the existence of a template file and if that 
template exists, use it otherwise move on. The file would obviously need to 
exist on the Puppet server, not the client. Here is my code.

$filetest = 
>> File.exists?("/etc/puppetlabs/puppet/modules/samba/templates/$hostname.erb") 
>>  
>
>
>> if $filetest == "true" {
>
>
>> file { '/etc/samba/smb.conf':
>
>notify  => Service["smb", "winbind"],
>
>replace => 'no',
>
>path => '/etc/samba/smb.conf',
>
>ensure => file,
>
>content => template("samba/smb.erb", 
>> "samba/${hostname}.erb"),
>
>require => Package["samba"],
>
> }
>
> } else {
>
>
>> file { '/etc/samba/smb.conf':
>
>notify  => Service["smb", "winbind"],
>
>replace => 'no',
>
>path => '/etc/samba/smb.conf',
>
>ensure => file,
>
>content => template("samba/smb.erb"),
>
>require => Package["samba"],
>
> }
>
> }
>
>
>  
I keep getting the error:

err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Syntax error at '.'; expected '}' at 
/etc/puppetlabs/puppet/modules/samba/manifests/init.pp:34 on node


when I run the following test, it seems to work fine, but if I modify my 
code above within puppet to use this, it fails also...

# cat test.rb 
> $test = 
> File.exists?("/etc/puppetlabs/puppet/modules/samba/templates/file.erb") 
> print $test
> # ruby test.rb 
> true


Any ideas?

A million thanks in advance

Ted

-- 
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] puppet and yum lock

2013-08-07 Thread Aaron Addleman
Hi Everyone,

I am having a problem with installing rpm packages on CentOS using yum. The 
problem is when another instance of yum is running and a lock is created my 
module that needs to install a package is unable to proceed.

This problem sounds like a really simple one to solve but I have not found 
any information on a solution.

Could someone point me in a direction?

Thanks in advance,
Aaron

-- 
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] Checking for the existence of a file

2013-08-07 Thread Ashley Penney
You cannot use ruby code in Puppet directly, which is why this isn't
working for you.

To do this you would need to write a "Puppet Function" as documented at
http://docs.puppetlabs.com/guides/custom_functions.html.  This would then
let you do something like:

if exists('/file') {

Functions always run on the master, not the agent, so this would then test
for the file on the master.


On Wed, Aug 7, 2013 at 1:20 PM, Ted Fiedler  wrote:

> I would like to check for the existence of a template file and if that
> template exists, use it otherwise move on. The file would obviously need to
> exist on the Puppet server, not the client. Here is my code.
>
> $filetest =
>>> File.exists?("/etc/puppetlabs/puppet/modules/samba/templates/$hostname.erb")
>>>
>>
>>
>>> if $filetest == "true" {
>>
>>
>>> file { '/etc/samba/smb.conf':
>>
>>notify  => Service["smb", "winbind"],
>>
>>replace => 'no',
>>
>>path => '/etc/samba/smb.conf',
>>
>>ensure => file,
>>
>>content => template("samba/smb.erb",
>>> "samba/${hostname}.erb"),
>>
>>require => Package["samba"],
>>
>> }
>>
>> } else {
>>
>>
>>> file { '/etc/samba/smb.conf':
>>
>>notify  => Service["smb", "winbind"],
>>
>>replace => 'no',
>>
>>path => '/etc/samba/smb.conf',
>>
>>ensure => file,
>>
>>content => template("samba/smb.erb"),
>>
>>require => Package["samba"],
>>
>> }
>>
>> }
>>
>>
>>
> I keep getting the error:
>
> err: Could not retrieve catalog from remote server: Error 400 on SERVER:
> Syntax error at '.'; expected '}' at
> /etc/puppetlabs/puppet/modules/samba/manifests/init.pp:34 on node
>
>
> when I run the following test, it seems to work fine, but if I modify my
> code above within puppet to use this, it fails also...
>
> # cat test.rb
>> $test =
>> File.exists?("/etc/puppetlabs/puppet/modules/samba/templates/file.erb")
>> print $test
>> # ruby test.rb
>> true
>
>
> Any ideas?
>
> A million thanks in advance
>
> Ted
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

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




[Puppet Users] Re: Newbie: Could not retrieve catalog from remote server: Error 400 on SERVER

2013-08-07 Thread Dan M
Hi John 

Thank you for helping me.
Today I have fixed several configuration issues of Master's start-up (such 
as SELinux warning, missing domain names, etc), however the problem with 
<*include 
apache*> persist.

To be on the safe side, I am running both Master and Agent from *sudo*. At 
the same time, I have added *puppet* user to *root* group (just to 
eliminate possibility of inaccessible paths):
[me@ip-10-0-8-11 puppet-skeleton]$ groups puppet
puppet : puppet root


Please, find Master debug log below:
[me@ip-10-0-8-10 ~]$ sudo puppet master --no-daemonize --debug



Notice: Starting Puppet master version 3.2.3
Info: Inserting default '~ ^/catalog/([^/]+)$' (auth true) ACL
Info: Inserting default '~ ^/node/([^/]+)$' (auth true) ACL
Info: Inserting default '/file' (auth ) ACL
Info: Inserting default '/certificate_revocation_list/ca' (auth true) ACL
Info: Inserting default '~ ^/report/([^/]+)$' (auth true) ACL
Info: Inserting default '/certificate/ca' (auth any) ACL
Info: Inserting default '/certificate/' (auth any) ACL
Info: Inserting default '/certificate_request' (auth any) ACL
Info: Inserting default '/status' (auth true) ACL
Info: Caching node for ip-10-0-8-11.sampup.com
Debug: No plugins found in subpath '/etc/puppet/modules/ntp/lib' (file / 
directory does not exist)
Debug: No plugins found in subpath '/biz/puppet/modules/role/lib' (file / 
directory does not exist)
Debug: No plugins found in subpath '/biz/puppet/modules/profile/lib' (file 
/ directory does not exist)
Debug: No plugins found in subpath '/biz/puppet/modules/README/lib' (file / 
directory does not exist)
Debug: No plugins found in subpath '/biz/puppet/modules/networking/lib' 
(file / directory does not exist)
Debug: No plugins found in subpath '/biz/puppet/modules/users/lib' (file / 
directory does not exist)
Info: Caching node for ip-10-0-8-11.sampup.com
Debug: importing '/biz/puppet/modules/role/manifests/init.pp' in 
environment devbranch
Debug: importing '/biz/puppet/modules/role/manifests/knox_portal.pp' in 
environment devbranch
Debug: Automatically imported role::knox_portal from role/knox_portal into 
devbranch
Debug: importing '/biz/puppet/modules/profile/manifests/init.pp' in 
environment devbranch
Debug: importing '/biz/puppet/modules/profile/manifests/base.pp' in 
environment devbranch
Debug: Automatically imported profile::base from profile/base into devbranch
Debug: importing '/biz/puppet/modules/networking/manifests/init.pp' in 
environment devbranch
Debug: Automatically imported networking from networking into devbranch
Debug: importing '/biz/puppet/modules/users/manifests/init.pp' in 
environment devbranch
Debug: Automatically imported users from users into devbranch
Debug: importing '/biz/puppet/modules/profile/manifests/web_server.pp' in 
environment devbranch
Debug: Automatically imported profile::web_server from profile/web_server 
into devbranch
Debug: importing '/etc/puppet/modules/apache/manifests/init.pp' in 
environment devbranch
Debug: Automatically imported apache from apache into devbranch
Debug: importing '/etc/puppet/modules/apache/manifests/params.pp' in 
environment devbranch
Debug: Automatically imported apache::params from apache/params into 
devbranch
Error: Puppet::Parser::AST::Resource failed with error ArgumentError: 
syntax error on line 13, col 10: `' at 
/biz/puppet/modules/profile/manifests/web_server.pp:3 on node 
ip-10-0-8-11.sampup.com
Error: Puppet::Parser::AST::Resource failed with error ArgumentError: 
syntax error on line 13, col 10: `' at 
/biz/puppet/modules/profile/manifests/web_server.pp:3 on node 
ip-10-0-8-11.sampup.com
Error: Puppet::Parser::AST::Resource failed with error ArgumentError: 
syntax error on line 13, col 10: `' at 
/biz/puppet/modules/profile/manifests/web_server.pp:3 on node 
ip-10-0-8-11.sampup.com
Debug: Finishing transaction 69970875958340
Debug: Received report to process from ip-10-0-8-11.sampup.com
Debug: Processing report from ip-10-0-8-11.sampup.com with processor 
Puppet::Reports::Store

Agent node log:
[me@ip-10-0-8-11 puppet-skeleton]$ sudo puppet agent --test
Info: Caching certificate for ip-10-0-8-11.sampup.com
Info: Caching certificate_revocation_list for ca
Info: Retrieving plugin
Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
Info: Loading facts in /var/lib/puppet/lib/facter/concat_basedir.rb
Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb
Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Puppet::Parser::AST::Resource failed with error ArgumentError: syntax error 
on line 13, col 10: `' at 
/biz/puppet/modules/profile/manifests/web_server.pp:3 on node 
ip-10-0-8-11.sampup.com
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

And the file in question:
[me@ip-10-0-8-10 puppet-skeleton]$ cat 
/biz/puppet/modules/profil

Re: [Puppet Users] Checking for the existence of a file

2013-08-07 Thread Rilindo Foster
This line here:

> content => template("samba/smb.erb", "samba/${hostname}.erb"),

What is your intention with having multiple .erb files per hostname? That might 
help us figure if there a different solution is warranted.

-Rilindo

On Aug 7, 2013, at 3:20 PM, Ted Fiedler  wrote:

> I would like to check for the existence of a template file and if that 
> template exists, use it otherwise move on. The file would obviously need to 
> exist on the Puppet server, not the client. Here is my code.
> 
> $filetest = 
> File.exists?("/etc/puppetlabs/puppet/modules/samba/templates/$hostname.erb")  
> 
> if $filetest == "true" {
> 
> file { '/etc/samba/smb.conf':
>notify  => Service["smb", "winbind"],
>replace => 'no',
>path => '/etc/samba/smb.conf',
>ensure => file,
>content => template("samba/smb.erb", 
> "samba/${hostname}.erb"),
>require => Package["samba"],
> }
> } else {
> 
> file { '/etc/samba/smb.conf':
>notify  => Service["smb", "winbind"],
>replace => 'no',
>path => '/etc/samba/smb.conf',
>ensure => file,
>content => template("samba/smb.erb"),
>require => Package["samba"],
> }
> }
> 
>  
> I keep getting the error:
> 
> err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
> Syntax error at '.'; expected '}' at 
> /etc/puppetlabs/puppet/modules/samba/manifests/init.pp:34 on node
> 
> 
> when I run the following test, it seems to work fine, but if I modify my code 
> above within puppet to use this, it fails also...
> 
> # cat test.rb 
> $test = 
> File.exists?("/etc/puppetlabs/puppet/modules/samba/templates/file.erb") 
> print $test
> # ruby test.rb 
> true
> 
> Any ideas?
> 
> A million thanks in advance
> 
> Ted
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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




[Puppet Users] Re: Newbie: Could not retrieve catalog from remote server: Error 400 on SERVER

2013-08-07 Thread Dan M
I think I have found the fix... and it looks a little bit magical... Ruby 
made...

I was able to solve the problem by removing */etc/puppet/manifests *folder.
It was empty at the moment of removal, but later on gets recreated by 
puppet. 
Anyway - Agent finally works as expected.

Also I have commented out *hiera_config* variable.
Here is my final *puppet.conf*:

[main]
server = ip-10-0-8-10.sampup.com
certname = ip-10-0-8-10.sampup.com

vardir = /var/lib/puppet
factpath = $vardir/lib/facter
templatedir = $confdir/templates

# The Puppet log directory.
# The default value is '$vardir/log'.
logdir = /var/log/puppet
 
# Where Puppet PID files are kept.
# The default value is '$vardir/run'.
rundir = /var/run/puppet
 
# Where SSL certificates are kept.
# The default value is '$confdir/ssl'.
ssldir = $vardir/ssl
 
#reports = store, http
#reporturl = http://ip-10-0-8-10:3000/reports/upload
 
[master]
dns_alt_names = ip-10-0-8-10.sampup.com, puppet

# overriding location of the hierra.yaml
# hiera_config = /biz/puppet/hiera/hiera.yaml

# site.pp path
manifest = /biz/puppet/hieradata/$environment/site.pp

# a multi-directory modulepath:
modulepath = 
/etc/puppet/modules:/usr/share/puppet/modules:/biz/puppet/modules

# site.pp path
manifest = /biz/puppet/hieradata/$environment/site.pp

[agent]
pluginsync = true

# The file in which puppetd stores a list of the classes
# associated with the retrieved configuratiion.  Can be loaded in
# the separate ``puppet`` executable using the ``--loadclasses``
# option.
# The default value is '$confdir/classes.txt'.
classfile = $vardir/classes.txt
 
# Where puppetd caches the local configuration.  An
# extension indicating the cache format is added automatically.
# The default value is '$confdir/localconfig'.
localconfig = $vardir/localconfig
 
certname = ip-10-0-8-11.sampup.com
dns_alt_names = ip-10-0-8-11.sampup.com

report = true
archive_files = true
environment = devbranch


-- 
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] The handy Grail of Modules Standards

2013-08-07 Thread Jakov Sosic

On 08/06/2013 01:17 AM, Alessandro Franceschi wrote:


That's quite nice, I like the reduced verbosity of the code and
essentiality of an all in one (init.pp)  location for resources.


Yeah, I don't like to partition my module if it's quite simple, as this 
one is.



For better reusability I'd provide a *_template option to manage the
templates of  all the different files you manage, leaving as the default
the currently hardcoded ones.


Yeah, if I decide to publish the module on forge I will for sure add 
those parameters too. We need to add Debian support in the house, and 
after that I will maybe publish it.


TSM is a commercial product, we have in-house RPM/DEB packages (because 
IBM provided ones are total shit), so without that packages module is 
kinda useful.


This was my attempt to make the 'sample' module for our team to look at 
when they code their own.




Also the backup_status and archive_status arguments follow an approach
that ... erm.. was revisited in the current version of the  "ongoing
standard".


Can you point me to the revisited approach? I really like the current one :D



--
Jakov Sosic
www.srce.unizg.hr

--
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] introducing puppetboard 0.0.1

2013-08-07 Thread Erik Dalén
Cool stuff will try it out. I think we might have some Python projects at
work that would be interested in using the pypuppetdb library as well.


On 7 August 2013 14:47, Daniele Sluijters wrote:

> Hello everyone,
>
>
> It’s a lovely grey and rainy day here in the Dutch summer, as good a day
> as any to release a new little project.
>
>
> Its name is Puppetboard and has as aim to replace Puppet Dashboard’s
> reporting functionality. It does not nor will it include ENC features. It
> does all this without storing any data itself but querying PuppetDB instead.
>
>
> The whole thing is built in Python and relies on Flask and WTForms. The
> communication logic has been split of in its own library called pypuppetdb
> which makes heavy use of the requests library. The interface is powered by
> Twitter Bootstrap with the Flatly theme.
>
>
> Though I’ve pushed all the code out and made it public it’s all very young
> but it works fairly well. However, I’ve committed numerous barbarities in
> the code just to get things working and to figure out how to handle certain
> things. For the foreseeable time in the future I’ll be working on cleaning
> all this up and figuring out what I can do on my side and on PuppetDB’s
> side to make all this work a little better. Especially when it comes to
> dealing with big responses from PuppetDB...
>
>
> This is the first time I’m open sourcing a project so that too is all new
> to me. I’d welcome the feedback and if someone feels brave enough even
> commits on the projects but try and be gentle about it :-). I’ll also be at
> PuppetConf including the Developer Day so feel free to reach out to me in
> person.
>
>
> To the code:
>
>
>  * puppetboard: https://github.com/nedap/puppetboard
>
>  * pypuppetdb:  https://github.com/nedap/pypuppetdb
>
>
> I realise that puppetboard doesn't have a test suite right now but it will
> soon. In order to do so I have to restructure a few things about it first.
> The installation documentation will improve with it.
>
>
> Pypuppetdb's test suite will be expanding the coming days once I'm done
> mocking the HTTP requests _query() makes and manage to get a decent and big
> enough set of test data to feed into PuppetDB. This will allow me to run
> integration tests and benchmark certain changes I have in mind.
>
>
> I’m hoping to be able to get a release out every month with improvements
> to both projects, perhaps even faster in the beginning but it remains to be
> seen how much time I’ll be able to spend on it.
>
>
> A special thanks goes out to Ken Barber for helping out with all things
> PuppetDB and coming up with a way to run PuppetDB on Travis so we can run
> integration tests. Hunter, thank you for being so interested in this
> project and pushing me to release it.
>
>
> —
>
> Daniele Sluijters
>
> Nedap | Steppingstone
>
> --
> 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.
>
>
>



-- 
Erik Dalén

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