Re: [Puppet Users] Announce: Puppet-Agent 1.2.4, Puppet 4.2.2, Facter 3.1.0

2015-09-18 Thread Dirk Heinrichs
Am 18.09.2015 um 07:56 schrieb Dirk Heinrichs:

> Am 17.09.2015 um 16:03 schrieb Rob Reynolds:
>
>> It /can/ work, it's just not deterministic. As you are seeing.
>
> That's not what I'm seeing. I'm seeing that it HAS worked fine on
> Windows 2008 for the past 2 years or so (and still does), but doesn't
> on Windows 2012.

I'm also seeing that it's not a problem DURING upgrade, but a problem
STARTING the installer (at least according to the error message).

Bye...

Dirk
-- 

*Dirk Heinrichs*, Senior Systems Engineer, Engineering Solutions
*Recommind GmbH*, Von-Liebig-Straße 1, 53359 Rheinbach
*Tel*: +49 2226 159 (Ansage) 1149
*Email*: d...@recommind.com 
*Skype*: dirk.heinrichs.recommind
www.recommind.com 

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


Re: [Puppet Users] Some environments not working in puppet

2015-09-18 Thread Vishal Goel
When I kill it and restart the puppetmaster, it is again created. And how 
do i make sure that only passenger/ruby webrick runs the puppetmaster?

On Friday, September 18, 2015 at 1:40:22 PM UTC+5:30, Martin Alfke wrote:
>
>
> On 18 Sep 2015, at 09:49, Vishal Goel  
> wrote: 
>
> > Yes, I always restart puppetmaster after adding a new environment or 
> doing any changes in code for that matter. 
> > 
> > Also, below are the two processes that are running on the puppetmaster 
> (used ps -ef | grep puppet ) 
> > puppet   29247 1  0 12:27 ?00:00:00 Rack: 
> /usr/share/puppet/rack/puppetmasterd 
> This is the passenger process 
> > 
>   
> > 
> > puppet   30130 1  0 12:29 ?00:00:05 /usr/bin/ruby1.8 
> /usr/bin/puppet master 
> This is the ruby webrick process. Kill this one! 
>
> > 
> > 
> > 
> > Maybe the problem is with them? 
> > 
> > 
> > On Friday, September 18, 2015 at 1:02:48 PM UTC+5:30, Martin Alfke 
> wrote: 
> > 
> > On 18 Sep 2015, at 09:24, Vishal Goel  wrote: 
> > 
> > > I am experiencing a very strange error in puppet. I have around 4-5 
> environments in my puppet codebase and whenever i add a new environment, it 
> doesn't work. Even thought the code of new environment added is almost 
> similar, it doesn't work. 
> > 
> > Have you restarted the puppet master process after adding the static 
> environment? 
> > Maybe you want to have a look at environment path setting in puppet 
> > 
> https://docs.puppetlabs.com/puppet/3.8/reference/environments_configuring.html
>  
> > 
> > > 
> > > Below is my puppet.conf file: 
> > > 
> > > [main] 
> > > logdir=/var/log/puppet 
> > > vardir=/var/lib/puppet 
> > > ssldir=/var/lib/puppet/ssl 
> > > rundir=/var/run/puppet 
> > > factpath=$vardir/lib/facter 
> > > templatedir=$confdir/templates 
> > > pluginsync=true 
> > > masterport=8141 
> > > 
> > > [master] 
> > > reports = store 
> > > environment_timeout = unlimited 
> > > autosign = true 
> > > 
> > > [newdcdeploy] 
> > > modulepath = $confdir/modules 
> > > manifest = $confdir/environments/newdcdeploy/manifests/site.pp 
> > > 
> > > [newdcalerts] 
> > > modulepath = $confdir/modules 
> > > manifest = $confdir/environments/newdcalerts/manifests/site.pp 
> > > 
> > > So, newdcdeploy is working and newdcalerts is not. And both have exact 
> same tree directory and content in files, only the names of environment are 
> different. Am I missing something here? 
> > > 
> > > -- 
> > > You received this message because you are subscribed to the Google 
> Groups "Puppet Users" group. 
> > > To unsubscribe from this group and stop receiving emails from it, send 
> an email to puppet-users...@googlegroups.com. 
> > > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/a11ba4c8-f871-4d76-85fc-99a1948fcc7a%40googlegroups.com.
>  
>
> > > For more options, visit https://groups.google.com/d/optout. 
> > 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "Puppet Users" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to puppet-users...@googlegroups.com . 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/7828482b-22ea-438e-b136-2125193b2f59%40googlegroups.com.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>
>

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


