Re: [Puppet Users] Re: Service refresh gets scheduled and swp files

2013-09-25 Thread Sneha More
Hi, Add purge = true in your file resouce. You can try this :- file {/etc/nginx/: source = puppet:///files/nginx/nginx/, ensure = directory, recurse = true, purge = true, require = Package['nginx'], } This will manage the deletion of files on client if you delete file on server. Thanks

[Puppet Users] Re: Painful packages

2013-09-25 Thread Rahul Khengare
Hi LenR, You do not required to uninstalled the package if you want to upgrade it. Puppet package resource automatically upgrade/install the* latest version package* present in the yum repos, if you specify ensure = 'latest'. You can also specify the package version along with name and make

[Puppet Users] Re: enablerepo option

2013-09-25 Thread puppetstan
Hi Sneha Thanks a lot for your configuration but this solution is only good if i know latest version, but if i know, i'm oblige to modify all the time the configuration when there a new version but if i don't know latest version this solution is not possible... An other idea is modifiy repo

Re: [Puppet Users] Re: enablerepo option

2013-09-25 Thread Sneha More
Hi, exec { 'fusioninventory-agent': command = 'yum -y install fusioninventory-agent --enablerepo=epel', path = '/usr/bin', } An other idea is modifiy repo and change enabled=0 by enabled=1 and after install or update modify enabled=0 by enabled=1 ? Your opinion? Regards and

[Puppet Users] Puppet 3 class autoloading not working?

2013-09-25 Thread Steven James
Hi, I've just updated some modules that worked fine in Puppet 2.8, to v3.0.1. I'm struggling to get class autoloading working for some reason, and I wonder if someone can help? My main class is as follows; cat /etc/puppetlabs/puppet/environments/production/blah_soe/manifests/init.pp class

[Puppet Users] Noob question about the ${name} variable

2013-09-25 Thread John Simpson
Greetings. When defining a file resource, why does the ${name} variable sometimes expand to the filename being maintained, and sometimes to the module name? Examples (in a module which, for simplicity, we will call apache) ... file { '/etc/httpd/conf/httpd.conf' : ensure = file ,

Re: [Puppet Users] Noob question about the ${name} variable

2013-09-25 Thread Brian Lalor
On Sep 25, 2013, at 8:12 AM, John Simpson j...@voalte.com wrote: file { '/etc/httpd/conf.d/ssl.conf' : ensure = file , content = template ( ${module_name}{$name}.erb ) , } Here $name expands to apache, so the filename passed to template() is apacheapache.erb, rather than the

[Puppet Users] Re: Noob question about the ${name} variable

2013-09-25 Thread Rahul Khengare
file { '/etc/httpd/conf.d/ssl.conf' : ensure = file , content = template ( ${module_name}{$name}.erb ) , } Here $name expands to apache, so the filename passed to template() is apacheapache.erb, rather than the expected and desired value

Re: [Puppet Users] Noob question about the ${name} variable

2013-09-25 Thread John Simpson
On 2013-09-25, at 0819, Brian Lalor bla...@bravo5.org wrote: On Sep 25, 2013, at 8:12 AM, John Simpson j...@voalte.com wrote: file { '/etc/httpd/conf.d/ssl.conf' : ensure = file , content = template ( ${module_name}{$name}.erb ) , } Here $name expands to apache, so the filename

Re: [Puppet Users] Re: Puppet requires second run to execute some catalog items.

2013-09-25 Thread Sam Tresler
Precisely. Aptitude is the culprit here. I've switched our package manager to apt which is more conservative and it does not remove the packages when upgrading php, which, for now is a workable solution. I need to find the time to put this in as Debian bug and see what they say. I can't see

Re: [Puppet Users] Re: Puppet requires second run to execute some catalog items.

2013-09-25 Thread Sam Tresler
Precisely. Aptitude is the culprit here. I've switched our package manager to apt which is more conservative and it does not remove the packages when upgrading php, which, for now is a workable solution. I need to find the time to put this in as Debian bug and see what they say. I can't see

Re: [Puppet Users] Re: Puppetdb [io.nio] javax.net.ssl.SSLHandshakeException: null cert chain

2013-09-25 Thread Ken Barber
So I've been trying to get to the bottom of this one for a while, but haven't found anyone who is being affected to work with me properly since it first occured to get to the bottom of the problem. If you want to jump on Freenode IRC and contact me: ken_barber we can talk further. This problem is

Re: [Puppet Users] What's the best practice to manage software updates using puppet ?

2013-09-25 Thread Chris McDermott
I haven't found a solution that I'm totally happy with either, but what I've done in a few cases is specify particular versions with ensure. Like this: $varnish_version = $::environment ? { 'dev' = '3.0.4-1.el6', 'staging = '3.0.4-1.el6', 'prod' = '3.0.3-1.el6', } package {

[Puppet Users] Re: Painful packages

2013-09-25 Thread jcbollinger
On Tuesday, September 24, 2013 10:30:54 PM UTC-5, LenR wrote: I need to upgrade a package, but it's later versions are packaged differently, can I do something like package { zabbix-agent.1.8.15: ensure = absent } some repo ensured present... package {zabbix-agent, zabbix-sender,

[Puppet Users] Puppet + uwsgi-plugin-rack-ruby anyone?

2013-09-25 Thread Roman
Hi, is anyone using the combination of uwsgi-plugin-rack-ruby with nginx and puppet? I had Nginx+Passenger running fine before, but now there seems to be a permissions-problem: Nginx is relaying everything to the uwsgi-process: /etc/nginx/sites-enabled/puppet: server { ---snip--- root

[Puppet Users] Managing Duplicate PuppetLabs' modules and Community Involvement (puppetlabs/passenger puppetlabs/apache)

2013-09-25 Thread Brendan Murtagh
My reasoning for creating this post is two-fold. Currently there is two development efforts in progress for a common application. The community will benefit from having a combined effort in one place for development, bug reports, and future improvements. The second case is that both the

Re: [Puppet Users] symlink creation using facter, but facter is nil at first run.

2013-09-25 Thread Frederiko Costa
Hi Chris, Thanks for your help. Yes, that's pretty much the approach I took. The only thing I changed was that my facter looks at the yum repo to strip out the version and returns the version. So, there will have a value, even if jdk is not yet installed. Previously, I was stripping out the

[Puppet Users] Re: Puppet 3 class autoloading not working?

2013-09-25 Thread jcbollinger
On Wednesday, September 25, 2013 6:07:56 AM UTC-5, Steven James wrote: Hi, I've just updated some modules that worked fine in Puppet 2.8, to v3.0.1. I'm struggling to get class autoloading working for some reason, and I wonder if someone can help? Autoloading refers to a mechanism by

[Puppet Users] Puppet::Util::CommandLine not working after upgrade from 2.7.x to 3.x

2013-09-25 Thread Dario Duvnjak
I'm working with an mcollective agent that basically does `puppet apply` on nodes. This is the code snippet (ruby) which worked on puppet 2.7.x: cmd_line = [ apply, -l, log_file_path, -d, --report, true, --reports,

Re: [Puppet Users] What's the best practice to manage software updates using puppet ?

2013-09-25 Thread Frederiko Costa
What I particularly do is to make sure that every module has the $package_ensure class parameter set to 'present' by default. If I want a particular version, then I tell when I instantiate the class. One example would be: class a($package_ensure = 'present') { package { 'whatever-a' :

[Puppet Users] Re: What's the best practice to manage software updates using puppet ?

2013-09-25 Thread jcbollinger
On Tuesday, September 24, 2013 3:31:10 PM UTC-5, François Chenais wrote: Hello, I got many classes, using the well known template ... package ensure = XXX notify = service file require = package notify = service service require = File, Package

Re: [Puppet Users] Re: Puppet requires second run to execute some catalog items.

2013-09-25 Thread jcbollinger
On Wednesday, September 25, 2013 8:17:42 AM UTC-5, Sam Tresler wrote: Precisely. Aptitude is the culprit here. I've switched our package manager to apt which is more conservative and it does not remove the packages when upgrading php, which, for now is a workable solution. I need to find

Re: [Puppet Users] Retrieving Hiera arrays from init.pp

2013-09-25 Thread jcbollinger
On Tuesday, September 24, 2013 11:07:59 PM UTC-5, mcd wrote: I'm confused at your snippets because they don't seem right. For instance, you show: #log_special::log_vars: test $log_vars=log_vars, But that doesn't look syntactically correct... I'm pretty sure that would fail to compile.

[Puppet Users] Re: What's the best practice to manage software updates using puppet ?

2013-09-25 Thread phundisk
For me, when I was deciding to manage updates, there were two options for me. 1. Set everything to ensure latest and only use clones of centos/redhat repos for different environments such as QA, and production. The downside of here is that you need to manage every package in puppet, you will

Re: [Puppet Users] puppetdb query result exceeding the default of 20000, only 14 nodes should it be?

2013-09-25 Thread Matthew Arguin
Thanks Ken. Looking at my Dashboard i show about 13K resources with about 23% duplication. Does that sound reasonable for 14 nodes? JVM Heap bytes 317M400M300M500M Nodes in the population 14 Resources in the population 12,559 Resource duplication % of resources stored 23.3% Catalog duplication

[Puppet Users] Facts distributed via module missing when Puppet is run out of a cron job

2013-09-25 Thread Chadwick Banning
Hi all, I have the following fact to get the full path of the Puppet executable being distributed via a module: Facter.add(puppet_executable) do setcode do Facter::Util::Resolution.exec('/usr/bin/which puppet') end end This fact is used to set the command attribute of the cron job

Re: [Puppet Users] Re: Painful packages

2013-09-25 Thread Len Rugen
That is correct, normally... this one won't upgrade via yum due to dependencies, puppet isn't the problem, but I think it's going to be the solution :-) On Wed, Sep 25, 2013 at 2:06 AM, Rahul Khengare rahulk1...@gmail.comwrote: Hi LenR, You do not required to uninstalled the package if

Re: [Puppet Users] Facts distributed via module missing when Puppet is run out of a cron job

2013-09-25 Thread Ramin K
man which DESCRIPTION which returns the pathnames of the files (or links) which would be executed in the current environment, had its arguments been given as commands in a strictly POSIX-conformant shell. It does this by searching the PATH for executable files matching the names of

Re: [Puppet Users] Re: Incorrect return code for failed exec

2013-09-25 Thread Rob Reynolds
Just an update, I found this issue was a duplicate of https://projects.puppetlabs.com/issues/19033. Please vote up that issue and/or watch that issue for further developments. On Mon, Sep 16, 2013 at 2:12 PM, Igor Berger codewiz...@gmail.com wrote: Done:

[Puppet Users] how can I test and fix all cert and puppetdb requirements

2013-09-25 Thread Anup Singh
Info: Retrieving plugin Error: /File[/var/lib/puppet/lib]: Failed to generate additional resources using 'eval_generate: Connection refused - connect(2) Error: /File[/var/lib/puppet/lib]: Could not evaluate: Connection refused - connect(2) Could not retrieve file metadata for

Re: [Puppet Users] puppetdb query result exceeding the default of 20000, only 14 nodes should it be?

2013-09-25 Thread Christopher Wood
On Wed, Sep 25, 2013 at 02:25:50PM +0100, Ken Barber wrote: (SNIP) http://puppetdb1.vm:8080/dashboard/index.html. Since Puppet doesn't put a limit on # of resources per node, its hard to say if your case is a problem somewhere. It does however sound exceptional but not unlikely (I've seen