Re: [Puppet Users] Multiple vhosts, same document root

2017-07-11 Thread Neil - Puppet List
Hello

stdlib package has a function ensure_resource that would allow you to
create the directory as many times as needed.

out of curiosity why not use the puppetlabs apache module?

Cheers
Neil

On 7 Jul 2017 09:39, "'Bas van de Wiel' via Puppet Users" <
puppet-users@googlegroups.com> wrote:

> So I managed to hack a fix for this:
> # Hackish pair of execs to allow multiple sites with the same docroot
> # See: https://confluence.maxserv.com/display/OPS/MaxServ+Apache
> exec { "${name}_${webroot}":
>   cwd => '/',
>   user=> 'root',
>   path=> '/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/
> sbin:/usr/local/bin:/home/beheer/bin',
>   command => "`which mkdir` -p ${webroot}",
>   creates => $webroot,
>   notify  => Exec["${name}_webroot_permissions"],
> }
>
> exec { "${name}_webroot_permissions":
>   cwd => '/',
>   user=> 'root',
>   path=> '/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/
> sbin:/usr/local/bin:/home/beheer/bin',
>   command => "`which chown` ${apache::user}:${apache::group}
> ${webroot}",
>   refreshonly => true,
> }
>
> Any comments?
>
> Bas
>
> On 06-07-17 21:32, bas via Puppet Users wrote:
>
> Hello Puppet users,
>
> I'm working on a webserver module that needs to ensure directories for
> document roots. I tried doing this by using file resources like so:
>
> file { 'vhost-A':
>   ensure => 'directory',
>   path   => '/var/www/sharedvhost',
>   ...clipped for brevity...
> }
>
> file { 'vhost-B':
>   ensure => 'directory',
>   path   => '/var/www/sharedvhost',
>   ...clipped for brevity...
> }
>
> This, sadly, does not work. Even though I avoid the pitfall of declaring
> two resources by the same name Puppet is clever enough to see that I'm
> ensuring the same path in the end.
>
> What I'd like the result to be, is the existence of /var/www/sharedvhost
> with the ability for my vhost resource type to know about it but without
> throwing errors.
>
> Any help would be much appreciated!
>
> Bas
>
>
> --
> 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/fbdc265c-4fe1-59b3-fb07-c951abe957d6%40area536.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/CAAohVBcj7CE4_M_y_%2B5wM06Bz26w5tvskmReXNEJZOWdYhMqMw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: PuppetDB Curl Queries

2017-07-11 Thread R.I.Pienaar


On Tue, Jul 11, 2017, at 19:07, Peter Krawetzky wrote:
> Isn't that for the PE version?  we are using open source.

It's in all versions

-- 
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/1499793362.10881.1037544480.5421DAB6%40webmail.messagingengine.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: PuppetDB Curl Queries

2017-07-11 Thread Peter Krawetzky
Isn't that for the PE version?  we are using open source.

On Tuesday, July 11, 2017 at 11:48:35 AM UTC-4, Peter Krawetzky wrote:
>
> Using CURL to query PuppetDB has got to be the most time consuming thing 
> I've ever done.  It took me almost 3 hours one day to create a CURL query 
> that I ended up creating in a SQL statement in 10 minutes once I figured 
> out the database structure.
>
> Does anyone have:
>
>1. A documented list of CURL queries and the syntax
>2. A documented list of SQL queries to directly against the Postgresql 
>database
>
>
>

-- 
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/a8be2d5d-f224-46b5-b72d-97338b24d44e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] PuppetDB Curl Queries

2017-07-11 Thread R.I.Pienaar
Best to use PQL via 'puppet query'

Examples:
https://docs.puppet.com/puppetdb/5.0/api/query/examples-pql.html

On Tue, Jul 11, 2017, at 17:48, Peter Krawetzky wrote:
> Using CURL to query PuppetDB has got to be the most time consuming thing 
> I've ever done.  It took me almost 3 hours one day to create a CURL query 
> that I ended up creating in a SQL statement in 10 minutes once I figured 
> out the database structure.
> 
> Does anyone have:
> 
>1. A documented list of CURL queries and the syntax
>2. A documented list of SQL queries to directly against the Postgresql 
>database
> 
> 
> -- 
> 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/8d8e9b09-0c05-4ae8-afcf-48d6a83f8247%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


-- 
R.I.Pienaar / www.devco.net / @ripienaar

-- 
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/1499788471.3231435.1037451160.0703FCC7%40webmail.messagingengine.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] PuppetDB Curl Queries

2017-07-11 Thread Peter Krawetzky
Using CURL to query PuppetDB has got to be the most time consuming thing 
I've ever done.  It took me almost 3 hours one day to create a CURL query 
that I ended up creating in a SQL statement in 10 minutes once I figured 
out the database structure.

Does anyone have:

   1. A documented list of CURL queries and the syntax
   2. A documented list of SQL queries to directly against the Postgresql 
   database