Re: [Puppet Users] Some environments not working in puppet

2015-09-18 Thread Martin Alfke

On 18 Sep 2015, at 10:53, Vishal Goel  wrote:

> When I kill it and restart the puppetmaster, it is again created. And how do 
> i make sure that only passenger/ruby webrick runs the puppet master?

service puppetmaster will start the ruby process
This is the one you want to disable.

service apache|nginx|httpd will start the passenger rack application.
The web server name depends on
- which web server
- which distribution


> 
> On Friday, September 18, 2015 at 1:40:22 PM UTC+5:30, Martin Alfke wrote:
> 
> On 18 Sep 2015, at 09:49, Vishal Goel  wrote: 
> 
> > Yes, I always restart puppetmaster after adding a new environment or doing 
> > any changes in code for that matter. 
> > 
> > Also, below are the two processes that are running on the puppetmaster 
> > (used ps -ef | grep puppet ) 
> > puppet   29247 1  0 12:27 ?00:00:00 Rack: 
> > /usr/share/puppet/rack/puppetmasterd 
> This is the passenger process 
> > 
> >   
> > 
> > puppet   30130 1  0 12:29 ?00:00:05 /usr/bin/ruby1.8 
> > /usr/bin/puppet master 
> This is the ruby webrick process. Kill this one! 
> 
> > 
> > 
> > 
> > Maybe the problem is with them? 
> > 
> > 
> > On Friday, September 18, 2015 at 1:02:48 PM UTC+5:30, Martin Alfke wrote: 
> > 
> > On 18 Sep 2015, at 09:24, Vishal Goel  wrote: 
> > 
> > > I am experiencing a very strange error in puppet. I have around 4-5 
> > > environments in my puppet codebase and whenever i add a new environment, 
> > > it doesn't work. Even thought the code of new environment added is almost 
> > > similar, it doesn't work. 
> > 
> > Have you restarted the puppet master process after adding the static 
> > environment? 
> > Maybe you want to have a look at environment path setting in puppet 
> > https://docs.puppetlabs.com/puppet/3.8/reference/environments_configuring.html
> >  
> > 
> > > 
> > > Below is my puppet.conf file: 
> > > 
> > > [main] 
> > > logdir=/var/log/puppet 
> > > vardir=/var/lib/puppet 
> > > ssldir=/var/lib/puppet/ssl 
> > > rundir=/var/run/puppet 
> > > factpath=$vardir/lib/facter 
> > > templatedir=$confdir/templates 
> > > pluginsync=true 
> > > masterport=8141 
> > > 
> > > [master] 
> > > reports = store 
> > > environment_timeout = unlimited 
> > > autosign = true 
> > > 
> > > [newdcdeploy] 
> > > modulepath = $confdir/modules 
> > > manifest = $confdir/environments/newdcdeploy/manifests/site.pp 
> > > 
> > > [newdcalerts] 
> > > modulepath = $confdir/modules 
> > > manifest = $confdir/environments/newdcalerts/manifests/site.pp 
> > > 
> > > So, newdcdeploy is working and newdcalerts is not. And both have exact 
> > > same tree directory and content in files, only the names of environment 
> > > are different. Am I missing something here? 
> > > 
> > > -- 
> > > You received this message because you are subscribed to the Google Groups 
> > > "Puppet Users" group. 
> > > To unsubscribe from this group and stop receiving emails from it, send an 
> > > email to puppet-users...@googlegroups.com. 
> > > To view this discussion on the web visit 
> > > https://groups.google.com/d/msgid/puppet-users/a11ba4c8-f871-4d76-85fc-99a1948fcc7a%40googlegroups.com.
> > >  
> > > For more options, visit https://groups.google.com/d/optout. 
> > 
> > 
> > -- 
> > You received this message because you are subscribed to the Google Groups 
> > "Puppet Users" group. 
> > To unsubscribe from this group and stop receiving emails from it, send an 
> > email to puppet-users...@googlegroups.com. 
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msgid/puppet-users/7828482b-22ea-438e-b136-2125193b2f59%40googlegroups.com.
> >  
> > For more options, visit https://groups.google.com/d/optout. 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/a31eadf9-c400-4a2c-86e5-848702e78af1%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

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


