Re: [Puppet Users] Puppet server stopped working

2018-07-20 Thread Scott Hazelhurst



Many thanks for the help -- I managed to get it going

The other problem I had for the record was that I set the server_url to 
localhost while the server's CA was in its real name and that caused all 
sorts of confusion.

Regards

Scott

-- 
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/1d966234-7146-4afd-9021-b524e7dc4aa9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] [ANN] Resource API v1.4.1 Release

2018-07-20 Thread David Schmitt
Hi all,

We're pleased to announce that version 1.4.1 of the Resource API is being
released today.

The Resource API provides a simple way to create new native resources in
the form of types and providers for Puppet. Using a little bit of ruby, you
can finally get rid of that brittle exec, or manage that one API that
eluded you until now.

It is provided as a Ruby gem to be referenced within modules. Support for
it has been included as an experimental feature in the Puppet Development
Kit (see pdk new provider --help). Use the resource_api module
 or the puppet 6 nightly
packages
 to
deploy it in your infrastructure.

The new release of the Resource API provides the following notable bugfixes:

   - Fix "undefined method `rs_value'" error with metaparams like require
   and subscribe
   - Improve log_exception output from PuppetContext
   - Minor code changes to allow providers be loaded without puppet

See the CHANGELOG

for a full list of changes.

We encourage all module developers to review the Resource API and use it
when creating types and providers. The README

gets you going quickly. To see some example code see this simple Philips
Hue type  or this experimental apt_key
provider

.

Please let us know of your experiences with the Resource API, either here,
on Slack  (#forge-modules), or on the github repo
.

Thanks, the Davids
-- 
Cheers, David

https://twitter.com/dev_el_ops

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


[Puppet Users] woes installing Puppet server (won't start)

2018-07-20 Thread Peter Berghold
I've been running my own personal Puppet server at home for a very long
time and have rebuilt and installed Puppet server many times so what is
going on now makes no sense to me.

Yesterday I decided to rebuild my Puppet master yet again and loaded the
puppetserver package from:

puppetlabs-release-pc1-xenial.deb
puppet5-release-xenial.deb
puppet5-release-stretch.deb
puppet5-nightly-release-stretch.deb

In that order.

I'm running on Ubuntu (14?) and in none of the above versions does the
puppetserver process start up and stay up.  Gleaning the journal
(journalctl -u puppetserver --follow) I find this little nugget of fun:
Jul 20 06:13:03 myserver.tld  puppetserver[24046]: 06:13:03.762 [main]
ERROR puppetlabs.trapperkeeper.internal - Error during app buildup!
Jul 20 06:13:03 mysever.tld puppetserver[24046]:
java.lang.RuntimeException: Service ':FilesystemWatchService' not found

What the heck is that about?  What do I need to do to fix this?

Thanks in advance.

-- 
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/CAArvnv0PKo0%3DVV2xBTZ2doF%3Dz1Kqb9e-%3D03oDd57%3DcdV107gag%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] epp: has_key

2018-07-20 Thread Helmut Schneider
R.I. Pienaar wrote:

> 
> > On 19 Jul 2018, at 21:19, Henrik Lindberg
> >  wrote:
> > 
> >> On 2018-07-19 17:15, Helmut Schneider wrote:
> >> Hi,
> >> ---
> >> profiles:
> >>   vpn:
> >> openvpn:
> >>   defaults:
> >> client:
> >>   dev:   'tun'
> >>   proto: 'udp'
> >>   resolv-retry:  'infinite'
> >>   nobind:
> >>   user:  'nobody'
> >>   group: 'nogroup'
> >>   persist-key:
> >>   persist-tun:
> >>   ca:'/etc/openvpn/ca-charlieroot.de.crt'
> >>   cert:
> '/etc/openvpn/mail.helmut-ritter.de.crt' >>   key:
> '/etc/openvpn/mail.helmut-ritter.de.key' >>   ns-cert-type:
> 'server' >>   # OpenVPN <= 2.3
> >>   comp-lzo:  'yes'
> >>   # OpenVPN > 2.3
> >>   # compress:  'lz4'
> >>   log-append:'/var/log/openvpn.log'
> >>   verb:  '4'
> >>   script-security:   '2'
> >>   up:'/etc/openvpn/update-resolv-conf'
> >> The eep is called by
> >> content => epp("openvpn/etc/openvpn/config.epp", { openvpnConf =>
> >> $openvpnConf, openvpnMode => $openvpnMode, instance => $instance
> }), >> The epp:
> >> <%- | Hash $openvpnConf, String $openvpnMode, String $instance |
> -%> >> <% ({
> >> 'Mode' => [
> >> "$openvpnMode",
> >> ],
> >> 'Connection' => [
> >> 'remote',
> >> 'proto',
> >> 'dev',
> >> 'persist-tun',
> >> 'nobind',
> >> 'resolv-retry',
> >> 'compress',
> >> 'comp-lzo',
> >> ],
> >> 'Privileges' => [
> >> 'user',
> >> 'group',
> >> 'persist-key',
> >> ],
> >> 'Authentication' => [
> >> 'cert',
> >> 'key',
> >> 'ca',
> >> 'ns-cert-type',
> >> ],
> >> 'Logging' => [
> >> 'verb',
> >> 'log-append',
> >> ],
> >> 'Misc' => [
> >> 'script-security',
> >> 'plugin',
> >> 'up',
> >> 'down',
> >> ],
> >> }).each |$category, $parameters| { -%>
> >> ### <%= $category %> ###
> >> <%#= $openvpnConf %>
> >> <% $parameters.each |$parameter| { -%>
> >> <% if $parameter == 'remote' { -%>
> >> <%= $parameter %> <%= $openvpnConf['server'] %> <%=
> >> $openvpnConf['port'] %>
> >> <% } elsif $openvpnConf[$parameter] { -%>
> >> <%= $parameter %> <%= regsubst($openvpnConf[$parameter],
> >> '__INSTANCE__', $instance) %>
> >> <% } elsif defined($openvpnConf[$parameter]) { -%>
> >> <%= $parameter %>
> >> <% } -%>
> >> <% } %>
> >> <% } -%>
> >> The problem: compress does not exist in the hiera but is printed
> in the >> epp. How can I test if the key "compress" exists in the
> >> $openvpnConf-Hash?
> > 
> > You can simply check if the hash has an Undef value for that key.
> > 
> >  $openvpnConf['compress'] == undef

Did not work as I also want to print keys without values.

> Another option:
> 
> If “compress” in $openvpnConf { }

Works for me, 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/xn0lcoc3m2d60t5001%40news.gmane.org.
For more options, visit https://groups.google.com/d/optout.