-- 
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/8d8e9b09-0c05-4ae8-afcf-48d6a83f8247%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Debian Stretch?

2017-07-11 Thread Johan Fleury
Le 11/07/2017 à 14:19, Brent Clark a écrit :
> Does anyone know when Puppetlabs is gonna support Debian Stretch?
> 

There's an open issue, but no ETA as been announced yet: 
https://tickets.puppetlabs.com/browse/PA-515

-- 
Johan Fleury
PGP Key ID : 0x5D404386805E56E6

-- 
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/9f13f565-399f-864d-df6f-bef2c2f2cab4%40arcaik.net.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: OpenPGP digital signature


[Puppet Users] Failed require resolution from RSpec.

2017-07-11 Thread Peter Berghold
I have a module that I'm refactoring that manages NTP servers and clients.
The client portion of the module performs a puppetdb (Forge Module
dalen-puppetdbquery) lookup to find the local NTP stratum 2 servers to
populate into the client's /etc/ntp.conf file.  Works great in real life
but the module fails spec testing with an error:

Failure/Error: require 'puppet/util/puppetdb'

I am using the bundler to load necessary gem files locally.   Here is my
Gemfile:

source 'https://rubygems.org'

puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" :
['>= 3.3']
gem 'puppet', puppetversion
gem 'puppetlabs_spec_helper', '>= 0.1.0'
gem 'puppet-lint', '>= 0.3.2'
gem 'facter', '>= 1.7.0'
gem 'rspec', '>= 0.0.0'
gem 'puppetdb-ruby'
gem 'puppetdb-terminus'
gem 'puppetdb_query'
gem 'ruby-puppetdb'
gem "simplecov-rcov"
gem "ci_reporter"


So, what am I missing?

-- 
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/CAArvnv0s2xH4hh0dKPZPECj41RKcOnAFXgkaip7dhPrQJMthpg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: parameters and hiera

2017-07-11 Thread Peter Berghold
OK... that calms my concerns a lot.

I have a second Puppet infrastructure that I'm about to build out that I'm
considering not putting Foreman on it at all.  Reason being it is going to
be in an environment where there won't be connectivity to 80/443 at all
from outside the environment.

On Mon, Jul 10, 2017 at 11:54 AM Gavin Williams  wrote:

> This is exactly how we use Foreman & Hiera in our installation...
>
> The key thing to set is when configuring the Puppet classes in Foreman,
> the 'Use Puppet Default' or 'Override' box needs to be checked.
> This means that if no values are stored in Foreman, then no value will be
> provided to Puppet, and Puppet will then use Hiera to look that value up.
>
> If you don't check that box, then you run the risk of providing empty
> strings to Puppet, thereby skipping the Hiera lookup :)
>
> HTH
>
> Gav
>
>
> On Monday, 10 July 2017 16:44:32 UTC+1, Salty Old Cowdawg wrote:
>>
>> In the shop that I code for these days we have The Foreman ENC set up and
>> running.  I want to add hiera to the mix but allow our operations folks the
>> options the ability to change parameter values using the Foreman GUI.
>> Given the applications we are having Puppet manage this is rather mandatory
>> since the values in question get changed often enough to deal with changes
>> in the operational conditions as they change.  Having operators edit hiera
>> YAML files is not a desired thing.
>>
>> I have some ideas for how to implement this but would like some input
>> from others that may have dealt with the same thing.  What I'm looking for
>> is a coding pattern that says "if foreman is blank, use hiera and if hiera
>> is blank use this default."
>>
>> thoughts anybody?
>>
>> --
> 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/311ba2bb-87a6-4c73-905b-339bed9dd779%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/CAArvnv2gKBVh6FF%2BM8Gp90ebeONFNVdtGk6nnKFDjVO6TUOxiQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: does puppet have api to run and apply catalogs

2017-07-11 Thread jcbollinger


On Monday, July 10, 2017 at 9:29:34 AM UTC-5, rahav jv wrote:
>
> Hi,
>
> I'm evaluating puppet and salt.
>
> salt has an api that helps us runs command and apply salt states (like 
> catalogs) on the endpoints.
>
> is there any such alternative in puppet, an api that can help apply a 
> catalog or a manifest on the agent via the puppet master.
>


Open source Puppet's model is strictly a pull model.  It does not do remote 
control.  If you want remote control (such as to remotely trigger a Puppet 
catalog run) then Puppet, Inc. tends to recommend MCollective, a general 
purpose, multi-node remote-control system under Puppet, Inc's control. 
 MCollective has good Puppet integration.


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/4c335601-469f-47ae-a060-0b21c9288ccf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Debian Stretch?

2017-07-11 Thread Brent Clark
Good day Guys

Does anyone know when Puppetlabs is gonna support Debian Stretch?

Looking at http://apt.puppetlabs.com/

I'm not seeing any Stretch.

Many thank, regards

Brent Clark

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