Re: [Puppet Users] Some environments not working in puppet

2015-09-18 Thread Martin Alfke

On 18 Sep 2015, at 09:24, Vishal Goel  wrote:

> I am experiencing a very strange error in puppet. I have around 4-5 
> environments in my puppet codebase and whenever i add a new environment, it 
> doesn't work. Even thought the code of new environment added is almost 
> similar, it doesn't work.

Have you restarted the puppet master process after adding the static 
environment?
Maybe you want to have a look at environment path setting in puppet
https://docs.puppetlabs.com/puppet/3.8/reference/environments_configuring.html

> 
> Below is my puppet.conf file:
> 
> [main]
> logdir=/var/log/puppet
> vardir=/var/lib/puppet
> ssldir=/var/lib/puppet/ssl
> rundir=/var/run/puppet
> factpath=$vardir/lib/facter
> templatedir=$confdir/templates
> pluginsync=true
> masterport=8141
> 
> [master]
> reports = store
> environment_timeout = unlimited
> autosign = true
> 
> [newdcdeploy]
> modulepath = $confdir/modules
> manifest = $confdir/environments/newdcdeploy/manifests/site.pp
> 
> [newdcalerts]
> modulepath = $confdir/modules
> manifest = $confdir/environments/newdcalerts/manifests/site.pp
> 
> So, newdcdeploy is working and newdcalerts is not. And both have exact same 
> tree directory and content in files, only the names of environment are 
> different. Am I missing something here?
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/a11ba4c8-f871-4d76-85fc-99a1948fcc7a%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

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


[Puppet Users] Some environments not working in puppet

2015-09-18 Thread Vishal Goel
I am experiencing a very strange error in puppet. I have around 4-5 
environments in my puppet codebase and whenever i add a new environment, it 
doesn't work. Even thought the code of new environment added is almost 
similar, it doesn't work.

Below is my puppet.conf file:

[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
templatedir=$confdir/templates
pluginsync=true
masterport=8141

[master]
reports = store
environment_timeout = unlimited
autosign = true

[newdcdeploy]
modulepath = $confdir/modules
manifest = $confdir/environments/newdcdeploy/manifests/site.pp

[newdcalerts]
modulepath = $confdir/modules
manifest = $confdir/environments/newdcalerts/manifests/site.pp

So, newdcdeploy is working and newdcalerts is not. And both have exact same 
tree directory and content in files, only the names of environment are 
different. Am I missing something here?

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


Re: [Puppet Users] puppetserver error: no such file to load -- pg on node puppetmaster1

2015-09-18 Thread Martin Alfke

On 18 Sep 2015, at 04:08, rhpuppetu...@gmail.com wrote:

> Our puppet master used to run using apache passenger stack. We've recently 
> migrated from passenger to puppetserver. When i run puppet agent -vt on my 
> client, its showing the following error. 
> 
> Error 400 on server : could not autoload 
> puppet/parser/functions/get_location: no such file to load -- pg on node 
> puppetmaster1
> 
> puppet master --version : 3.7.5
> ruby --version : 1.8.7 patch level 374-2
> -
> #cat puppet/parser/functions/get_location.rb
> require 'rubygems'
> require 'pg'
> require ‘resolv'

It seems as if you are missing the pg ruby gem within puppet server:
sudo puppetserver gem install pg --no-ri --no-rdoc
see: 
https://github.com/puppetlabs/puppet-server/blob/master/documentation/gems.markdown

Best,
Martin

> 
> module Puppet::Parser::Funtions
> 
> xx
> -
> 
> I would appreciate if someone help me fixing this issue.
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/e86265cf-cf4b-4b92-9657-64d5137adf59%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

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


Re: [Puppet Users] Some environments not working in puppet

2015-09-18 Thread Vishal Goel
Yes, I always restart puppetmaster after adding a new environment or doing 
any changes in code for that matter.

Also, below are the two processes that are running on the puppetmaster 
(used ps -ef | grep puppet )

puppet   29247 1  0 12:27 ?00:00:00 Rack: 
/usr/share/puppet/rack/puppetmasterd   
 

puppet   30130 1  0 12:29 ?00:00:05 /usr/bin/ruby1.8 
/usr/bin/puppet master


Maybe the problem is with them?

On Friday, September 18, 2015 at 1:02:48 PM UTC+5:30, Martin Alfke wrote:
>
>
> On 18 Sep 2015, at 09:24, Vishal Goel  
> wrote: 
>
> > I am experiencing a very strange error in puppet. I have around 4-5 
> environments in my puppet codebase and whenever i add a new environment, it 
> doesn't work. Even thought the code of new environment added is almost 
> similar, it doesn't work. 
>
> Have you restarted the puppet master process after adding the static 
> environment? 
> Maybe you want to have a look at environment path setting in puppet 
>
> https://docs.puppetlabs.com/puppet/3.8/reference/environments_configuring.html
>  
>
> > 
> > Below is my puppet.conf file: 
> > 
> > [main] 
> > logdir=/var/log/puppet 
> > vardir=/var/lib/puppet 
> > ssldir=/var/lib/puppet/ssl 
> > rundir=/var/run/puppet 
> > factpath=$vardir/lib/facter 
> > templatedir=$confdir/templates 
> > pluginsync=true 
> > masterport=8141 
> > 
> > [master] 
> > reports = store 
> > environment_timeout = unlimited 
> > autosign = true 
> > 
> > [newdcdeploy] 
> > modulepath = $confdir/modules 
> > manifest = $confdir/environments/newdcdeploy/manifests/site.pp 
> > 
> > [newdcalerts] 
> > modulepath = $confdir/modules 
> > manifest = $confdir/environments/newdcalerts/manifests/site.pp 
> > 
> > So, newdcdeploy is working and newdcalerts is not. And both have exact 
> same tree directory and content in files, only the names of environment are 
> different. Am I missing something here? 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "Puppet Users" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to puppet-users...@googlegroups.com . 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/a11ba4c8-f871-4d76-85fc-99a1948fcc7a%40googlegroups.com.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/7828482b-22ea-438e-b136-2125193b2f59%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Package install_options

2015-09-18 Thread Garrett Honeycutt
On 9/18/15 1:55 PM, Alexander Dacre wrote:
> Hi,
> 
> I'm having some difficulty with specifying a nogpgcheck option when
> installing custom RPM packages via Puppet. The problem is that the
> install_options do not get picked up by the agent.
> 
> I've tried the following syntax:
> 
> package { blah:
>   ensure => latest,
>   install_options => [ '--nogpgcheck'],
> }
> 
> package { blah:
>   ensure => latest,
>   install_options => '--nogpgcheck',
> }
> 
> But the client just doesn't pick it up and the run fails due to the
> package not being signed.
> 
> Any suggestions?
> 
> Thanks,
> A
> 


Hi,

Suggest signing the packages ;>

But in efforts to help with your Puppet configuration, it seems that the
provider might not understand the install option. What messages do you
get when running with --debug? What type of system is this? Which
package system are you using?

Best regards,
-g

-- 
Garrett Honeycutt
@learnpuppet
Puppet Training with LearnPuppet.com
Mobile: +1.206.414.8658

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


[Puppet Users] Hiera lookup function doesnt fail if attr isnt found

2015-09-18 Thread Joao Morais


Hello list. I am using the hiera() lookup function in order to query 
some few attributes from a http backend. Something like this:


   common.yaml
   ---
   ...
   class::attr: "%{hiera('other::attr')}"

This works very well if other::attr is defined, but an empty string is 
returned in the lookup above if the other::attr isn't found. The hiera() 
function on the manifest fails the compilation if I do the same query, 
which is what I'd expect from the lookup above.


Is there a way to enforce the declaration of the other::attr when using 
hiera() lookup function inside the hieradata?


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


[Puppet Users] Re: puppet cert clean unrevokes old revoked certs?

2015-09-18 Thread jcbollinger


On Thursday, September 17, 2015 at 7:27:59 AM UTC-5, Kostis Fardelas wrote:
>
> Hi,
> I revoke a host cert:
> puppet cert --revoke host1.example.com
>
> I verify that the host1 cert was added to the crl, restarted puppetmaster 
> and the client is indeed banned.
>
> I clean another's host cert:
> puppet cert --clean host2.example.com
>
> I verify that host1 cert was REMOVED from crl and host2 cert was added to 
> it.
>
> Now host1 can run puppet and host2 cannot. Does this sound like a bug to 
> you or a misconfiguration?
>
>

It sounds like a bug to me.  Even if the issue could be traced back to 
configuration (which I doubt), under no circumstances should *any* 
configuration or misconfiguration lead to 'puppet cert' removing a cert 
from the CRL under any circumstances.


John

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


Re: [Puppet Users] Puppet method to subtract two arrays?

2015-09-18 Thread Sean
My woes were definitely due to the data in the parameters being treated as 
strings throughout.  Basically, for whatever reason even when using 
any2array(), the issue came down to all the desired individual elements 
were being treated as a single string that became element 0 of an array...

Effectively:
$whitelist = [ 'foo::a, foo::b, foo::c, foo::d, foo::e', ]
$blacklist = [ 'foo::c, foo::e', ]

It's possible that whitelist was not, but I can confirm that blacklist 
(sent to puppet via ENC) was indeed a string, that any2array converted to a 
single element array.  I have coerced the datatype in the ENC using 
Foreman's SmartClass parameter override, and am now getting the correct 
results.

I also converted the inline template into a custom function to avoid having 
to use any2array.

On Thursday, September 17, 2015 at 4:16:16 PM UTC-4, Sean wrote:
>
> Hi Peter,
>
> Thanks for that!  I must have lost the = in translation from the old post, 
> I appreciate you 2nd set of eyes.  Now that I'm passed that and have data 
> in the result, I've only graduated to having incorrect results.  I had used 
> the any2array function to ensure the array status of the template output 
> and the blacklist param.  The blacklist param will be delivered from and 
> ENC (specifically Foreman), and while it should work, I've had issues in 
> the past with arrays and hashes being taken as strings.  That said, here's 
> what I see now:
>
> $whitelist = [ foo::a, foo::b, foo::c, foo::d, foo::e ]
> $blacklist = [ foo::c, foo::e ]
>
> < apply corrected code, sending notifies for $whitelist, $blacklist, and 
> $include_list >
>
> The notify outputs show that $include_list is identical to $whitelist.  If 
> I actually attempt the include $include_list statement (which is usually 
> commented) I get duplicate resource definition errors since the blacklisted 
> classes create resources like package { 'apache': ensure => absent } and 
> the node's purpose might include being a webserver so we have another class 
> which manages the package resource for apache.
>
> I've experimented with the parameter from the ENC, and how I define 
> whitelist in params.pp.  I have tried several experiments with quoting the 
> array elements, with singles, with doubles, not quoting the elements, and 
> even defining them as strings, and allowing any2array to convert them 
> before the template.  The outputs are different each time, but the result 
> is the same.  The blacklist items still appear in the end result.
>
> FWIW, I'm running puppet 3.6.2 on the agent and 3.8.2 on the master, I 
> assume you refer to current as the version 4 tree.  
>
>
>
> On Thursday, September 17, 2015 at 3:15:37 PM UTC-4, Peter Huene wrote:
>>
>> Hi Sean,
>>
>> On Thu, Sep 17, 2015 at 12:01 PM, Sean  wrote:
>>
>>> Hello,
>>>
>>> I have been working on trying to drive an include statement with an 
>>> array parameter.
>>>
>>> The idea looks like so (in pseudo code) :
>>>
>>>
>>> class foo( $whitelist = $::foo::params::whitelist, $blacklist = [],) {
>>>
>>>   $include_list = inline_template( "<% @whitelist - @blacklist %>" ) 
>>>   validate_array($include_list)
>>>   include $include_list
>>>
>>> }
>>>
>>> I picked up that inline template from a message in the group dating back 
>>> to 2011.
>>>
>>
>> The template is missing a '=' character to write the result, like so:
>>
>> <%= @whitelist - @blacklist %>
>>
>> However, this will return a string-ified version of the array and is not 
>> what you want as include will treat it as a single class name.
>>
>> In the current version of the Puppet language, two arrays can simply be 
>> subtracted from one another:
>>
>> $whitelist = [foo, bar, baz]
>> $blacklist = [bar]
>> include $whitelist - $blacklist
>>
>> This would include "foo" and "baz", but not "bar".
>>
>>
>>> Basically, class foo has a ton of subclasses who's names populate the 
>>> default value for $whitelist.  Normally all these get applied, but I need 
>>> to allow for deviations for specific cases, thus the blacklist.
>>>
>>> The issue seems to be that no matter what I put in whitelist or 
>>> blacklist, include_list is always empty.  What am I missing?  I have also 
>>> tried writing a Custom Function to do the same as the inline template but 
>>> the result was not anymore successful, though the debugging was more 
>>> difficult.
>>>
>>> Thanks for your thoughts on this!
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Puppet Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to puppet-users...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/puppet-users/6ac9c22b-f5fc-409b-a75e-7d286862220b%40googlegroups.com
>>>  
>>> 
>>> .
>>> For more options, visit 

Re: [Puppet Users] Write a basic custom module for puppet

2015-09-18 Thread Gareth Rushgrove
On 17 September 2015 at 15:27, Arnau  wrote:
> Hi,
>
> https://docs.puppetlabs.com/puppet/latest/reference/modules_fundamentals.html
>
> Maybe start with:
>
> puppet module generate user-modulename 
>

puppet module generate assumes a pure Puppet module, rather than one
using the Ruby API.

The larger skeleton I maintain has the trappings of a Ruby module, but
it's fairly large at this point:
https://github.com/garethr/puppet-module-skeleton

> you'll get the basic stuff.
>
> HTH,
>
> 2015-09-17 8:46 GMT+02:00 :
>>
>> I have some experience handling puppet modules but this time I wrote some
>> code in Ruby that I'd like to port to a custom puppet module. I already have
>> read puppetlabs documentation( puppetforge, Beginner's guide )about writing
>> custom modules but I still don't get a basic idea to build from zero a dummy
>> custom puppet module to test it.
>>
>>
>> Do you know where can I find some practical examples to build a dummy
>> custom puppet module?
>>

The following is a pretty small/simple native type and provider.

https://github.com/garethr/garethr-digitalocean

It's not the best code but it works and it's not complicated, so for
getting started purposes it's potentially a nice start to follow as
long as you know a little Ruby.

The following blog posts also give a good introduction to some of the
concepts that are worth understanding.

http://garylarizza.com/blog/2013/11/25/fun-with-providers/
http://garylarizza.com/blog/2013/11/26/fun-with-providers-part-2/
http://garylarizza.com/blog/2013/12/15/seriously-what-is-this-provider-doing/

And do feel frree to post code in gists for feedback here.

I'd love to know what you're building too.

Gareth

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



-- 
Gareth Rushgrove
@garethr

devopsweekly.com
morethanseven.net
garethrushgrove.com

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


Re: [Puppet Users] Some environments not working in puppet

2015-09-18 Thread Martin Alfke

On 18 Sep 2015, at 09:49, Vishal Goel  wrote:

> Yes, I always restart puppetmaster after adding a new environment or doing 
> any changes in code for that matter.
> 
> Also, below are the two processes that are running on the puppetmaster (used 
> ps -ef | grep puppet )
> puppet   29247 1  0 12:27 ?00:00:00 Rack: 
> /usr/share/puppet/rack/puppetmasterd 
This is the passenger process
>   
> 
> 
> puppet   30130 1  0 12:29 ?00:00:05 /usr/bin/ruby1.8 
> /usr/bin/puppet master
This is the ruby webrick process. Kill this one!

> 
> 
> 
> Maybe the problem is with them?
> 
> 
> On Friday, September 18, 2015 at 1:02:48 PM UTC+5:30, Martin Alfke wrote:
> 
> On 18 Sep 2015, at 09:24, Vishal Goel  wrote: 
> 
> > I am experiencing a very strange error in puppet. I have around 4-5 
> > environments in my puppet codebase and whenever i add a new environment, it 
> > doesn't work. Even thought the code of new environment added is almost 
> > similar, it doesn't work. 
> 
> Have you restarted the puppet master process after adding the static 
> environment? 
> Maybe you want to have a look at environment path setting in puppet 
> https://docs.puppetlabs.com/puppet/3.8/reference/environments_configuring.html
>  
> 
> > 
> > Below is my puppet.conf file: 
> > 
> > [main] 
> > logdir=/var/log/puppet 
> > vardir=/var/lib/puppet 
> > ssldir=/var/lib/puppet/ssl 
> > rundir=/var/run/puppet 
> > factpath=$vardir/lib/facter 
> > templatedir=$confdir/templates 
> > pluginsync=true 
> > masterport=8141 
> > 
> > [master] 
> > reports = store 
> > environment_timeout = unlimited 
> > autosign = true 
> > 
> > [newdcdeploy] 
> > modulepath = $confdir/modules 
> > manifest = $confdir/environments/newdcdeploy/manifests/site.pp 
> > 
> > [newdcalerts] 
> > modulepath = $confdir/modules 
> > manifest = $confdir/environments/newdcalerts/manifests/site.pp 
> > 
> > So, newdcdeploy is working and newdcalerts is not. And both have exact same 
> > tree directory and content in files, only the names of environment are 
> > different. Am I missing something here? 
> > 
> > -- 
> > You received this message because you are subscribed to the Google Groups 
> > "Puppet Users" group. 
> > To unsubscribe from this group and stop receiving emails from it, send an 
> > email to puppet-users...@googlegroups.com. 
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msgid/puppet-users/a11ba4c8-f871-4d76-85fc-99a1948fcc7a%40googlegroups.com.
> >  
> > For more options, visit https://groups.google.com/d/optout. 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/7828482b-22ea-438e-b136-2125193b2f59%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

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


[Puppet Users] Package install_options

2015-09-18 Thread Alexander Dacre
Hi,

I'm having some difficulty with specifying a nogpgcheck option when 
installing custom RPM packages via Puppet. The problem is that the 
install_options do not get picked up by the agent.

I've tried the following syntax:

package { blah:
  ensure => latest,
  install_options => [ '--nogpgcheck'],
}

package { blah:
  ensure => latest,
  install_options => '--nogpgcheck',
}

But the client just doesn't pick it up and the run fails due to the package 
not being signed.

Any suggestions?

Thanks,
A

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