Index: src/puppetcode/environments/gnuboat/hieradata/gnuboat/mapservice_host.yaml
===================================================================
--- src/puppetcode/environments/gnuboat/hieradata/gnuboat/mapservice_host.yaml	(revision 56d997983a4c8c1df518d22b75a7af00bf60eccc)
+++ src/puppetcode/environments/gnuboat/hieradata/gnuboat/mapservice_host.yaml	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -2,47 +2,25 @@
 classes:
   - gnuboat_mapservice
-  - apt
-  - postgresql::server
-#  - mysql::server
-#  - docker
-#  - docker::compose
+  - docker
+  - docker::compose
 
-gnuboat_mapservice::containerized: false
+gnuboat_mapservice::containerized: true
 gnuboat_mapservice::database_name: 'gnuboat_mapservice'
 gnuboat_mapservice::database_user: 'gnuboat_mapservice'
+# A random password is set, if this is not set
 gnuboat_mapservice::database_password: 'Sr7DeuA7Db9fdve3Ywbf'
+gnuboat_mapservice::mapservice_tile_cache_dir: '/var/lib/gnuboat/tilecache'
+# Add a proxy vhost
 gnuboat_mapservice::apache_enabled: true
-apt::sources:
-  'gnuboat':
-    comment: 'GNUBoat repository'
-    location: 'http://ftp.engsas.de/unstable/gnuboat/'
-    release: 'bullseye'
-    repos: 'main'
-    key:
-      id: 'B5FB30C861780282'
-      server: 'pgp.mit.edu'
-    include:
-      src: true
-      deb: true
-postgresql::server::postgis::package_ensure: 'present'
-#postgresql::server::roles:
-#   '%{gnuboat_mapservice::database_user}':
-#     ensure: 'present'
-#     login: true
-postgresql::server::extension:
-  'postgis':
-    ensure: present
-    database: '%{gnuboat_mapservice::database_name}'
-postgresql::server::db:
-  '%{gnuboat_mapservice::database_name}':
-    user: '%{gnuboat_mapservice::database_user}'
-    password_hash: '%{gnuboat_mapservice::database_password}'
-#docker::version: 'latest'
-#docker::ensure: 'present'
-#docker::use_upstream_package_source: true
-#docker::manage_package: true
-#docker::compose::ensure: 'present'
-#docker::compose::version: '1.26.1'
+gnuboat_mapservice::apache_replace_default_host: true
+#gnuboat_mapservice::apache_vhost_name: gnuboat.example.org
+gnuboat_mapservice::osm_tileserver_enabled: false
+docker::version: 'latest'
+docker::ensure: 'present'
+docker::use_upstream_package_source: true
+docker::manage_package: true
+docker::compose::ensure: 'present'
+#docker::compose::version: 'latest'
 #docker::compose::compose_files:
-#  - '/tmp/gnuboat_mapservice.yaml'
-#docker::stack::ensure: 'present'
+#  - '/var/lib/gnuboat/mapservice/gnuboat_mapservice.yaml'
+docker::stack::ensure: 'present'
Index: src/puppetcode/environments/gnuboat/hieradata/gnuboat/mapservice_host.yaml.rej
===================================================================
--- src/puppetcode/environments/gnuboat/hieradata/gnuboat/mapservice_host.yaml.rej	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/hieradata/gnuboat/mapservice_host.yaml.rej	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,68 @@
+--- hieradata/gnuboat/mapservice_host.yaml	2021-01-06 20:27:59.183227337 +0100
++++ hieradata/gnuboat/mapservice_host.yaml	2021-01-06 20:05:58.692811029 +0100
+@@ -1,48 +1,26 @@
+ ---
+ classes:
+   - gnuboat_mapservice
+-  - apt
+-  - postgresql::server
+-#  - mysql::server
+-#  - docker
+-#  - docker::compose
++  - docker
++  - docker::compose
+ 
+-gnuboat_mapservice::containerized: false
++gnuboat_mapservice::containerized: true
+ gnuboat_mapservice::database_name: 'gnuboat_mapservice'
+ gnuboat_mapservice::database_user: 'gnuboat_mapservice'
++# A random password is set, if this is not set
+ gnuboat_mapservice::database_password: 'Sr7DeuA7Db9fdve3Ywbf'
++gnuboat_mapservice::mapservice_tile_cache_dir: '/var/lib/gnuboat/tilecache'
++# Add a proxy vhost
+ gnuboat_mapservice::apache_enabled: true
+-apt::sources:
+-  'gnuboat':
+-    comment: 'GNUBoat repository'
+-    location: 'http://ftp.engsas.de/unstable/gnuboat/'
+-    release: 'bullseye'
+-    repos: 'main'
+-    key:
+-      id: 'B5FB30C861780282'
+-      server: 'pgp.mit.edu'
+-    include:
+-      src: true
+-      deb: true
+-postgresql::server::postgis::package_ensure: 'present'
+-#postgresql::server::roles:
+-#   '%{gnuboat_mapservice::database_user}':
+-#     ensure: 'present'
+-#     login: true
+-postgresql::server::extension:
+-  'postgis':
+-    ensure: present
+-    database: '%{gnuboat_mapservice::database_name}'
+-postgresql::server::db:
+-  '%{gnuboat_mapservice::database_name}':
+-    user: '%{gnuboat_mapservice::database_user}'
+-    password_hash: '%{gnuboat_mapservice::database_password}'
+-#docker::version: 'latest'
+-#docker::ensure: 'present'
+-#docker::use_upstream_package_source: true
+-#docker::manage_package: true
+-#docker::compose::ensure: 'present'
+-#docker::compose::version: '1.26.1'
++gnuboat_mapservice::apache_replace_default_host: true
++#gnuboat_mapservice::apache_vhost_name: gnuboat.example.org
++gnuboat_mapservice::osm_tileserver_enabled: false
++docker::version: 'latest'
++docker::ensure: 'present'
++docker::use_upstream_package_source: true
++docker::manage_package: true
++docker::compose::ensure: 'present'
++#docker::compose::version: 'latest'
+ #docker::compose::compose_files:
+-#  - '/tmp/gnuboat_mapservice.yaml'
+-#docker::stack::ensure: 'present'
++#  - '/var/lib/gnuboat/mapservice/gnuboat_mapservice.yaml'
++docker::stack::ensure: 'present'
Index: src/puppetcode/environments/gnuboat/hieradata/gnuboat/mapservice_host.yaml.without_docker
===================================================================
--- src/puppetcode/environments/gnuboat/hieradata/gnuboat/mapservice_host.yaml.without_docker	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/hieradata/gnuboat/mapservice_host.yaml.without_docker	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,46 @@
+---
+classes:
+  - gnuboat_mapservice
+  - apt
+  - postgresql::server
+#  - docker
+#  - docker::compose
+
+gnuboat_mapservice::containerized: false
+gnuboat_mapservice::database_name: 'gnuboat_mapservice'
+gnuboat_mapservice::database_user: 'gnuboat_mapservice'
+# A random password is set, if this is not set
+gnuboat_mapservice::database_password: 'Sr7DeuA7Db9fdve3Ywbf'
+gnuboat_mapservice::mapservice_tile_cache_dir: '/var/lib/gnuboat/tilecache'
+gnuboat_mapservice::apache_enabled: true
+gnuboat_mapservice::apache_replace_default_host: true
+apt::sources:
+  'gnuboat':
+    comment: 'GNUBoat repository'
+    location: 'http://ftp.engsas.de/unstable/gnuboat/'
+    release: 'bullseye'
+    repos: 'main'
+    key:
+      id: 'B5FB30C861780282'
+      server: 'pgp.mit.edu'
+    include:
+      src: true
+      deb: true
+postgresql::server::postgis::package_ensure: 'present'
+postgresql::server::extension:
+  'postgis':
+    ensure: present
+    database: '%{gnuboat_mapservice::database_name}'
+postgresql::server::db:
+  '%{gnuboat_mapservice::database_name}':
+    user: '%{gnuboat_mapservice::database_user}'
+    password_hash: '%{gnuboat_mapservice::database_password}'
+#docker::version: 'latest'
+#docker::ensure: 'present'
+#docker::use_upstream_package_source: true
+#docker::manage_package: true
+#docker::compose::ensure: 'present'
+#docker::compose::version: '1.26.1'
+#docker::compose::compose_files:
+#  - '/tmp/gnuboat_mapservice.yaml'
+#docker::stack::ensure: 'present'
Index: src/puppetcode/environments/gnuboat/modules/extlib/CHANGELOG.md
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/CHANGELOG.md	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/CHANGELOG.md	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,330 @@
+# Changelog
+
+All notable changes to this project will be documented in this file.
+Each new release typically also includes the latest modulesync defaults.
+These should not affect the functionality of the module.
+
+## [v5.0.0](https://github.com/voxpupuli/puppet-extlib/tree/v5.0.0) (2020-03-31)
+
+[Full Changelog](https://github.com/voxpupuli/puppet-extlib/compare/v4.2.0...v5.0.0)
+
+**Breaking changes:**
+
+- Rename `puppet_config` fact to `extlib__puppet_config` [\#156](https://github.com/voxpupuli/puppet-extlib/pull/156) ([alexjfisher](https://github.com/alexjfisher))
+- Remove deprecated functions [\#153](https://github.com/voxpupuli/puppet-extlib/pull/153) ([alexjfisher](https://github.com/alexjfisher))
+
+**Fixed bugs:**
+
+- puppet\_config / puppet\_settings fact confined to Linux [\#150](https://github.com/voxpupuli/puppet-extlib/issues/150)
+
+**Closed issues:**
+
+- Module conflicts with puppetlabs/puppet\_agent [\#148](https://github.com/voxpupuli/puppet-extlib/issues/148)
+
+**Merged pull requests:**
+
+- Remove strings patterns [\#155](https://github.com/voxpupuli/puppet-extlib/pull/155) ([ekohl](https://github.com/ekohl))
+- Mark Red Hat 8, CentOS 8 and Debian 10 as supported [\#154](https://github.com/voxpupuli/puppet-extlib/pull/154) ([ekohl](https://github.com/ekohl))
+- puppet\_config: no need to confine to linux [\#151](https://github.com/voxpupuli/puppet-extlib/pull/151) ([b4ldr](https://github.com/b4ldr))
+- update repo links to https [\#147](https://github.com/voxpupuli/puppet-extlib/pull/147) ([bastelfreak](https://github.com/bastelfreak))
+
+## [v4.2.0](https://github.com/voxpupuli/puppet-extlib/tree/v4.2.0) (2020-01-25)
+
+[Full Changelog](https://github.com/voxpupuli/puppet-extlib/compare/v4.1.0...v4.2.0)
+
+**Implemented enhancements:**
+
+- This PR adds a new fact puppet\_config [\#143](https://github.com/voxpupuli/puppet-extlib/pull/143) ([b4ldr](https://github.com/b4ldr))
+
+**Merged pull requests:**
+
+- Remove duplicate CONTRIBUTING.md file [\#141](https://github.com/voxpupuli/puppet-extlib/pull/141) ([dhoppe](https://github.com/dhoppe))
+- drop Ubuntu 14.04 support [\#140](https://github.com/voxpupuli/puppet-extlib/pull/140) ([bastelfreak](https://github.com/bastelfreak))
+
+## [v4.1.0](https://github.com/voxpupuli/puppet-extlib/tree/v4.1.0) (2019-11-07)
+
+[Full Changelog](https://github.com/voxpupuli/puppet-extlib/compare/v4.0.0...v4.1.0)
+
+**Implemented enhancements:**
+
+- Add experimental `extlib::read_url` function [\#137](https://github.com/voxpupuli/puppet-extlib/pull/137) ([alexjfisher](https://github.com/alexjfisher))
+
+## [v4.0.0](https://github.com/voxpupuli/puppet-extlib/tree/v4.0.0) (2019-05-29)
+
+[Full Changelog](https://github.com/voxpupuli/puppet-extlib/compare/v3.1.0...v4.0.0)
+
+**Breaking changes:**
+
+-  modulesync 2.7.0 &  Drop puppet4; require at least Puppet 5.5.8 [\#132](https://github.com/voxpupuli/puppet-extlib/pull/132) ([bastelfreak](https://github.com/bastelfreak))
+
+**Implemented enhancements:**
+
+- Allow `puppetlabs/stdlib` 6.x [\#134](https://github.com/voxpupuli/puppet-extlib/pull/134) ([alexjfisher](https://github.com/alexjfisher))
+- Add new file based functions [\#129](https://github.com/voxpupuli/puppet-extlib/pull/129) ([logicminds](https://github.com/logicminds))
+
+**Merged pull requests:**
+
+- Improve `extlib::path_join` docs formatting [\#133](https://github.com/voxpupuli/puppet-extlib/pull/133) ([alexjfisher](https://github.com/alexjfisher))
+
+## [v3.1.0](https://github.com/voxpupuli/puppet-extlib/tree/v3.1.0) (2018-12-19)
+
+[Full Changelog](https://github.com/voxpupuli/puppet-extlib/compare/v3.0.0...v3.1.0)
+
+**Implemented enhancements:**
+
+- Mark Debian 9 and Ubuntu 18.04 as supported [\#126](https://github.com/voxpupuli/puppet-extlib/pull/126) ([ekohl](https://github.com/ekohl))
+- allow puppet 6.x and modulesync 2.1.0 [\#124](https://github.com/voxpupuli/puppet-extlib/pull/124) ([bastelfreak](https://github.com/bastelfreak))
+
+## [v3.0.0](https://github.com/voxpupuli/puppet-extlib/tree/v3.0.0) (2018-09-28)
+
+[Full Changelog](https://github.com/voxpupuli/puppet-extlib/compare/v2.3.1...v3.0.0)
+
+In this release, all functions have been moved to the `extlib::` namespace and converted to the 4.X function API.  Non name-spaced versions are still available, but deprecated and will be removed in a future major release.
+
+During the conversion work, a couple of functions have minor but technically breaking changes.  These are documented below.
+
+**Breaking changes:**
+
+- Convert `random_password` to API 4 function [\#112](https://github.com/voxpupuli/puppet-extlib/pull/112) ([alexjfisher](https://github.com/alexjfisher))
+- Convert `ip_to_cron` to API 4 function [\#111](https://github.com/voxpupuli/puppet-extlib/pull/111) ([alexjfisher](https://github.com/alexjfisher))
+
+**Closed issues:**
+
+- cache\_data\(\) stores data locally on puppetserver [\#80](https://github.com/voxpupuli/puppet-extlib/issues/80)
+- Document ip\_to\_cron in README [\#58](https://github.com/voxpupuli/puppet-extlib/issues/58)
+
+**Merged pull requests:**
+
+- Clean up documentation [\#121](https://github.com/voxpupuli/puppet-extlib/pull/121) ([alexjfisher](https://github.com/alexjfisher))
+- Namespace functions [\#120](https://github.com/voxpupuli/puppet-extlib/pull/120) ([alexjfisher](https://github.com/alexjfisher))
+- Convert `dump_args` to API 4.x function [\#118](https://github.com/voxpupuli/puppet-extlib/pull/118) ([alexjfisher](https://github.com/alexjfisher))
+- Use Optional\[String\] in default\_content\(\) [\#117](https://github.com/voxpupuli/puppet-extlib/pull/117) ([ekohl](https://github.com/ekohl))
+- Convert `resources_deep_merge` to API 4.x function [\#116](https://github.com/voxpupuli/puppet-extlib/pull/116) ([alexjfisher](https://github.com/alexjfisher))
+- Rewrite cache\_data to 4.x API [\#114](https://github.com/voxpupuli/puppet-extlib/pull/114) ([ekohl](https://github.com/ekohl))
+- Convert `echo` function to 4.x API [\#109](https://github.com/voxpupuli/puppet-extlib/pull/109) ([alexjfisher](https://github.com/alexjfisher))
+- Fix default\_content puppet-strings tags [\#108](https://github.com/voxpupuli/puppet-extlib/pull/108) ([alexjfisher](https://github.com/alexjfisher))
+
+## [v2.3.1](https://github.com/voxpupuli/puppet-extlib/tree/v2.3.1) (2018-08-26)
+
+[Full Changelog](https://github.com/voxpupuli/puppet-extlib/compare/v2.3.0...v2.3.1)
+
+**Merged pull requests:**
+
+- allow puppetlabs/stdlib 5.x [\#106](https://github.com/voxpupuli/puppet-extlib/pull/106) ([bastelfreak](https://github.com/bastelfreak))
+
+## [v2.3.0](https://github.com/voxpupuli/puppet-extlib/tree/v2.3.0) (2018-07-29)
+
+[Full Changelog](https://github.com/voxpupuli/puppet-extlib/compare/v2.2.0...v2.3.0)
+
+**Implemented enhancements:**
+
+- Allow default\_content to render epp templates [\#103](https://github.com/voxpupuli/puppet-extlib/pull/103) ([smortex](https://github.com/smortex))
+
+## [v2.2.0](https://github.com/voxpupuli/puppet-extlib/tree/v2.2.0) (2018-07-24)
+
+[Full Changelog](https://github.com/voxpupuli/puppet-extlib/compare/v2.1.0...v2.2.0)
+
+**Implemented enhancements:**
+
+- Add sort\_by\_version function [\#99](https://github.com/voxpupuli/puppet-extlib/pull/99) ([alexjfisher](https://github.com/alexjfisher))
+
+## [v2.1.0](https://github.com/voxpupuli/puppet-extlib/tree/v2.1.0) (2018-06-16)
+
+[Full Changelog](https://github.com/voxpupuli/puppet-extlib/compare/v2.0.1...v2.1.0)
+
+**Implemented enhancements:**
+
+- Add has\_module function [\#92](https://github.com/voxpupuli/puppet-extlib/pull/92) ([alexjfisher](https://github.com/alexjfisher))
+
+**Merged pull requests:**
+
+- Remove docker nodesets [\#96](https://github.com/voxpupuli/puppet-extlib/pull/96) ([bastelfreak](https://github.com/bastelfreak))
+- drop EOL OSs; fix puppet version range [\#94](https://github.com/voxpupuli/puppet-extlib/pull/94) ([bastelfreak](https://github.com/bastelfreak))
+
+## [v2.0.1](https://github.com/voxpupuli/puppet-extlib/tree/v2.0.1) (2017-12-18)
+
+[Full Changelog](https://github.com/voxpupuli/puppet-extlib/compare/v2.0.0...v2.0.1)
+
+**Merged pull requests:**
+
+- declare compatible with Puppet 5.x [\#89](https://github.com/voxpupuli/puppet-extlib/pull/89) ([mmoll](https://github.com/mmoll))
+
+## [v2.0.0](https://github.com/voxpupuli/puppet-extlib/tree/v2.0.0) (2017-10-11)
+
+[Full Changelog](https://github.com/voxpupuli/puppet-extlib/compare/v1.1.0...v2.0.0)
+
+**Fixed bugs:**
+
+- Fix stdlib version requirement in metadata [\#83](https://github.com/voxpupuli/puppet-extlib/pull/83) ([oranenj](https://github.com/oranenj))
+
+## [v1.1.0](https://github.com/voxpupuli/puppet-extlib/tree/v1.1.0) (2017-01-13)
+
+[Full Changelog](https://github.com/voxpupuli/puppet-extlib/compare/v1.0.0...v1.1.0)
+
+**Merged pull requests:**
+
+- Bump min version\_requirement for Puppet + dep [\#75](https://github.com/voxpupuli/puppet-extlib/pull/75) ([juniorsysadmin](https://github.com/juniorsysadmin))
+- Add missing badges [\#70](https://github.com/voxpupuli/puppet-extlib/pull/70) ([dhoppe](https://github.com/dhoppe))
+
+## [v1.0.0](https://github.com/voxpupuli/puppet-extlib/tree/v1.0.0) (2016-08-19)
+
+[Full Changelog](https://github.com/voxpupuli/puppet-extlib/compare/v0.11.3...v1.0.0)
+
+**Closed issues:**
+
+- Unit tests are spread across 2 directories [\#60](https://github.com/voxpupuli/puppet-extlib/issues/60)
+- ip\_to\_cron needs unit tests [\#59](https://github.com/voxpupuli/puppet-extlib/issues/59)
+- please make a fresh release [\#54](https://github.com/voxpupuli/puppet-extlib/issues/54)
+
+**Merged pull requests:**
+
+- typo [\#65](https://github.com/voxpupuli/puppet-extlib/pull/65) ([mmckinst](https://github.com/mmckinst))
+- Add better ip\_to\_cron unit tests [\#62](https://github.com/voxpupuli/puppet-extlib/pull/62) ([alexjfisher](https://github.com/alexjfisher))
+- Move function spec tests [\#61](https://github.com/voxpupuli/puppet-extlib/pull/61) ([alexjfisher](https://github.com/alexjfisher))
+
+## [v0.11.3](https://github.com/voxpupuli/puppet-extlib/tree/v0.11.3) (2016-04-17)
+
+[Full Changelog](https://github.com/voxpupuli/puppet-extlib/compare/v0.11.2...v0.11.3)
+
+**Merged pull requests:**
+
+- bump again [\#56](https://github.com/voxpupuli/puppet-extlib/pull/56) ([bastelfreak](https://github.com/bastelfreak))
+
+## [v0.11.2](https://github.com/voxpupuli/puppet-extlib/tree/v0.11.2) (2016-04-17)
+
+[Full Changelog](https://github.com/voxpupuli/puppet-extlib/compare/v0.11.1...v0.11.2)
+
+## [v0.11.1](https://github.com/voxpupuli/puppet-extlib/tree/v0.11.1) (2016-04-17)
+
+[Full Changelog](https://github.com/voxpupuli/puppet-extlib/compare/v0.11.0...v0.11.1)
+
+**Closed issues:**
+
+- import ip\_to\_cron [\#48](https://github.com/voxpupuli/puppet-extlib/issues/48)
+
+**Merged pull requests:**
+
+- Release 0.11.1 [\#55](https://github.com/voxpupuli/puppet-extlib/pull/55) ([jyaworski](https://github.com/jyaworski))
+- Fixes GH-48: Import ip\_to\_cron.rb from theforeman/puppet-puppet [\#52](https://github.com/voxpupuli/puppet-extlib/pull/52) ([jyaworski](https://github.com/jyaworski))
+- Pin rake to avoid rubocop/rake 11 incompatibility [\#51](https://github.com/voxpupuli/puppet-extlib/pull/51) ([roidelapluie](https://github.com/roidelapluie))
+- rename puppet\[ -\]?community -\> voxpupuli [\#47](https://github.com/voxpupuli/puppet-extlib/pull/47) ([igalic](https://github.com/igalic))
+- chore\(sync\) ensure Rakefile and Gemfile are msynced [\#46](https://github.com/voxpupuli/puppet-extlib/pull/46) ([igalic](https://github.com/igalic))
+- Added dump\_args statement function for debugging puppet code [\#30](https://github.com/voxpupuli/puppet-extlib/pull/30) ([logicminds](https://github.com/logicminds))
+
+## [v0.11.0](https://github.com/voxpupuli/puppet-extlib/tree/v0.11.0) (2015-12-31)
+
+[Full Changelog](https://github.com/voxpupuli/puppet-extlib/compare/v0.10.7...v0.11.0)
+
+**Merged pull requests:**
+
+- Release PR for version 0.11.0 [\#45](https://github.com/voxpupuli/puppet-extlib/pull/45) ([rnelson0](https://github.com/rnelson0))
+- fix\(default\_content\) don't call template\(\) on empty template\_name [\#44](https://github.com/voxpupuli/puppet-extlib/pull/44) ([igalic](https://github.com/igalic))
+
+## [v0.10.7](https://github.com/voxpupuli/puppet-extlib/tree/v0.10.7) (2015-12-29)
+
+[Full Changelog](https://github.com/voxpupuli/puppet-extlib/compare/v0.10.6...v0.10.7)
+
+**Merged pull requests:**
+
+- feat \(release\) more solid way to release \(thru travis\) [\#42](https://github.com/voxpupuli/puppet-extlib/pull/42) ([igalic](https://github.com/igalic))
+
+## [v0.10.6](https://github.com/voxpupuli/puppet-extlib/tree/v0.10.6) (2015-12-22)
+
+[Full Changelog](https://github.com/voxpupuli/puppet-extlib/compare/v0.10.5...v0.10.6)
+
+## [v0.10.5](https://github.com/voxpupuli/puppet-extlib/tree/v0.10.5) (2015-12-21)
+
+[Full Changelog](https://github.com/voxpupuli/puppet-extlib/compare/v0.10.3...v0.10.5)
+
+**Closed issues:**
+
+- document default\_content function [\#36](https://github.com/voxpupuli/puppet-extlib/issues/36)
+- New Release [\#20](https://github.com/voxpupuli/puppet-extlib/issues/20)
+
+**Merged pull requests:**
+
+- prepare for 0.10.5 release [\#38](https://github.com/voxpupuli/puppet-extlib/pull/38) ([igalic](https://github.com/igalic))
+- docs \(default\_content\) align rdoc and readme [\#37](https://github.com/voxpupuli/puppet-extlib/pull/37) ([igalic](https://github.com/igalic))
+- prep 0.10.4 release [\#35](https://github.com/voxpupuli/puppet-extlib/pull/35) ([igalic](https://github.com/igalic))
+- feat \(release\) travis\_release now creates -rc version [\#34](https://github.com/voxpupuli/puppet-extlib/pull/34) ([igalic](https://github.com/igalic))
+- Puppet 4-safe function calls [\#31](https://github.com/voxpupuli/puppet-extlib/pull/31) ([igalic](https://github.com/igalic))
+- fixing 2 typos that bugged me in the readme [\#29](https://github.com/voxpupuli/puppet-extlib/pull/29) ([ApisMellow](https://github.com/ApisMellow))
+- Add default\_content function [\#4](https://github.com/voxpupuli/puppet-extlib/pull/4) ([alvagante](https://github.com/alvagante))
+
+## [v0.10.3](https://github.com/voxpupuli/puppet-extlib/tree/v0.10.3) (2015-10-05)
+
+[Full Changelog](https://github.com/voxpupuli/puppet-extlib/compare/v0.10.2...v0.10.3)
+
+## [v0.10.2](https://github.com/voxpupuli/puppet-extlib/tree/v0.10.2) (2015-10-05)
+
+[Full Changelog](https://github.com/voxpupuli/puppet-extlib/compare/0.10.1...v0.10.2)
+
+## [0.10.1](https://github.com/voxpupuli/puppet-extlib/tree/0.10.1) (2015-10-05)
+
+[Full Changelog](https://github.com/voxpupuli/puppet-extlib/compare/v0.10.1...0.10.1)
+
+## [v0.10.1](https://github.com/voxpupuli/puppet-extlib/tree/v0.10.1) (2015-10-05)
+
+[Full Changelog](https://github.com/voxpupuli/puppet-extlib/compare/v0.10.0...v0.10.1)
+
+## [v0.10.0](https://github.com/voxpupuli/puppet-extlib/tree/v0.10.0) (2015-10-05)
+
+[Full Changelog](https://github.com/voxpupuli/puppet-extlib/compare/v0.9.3...v0.10.0)
+
+**Closed issues:**
+
+- deployment, how does it work!? [\#10](https://github.com/voxpupuli/puppet-extlib/issues/10)
+
+**Merged pull requests:**
+
+- prepare release of 0.10.0 [\#27](https://github.com/voxpupuli/puppet-extlib/pull/27) ([igalic](https://github.com/igalic))
+- fix Rubocop complaints + rspec deprecations [\#26](https://github.com/voxpupuli/puppet-extlib/pull/26) ([igalic](https://github.com/igalic))
+- rubcop:auto\_correct [\#24](https://github.com/voxpupuli/puppet-extlib/pull/24) ([igalic](https://github.com/igalic))
+- Add random\_password function to generate alphanumeric passwords [\#19](https://github.com/voxpupuli/puppet-extlib/pull/19) ([ehelms](https://github.com/ehelms))
+- Add "echo" function for debugging [\#18](https://github.com/voxpupuli/puppet-extlib/pull/18) ([dmitryilyin](https://github.com/dmitryilyin))
+- Adds cache\_data function for caching values on the master [\#17](https://github.com/voxpupuli/puppet-extlib/pull/17) ([ehelms](https://github.com/ehelms))
+- "Update Readme for puppet- namechange" [\#16](https://github.com/voxpupuli/puppet-extlib/pull/16) ([nibalizer](https://github.com/nibalizer))
+- "Enable metadata.json linting" [\#15](https://github.com/voxpupuli/puppet-extlib/pull/15) ([nibalizer](https://github.com/nibalizer))
+- Check functions against stdlib [\#13](https://github.com/voxpupuli/puppet-extlib/pull/13) ([nibalizer](https://github.com/nibalizer))
+- document \(and simplify\) release process [\#12](https://github.com/voxpupuli/puppet-extlib/pull/12) ([igalic](https://github.com/igalic))
+- further distill matrix, following @camptocamp's example [\#11](https://github.com/voxpupuli/puppet-extlib/pull/11) ([igalic](https://github.com/igalic))
+
+## [v0.9.3](https://github.com/voxpupuli/puppet-extlib/tree/v0.9.3) (2015-03-17)
+
+[Full Changelog](https://github.com/voxpupuli/puppet-extlib/compare/v0.9.2...v0.9.3)
+
+**Merged pull requests:**
+
+- rename module in README, also. [\#9](https://github.com/voxpupuli/puppet-extlib/pull/9) ([igalic](https://github.com/igalic))
+- no email plz [\#8](https://github.com/voxpupuli/puppet-extlib/pull/8) ([nibalizer](https://github.com/nibalizer))
+- our forge name is puppet, not puppetcommunity! [\#7](https://github.com/voxpupuli/puppet-extlib/pull/7) ([igalic](https://github.com/igalic))
+- test more puppet versions [\#6](https://github.com/voxpupuli/puppet-extlib/pull/6) ([igalic](https://github.com/igalic))
+
+## [v0.9.2](https://github.com/voxpupuli/puppet-extlib/tree/v0.9.2) (2015-03-16)
+
+[Full Changelog](https://github.com/voxpupuli/puppet-extlib/compare/v0.9.1...v0.9.2)
+
+**Merged pull requests:**
+
+- Set up autodeployment [\#5](https://github.com/voxpupuli/puppet-extlib/pull/5) ([nibalizer](https://github.com/nibalizer))
+- Fix name for puppetlabs/stdlib in metadata.json [\#3](https://github.com/voxpupuli/puppet-extlib/pull/3) ([antaflos](https://github.com/antaflos))
+
+## [v0.9.1](https://github.com/voxpupuli/puppet-extlib/tree/v0.9.1) (2014-09-03)
+
+[Full Changelog](https://github.com/voxpupuli/puppet-extlib/compare/v0.9.0...v0.9.1)
+
+**Closed issues:**
+
+- spec tests to 3.0 [\#2](https://github.com/voxpupuli/puppet-extlib/issues/2)
+
+**Merged pull requests:**
+
+- Improve function documentation by simplifying it [\#1](https://github.com/voxpupuli/puppet-extlib/pull/1) ([antaflos](https://github.com/antaflos))
+
+## [v0.9.0](https://github.com/voxpupuli/puppet-extlib/tree/v0.9.0) (2014-09-02)
+
+[Full Changelog](https://github.com/voxpupuli/puppet-extlib/compare/977744d6d05ed5801a20aa9672a80cced1092d00...v0.9.0)
+
+
+
+\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
Index: src/puppetcode/environments/gnuboat/modules/extlib/Gemfile
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/Gemfile	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/Gemfile	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,86 @@
+source ENV['GEM_SOURCE'] || "https://rubygems.org"
+
+def location_for(place, fake_version = nil)
+  if place =~ /^(git[:@][^#]*)#(.*)/
+    [fake_version, { :git => $1, :branch => $2, :require => false }].compact
+  elsif place =~ /^file:\/\/(.*)/
+    ['>= 0', { :path => File.expand_path($1), :require => false }]
+  else
+    [place, { :require => false }]
+  end
+end
+
+group :test do
+  gem 'puppetlabs_spec_helper', '>= 2.14.0',                        :require => false
+  gem 'rspec-puppet-facts', '>= 1.9.5',                             :require => false
+  gem 'rspec-puppet-utils',                                         :require => false
+  gem 'puppet-lint-leading_zero-check',                             :require => false
+  gem 'puppet-lint-trailing_comma-check',                           :require => false
+  gem 'puppet-lint-version_comparison-check',                       :require => false
+  gem 'puppet-lint-classes_and_types_beginning_with_digits-check',  :require => false
+  gem 'puppet-lint-unquoted_string-check',                          :require => false
+  gem 'puppet-lint-variable_contains_upcase',                       :require => false
+  gem 'puppet-lint-absolute_classname-check', '>= 2.0.0',           :require => false
+  gem 'puppet-lint-topscope-variable-check',                        :require => false
+  gem 'puppet-lint-legacy_facts-check',                             :require => false
+  gem 'puppet-lint-anchor-check',                                   :require => false
+  gem 'metadata-json-lint',                                         :require => false
+  gem 'redcarpet',                                                  :require => false
+  gem 'rubocop', '~> 0.49.1',                                       :require => false
+  gem 'rubocop-rspec', '~> 1.15.0',                                 :require => false
+  gem 'mocha', '~> 1.4.0',                                          :require => false
+  gem 'coveralls',                                                  :require => false
+  gem 'simplecov-console',                                          :require => false
+  gem 'parallel_tests',                                             :require => false
+end
+
+group :development do
+  gem 'travis',                   :require => false
+  gem 'travis-lint',              :require => false
+  gem 'guard-rake',               :require => false
+  gem 'overcommit', '>= 0.39.1',  :require => false
+end
+
+group :system_tests do
+  gem 'winrm',                              :require => false
+  if beaker_version = ENV['BEAKER_VERSION']
+    gem 'beaker', *location_for(beaker_version)
+  else
+    gem 'beaker', '>= 4.2.0', :require => false
+  end
+  if beaker_rspec_version = ENV['BEAKER_RSPEC_VERSION']
+    gem 'beaker-rspec', *location_for(beaker_rspec_version)
+  else
+    gem 'beaker-rspec',  :require => false
+  end
+  gem 'serverspec',                         :require => false
+  gem 'beaker-hostgenerator', '>= 1.1.22',  :require => false
+  gem 'beaker-docker',                      :require => false
+  gem 'beaker-puppet',                      :require => false
+  gem 'beaker-puppet_install_helper',       :require => false
+  gem 'beaker-module_install_helper',       :require => false
+  gem 'rbnacl', '>= 4',                     :require => false
+  gem 'rbnacl-libsodium',                   :require => false
+  gem 'bcrypt_pbkdf',                       :require => false
+  gem 'ed25519',                            :require => false
+end
+
+group :release do
+  gem 'github_changelog_generator',  :require => false, :git => 'https://github.com/voxpupuli/github-changelog-generator', :branch => 'voxpupuli_essential_fixes'
+  gem 'puppet-blacksmith',           :require => false
+  gem 'voxpupuli-release',           :require => false
+  gem 'puppet-strings', '>= 2.2',    :require => false
+end
+
+
+
+if facterversion = ENV['FACTER_GEM_VERSION']
+  gem 'facter', facterversion.to_s, :require => false, :groups => [:test]
+else
+  gem 'facter', :require => false, :groups => [:test]
+end
+
+ENV['PUPPET_VERSION'].nil? ? puppetversion = '~> 6.0' : puppetversion = ENV['PUPPET_VERSION'].to_s
+gem 'puppet', puppetversion, :require => false, :groups => [:test]
+
+# vim: syntax=ruby
Index: src/puppetcode/environments/gnuboat/modules/extlib/LICENSE
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/LICENSE	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/LICENSE	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,202 @@
+                              Apache License
+                        Version 2.0, January 2004
+                     http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+   "License" shall mean the terms and conditions for use, reproduction,
+   and distribution as defined by Sections 1 through 9 of this document.
+
+   "Licensor" shall mean the copyright owner or entity authorized by
+   the copyright owner that is granting the License.
+
+   "Legal Entity" shall mean the union of the acting entity and all
+   other entities that control, are controlled by, or are under common
+   control with that entity. For the purposes of this definition,
+   "control" means (i) the power, direct or indirect, to cause the
+   direction or management of such entity, whether by contract or
+   otherwise, or (ii) ownership of fifty percent (50%) or more of the
+   outstanding shares, or (iii) beneficial ownership of such entity.
+
+   "You" (or "Your") shall mean an individual or Legal Entity
+   exercising permissions granted by this License.
+
+   "Source" form shall mean the preferred form for making modifications,
+   including but not limited to software source code, documentation
+   source, and configuration files.
+
+   "Object" form shall mean any form resulting from mechanical
+   transformation or translation of a Source form, including but
+   not limited to compiled object code, generated documentation,
+   and conversions to other media types.
+
+   "Work" shall mean the work of authorship, whether in Source or
+   Object form, made available under the License, as indicated by a
+   copyright notice that is included in or attached to the work
+   (an example is provided in the Appendix below).
+
+   "Derivative Works" shall mean any work, whether in Source or Object
+   form, that is based on (or derived from) the Work and for which the
+   editorial revisions, annotations, elaborations, or other modifications
+   represent, as a whole, an original work of authorship. For the purposes
+   of this License, Derivative Works shall not include works that remain
+   separable from, or merely link (or bind by name) to the interfaces of,
+   the Work and Derivative Works thereof.
+
+   "Contribution" shall mean any work of authorship, including
+   the original version of the Work and any modifications or additions
+   to that Work or Derivative Works thereof, that is intentionally
+   submitted to Licensor for inclusion in the Work by the copyright owner
+   or by an individual or Legal Entity authorized to submit on behalf of
+   the copyright owner. For the purposes of this definition, "submitted"
+   means any form of electronic, verbal, or written communication sent
+   to the Licensor or its representatives, including but not limited to
+   communication on electronic mailing lists, source code control systems,
+   and issue tracking systems that are managed by, or on behalf of, the
+   Licensor for the purpose of discussing and improving the Work, but
+   excluding communication that is conspicuously marked or otherwise
+   designated in writing by the copyright owner as "Not a Contribution."
+
+   "Contributor" shall mean Licensor and any individual or Legal Entity
+   on behalf of whom a Contribution has been received by Licensor and
+   subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of
+   this License, each Contributor hereby grants to You a perpetual,
+   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+   copyright license to reproduce, prepare Derivative Works of,
+   publicly display, publicly perform, sublicense, and distribute the
+   Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of
+   this License, each Contributor hereby grants to You a perpetual,
+   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+   (except as stated in this section) patent license to make, have made,
+   use, offer to sell, sell, import, and otherwise transfer the Work,
+   where such license applies only to those patent claims licensable
+   by such Contributor that are necessarily infringed by their
+   Contribution(s) alone or by combination of their Contribution(s)
+   with the Work to which such Contribution(s) was submitted. If You
+   institute patent litigation against any entity (including a
+   cross-claim or counterclaim in a lawsuit) alleging that the Work
+   or a Contribution incorporated within the Work constitutes direct
+   or contributory patent infringement, then any patent licenses
+   granted to You under this License for that Work shall terminate
+   as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the
+   Work or Derivative Works thereof in any medium, with or without
+   modifications, and in Source or Object form, provided that You
+   meet the following conditions:
+
+   (a) You must give any other recipients of the Work or
+       Derivative Works a copy of this License; and
+
+   (b) You must cause any modified files to carry prominent notices
+       stating that You changed the files; and
+
+   (c) You must retain, in the Source form of any Derivative Works
+       that You distribute, all copyright, patent, trademark, and
+       attribution notices from the Source form of the Work,
+       excluding those notices that do not pertain to any part of
+       the Derivative Works; and
+
+   (d) If the Work includes a "NOTICE" text file as part of its
+       distribution, then any Derivative Works that You distribute must
+       include a readable copy of the attribution notices contained
+       within such NOTICE file, excluding those notices that do not
+       pertain to any part of the Derivative Works, in at least one
+       of the following places: within a NOTICE text file distributed
+       as part of the Derivative Works; within the Source form or
+       documentation, if provided along with the Derivative Works; or,
+       within a display generated by the Derivative Works, if and
+       wherever such third-party notices normally appear. The contents
+       of the NOTICE file are for informational purposes only and
+       do not modify the License. You may add Your own attribution
+       notices within Derivative Works that You distribute, alongside
+       or as an addendum to the NOTICE text from the Work, provided
+       that such additional attribution notices cannot be construed
+       as modifying the License.
+
+   You may add Your own copyright statement to Your modifications and
+   may provide additional or different license terms and conditions
+   for use, reproduction, or distribution of Your modifications, or
+   for any such Derivative Works as a whole, provided Your use,
+   reproduction, and distribution of the Work otherwise complies with
+   the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise,
+   any Contribution intentionally submitted for inclusion in the Work
+   by You to the Licensor shall be under the terms and conditions of
+   this License, without any additional terms or conditions.
+   Notwithstanding the above, nothing herein shall supersede or modify
+   the terms of any separate license agreement you may have executed
+   with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade
+   names, trademarks, service marks, or product names of the Licensor,
+   except as required for reasonable and customary use in describing the
+   origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or
+   agreed to in writing, Licensor provides the Work (and each
+   Contributor provides its Contributions) on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+   implied, including, without limitation, any warranties or conditions
+   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+   PARTICULAR PURPOSE. You are solely responsible for determining the
+   appropriateness of using or redistributing the Work and assume any
+   risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory,
+   whether in tort (including negligence), contract, or otherwise,
+   unless required by applicable law (such as deliberate and grossly
+   negligent acts) or agreed to in writing, shall any Contributor be
+   liable to You for damages, including any direct, indirect, special,
+   incidental, or consequential damages of any character arising as a
+   result of this License or out of the use or inability to use the
+   Work (including but not limited to damages for loss of goodwill,
+   work stoppage, computer failure or malfunction, or any and all
+   other commercial damages or losses), even if such Contributor
+   has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing
+   the Work or Derivative Works thereof, You may choose to offer,
+   and charge a fee for, acceptance of support, warranty, indemnity,
+   or other liability obligations and/or rights consistent with this
+   License. However, in accepting such obligations, You may act only
+   on Your own behalf and on Your sole responsibility, not on behalf
+   of any other Contributor, and only if You agree to indemnify,
+   defend, and hold each Contributor harmless for any liability
+   incurred by, or claims asserted against, such Contributor by reason
+   of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+   To apply the Apache License to your work, attach the following
+   boilerplate notice, with the fields enclosed by brackets "[]"
+   replaced with your own identifying information. (Don't include
+   the brackets!)  The text should be enclosed in the appropriate
+   comment syntax for the file format. We also recommend that a
+   file or class name and description of purpose be included on the
+   same "printed page" as the copyright notice for easier
+   identification within third-party archives.
+
+Copyright [yyyy] [name of copyright owner]
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
Index: src/puppetcode/environments/gnuboat/modules/extlib/README.md
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/README.md	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/README.md	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,79 @@
+# Extlib module for Puppet
+
+[![Build Status](https://travis-ci.org/voxpupuli/puppet-extlib.png?branch=master)](https://travis-ci.org/voxpupuli/puppet-extlib)
+[![Puppet Forge](https://img.shields.io/puppetforge/v/puppet/extlib.svg)](https://forge.puppetlabs.com/puppet/extlib)
+[![Puppet Forge - downloads](https://img.shields.io/puppetforge/dt/puppet/extlib.svg)](https://forge.puppetlabs.com/puppet/extlib)
+[![Puppet Forge - endorsement](https://img.shields.io/puppetforge/e/puppet/extlib.svg)](https://forge.puppetlabs.com/puppet/extlib)
+[![Puppet Forge - scores](https://img.shields.io/puppetforge/f/puppet/extlib.svg)](https://forge.puppetlabs.com/puppet/extlib)
+
+#### Table of Contents
+
+1. [Overview](#overview)
+2. [Setup - The basics of getting started with extlib](#setup)
+3. [Usage - Configuration options and additional functionality](#usage)
+4. [Limitations - OS compatibility, etc.](#limitations)
+5. [Development - Guide for contributing to the module](#development)
+
+## Overview
+
+This module provides functions and facts that are out of scope for [stdlib](https://github.com/puppetlabs/puppetlabs-stdlib).
+Some of them are even intrinsically tied to stdlib.
+
+## Setup
+
+```console
+ % puppet module install puppet-extlib
+```
+
+## Usage
+
+Since `puppet/extlib` version 3, all functions are provided under the `extlib` namespace.
+Non namespaced versions were removed in version 5.
+
+All functions are documented in [REFERENCE.md](REFERENCE.md)
+
+### Facts
+
+All facts in this module are namespaced and begin `extlib__`.
+Facter 4 users can also find all facts under a single `extlib` toplevel structured fact.
+
+#### `extlib__puppet_config` (or `extlib['puppet_config']` when using facter 4).
+
+A fact to expose puppet.conf settings. These are resolved on the agent, (unlike `$settings::<setting_name>` which is resolved on the puppet master).
+
+The following sections/settings are included.
+
+```
+{
+  main => {
+    hostpubkey,
+    hostprivkey,
+    hostcert,
+    localcacert,
+    ssldir,
+    vardir,
+    server,
+  },
+  master => {
+    localcacert,
+    ssldir,
+  }
+}
+```
+
+## Limitations
+
+Some functions require puppetlabs-stdlib (>= 4.6.0) and all functions are only compatible with Puppet 4.7 and later.
+
+## Development
+
+We highly welcome new contributions to this module, especially those that
+include documentation, and rspec tests ;) but will happily guide you through
+the process, so, yes, please submit that pull request!
+
+Reference documentation is generated using puppet-strings.
+To regenerate it, please run the rake task as follows.
+
+```console
+bundle exec rake reference
+```
Index: src/puppetcode/environments/gnuboat/modules/extlib/REFERENCE.md
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/REFERENCE.md	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/REFERENCE.md	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,745 @@
+# Reference
+<!-- DO NOT EDIT: This document was generated by Puppet Strings -->
+
+## Table of Contents
+
+**Functions**
+
+* [`extlib::cache_data`](#extlibcache_data): Retrieves data from a cache file, or creates it with supplied data if the file doesn't exist
+* [`extlib::default_content`](#extlibdefault_content): Takes an optional content and an optional template name and returns the contents of a file.
+* [`extlib::dir_split`](#extlibdir_split): Splits the given directory or directories into individual paths.
+* [`extlib::dump_args`](#extlibdump_args): Prints the args to STDOUT in Pretty JSON format.
+* [`extlib::echo`](#extlibecho): This function outputs the variable content and its type to the debug log. It's similiar to the `notice` function but provides a better output
+* [`extlib::file_separator`](#extlibfile_separator): Returns the os specific file path separator.
+* [`extlib::has_module`](#extlibhas_module): A function that lets you know whether a specific module is on your modulepath.
+* [`extlib::ip_to_cron`](#extlibip_to_cron): Provides a "random" value to cron based on the last bit of the machine IP address. used to avoid starting a certain cron job at the same time
+* [`extlib::mkdir_p`](#extlibmkdir_p): Like the unix command mkdir_p except with puppet code.
+* [`extlib::path_join`](#extlibpath_join): Take one or more paths and join them together using the os specific separator.
+* [`extlib::random_password`](#extlibrandom_password): A function to return a string of arbitrary length that contains randomly selected characters.
+* [`extlib::read_url`](#extlibread_url): Fetch a string from a URL (should only be used with 'small' remote files).  This function should only be used with trusted/internal sources. 
+* [`extlib::resources_deep_merge`](#extlibresources_deep_merge): Deeply merge a "defaults" hash into a "resources" hash like the ones expected by `create_resources()`.
+* [`extlib::sort_by_version`](#extlibsort_by_version): A function that sorts an array of version numbers.
+
+## Functions
+
+### extlib::cache_data
+
+Type: Ruby 4.x API
+
+Retrieves data from a cache file, or creates it with supplied data if the
+file doesn't exist
+
+Useful for having data that's randomly generated once on the master side
+(e.g. a password), but then stays the same on subsequent runs. Because it's
+stored on the master on disk, it doesn't work when you use mulitple Puppet
+masters that don't share their vardir.
+
+#### Examples
+
+##### Calling the function
+
+```puppet
+$password = cache_data('mysql', 'mysql_password', 'this_is_my_password')
+```
+
+##### With a random password
+
+```puppet
+$password = cache_data('mysql', 'mysql_password', random_password())
+```
+
+#### `extlib::cache_data(String[1] $namespace, String[1] $name, Any $initial_data)`
+
+Retrieves data from a cache file, or creates it with supplied data if the
+file doesn't exist
+
+Useful for having data that's randomly generated once on the master side
+(e.g. a password), but then stays the same on subsequent runs. Because it's
+stored on the master on disk, it doesn't work when you use mulitple Puppet
+masters that don't share their vardir.
+
+Returns: `Any` The cached value when it exists. The initial data when no cache exists
+
+##### Examples
+
+###### Calling the function
+
+```puppet
+$password = cache_data('mysql', 'mysql_password', 'this_is_my_password')
+```
+
+###### With a random password
+
+```puppet
+$password = cache_data('mysql', 'mysql_password', random_password())
+```
+
+##### `namespace`
+
+Data type: `String[1]`
+
+Namespace for the cache
+
+##### `name`
+
+Data type: `String[1]`
+
+Cache key within the namespace
+
+##### `initial_data`
+
+Data type: `Any`
+
+The data for when there is no cache yet
+
+### extlib::default_content
+
+Type: Ruby 4.x API
+
+Takes an optional content and an optional template name and returns the contents of a file.
+
+#### Examples
+
+##### Using the function with a file resource.
+
+```puppet
+$config_file_content = default_content($file_content, $template_location)
+file { '/tmp/x':
+  ensure  => 'file',
+  content => $config_file_content,
+}
+```
+
+#### `extlib::default_content(Optional[String] $content, Optional[String] $template_name)`
+
+Takes an optional content and an optional template name and returns the contents of a file.
+
+Returns: `Optional[String]` Returns the value of the content parameter if it's a non empty string.
+Otherwise returns the rendered output from `template_name`.
+Returns `undef` if both `content` and `template_name` are `undef`.
+
+##### Examples
+
+###### Using the function with a file resource.
+
+```puppet
+$config_file_content = default_content($file_content, $template_location)
+file { '/tmp/x':
+  ensure  => 'file',
+  content => $config_file_content,
+}
+```
+
+##### `content`
+
+Data type: `Optional[String]`
+
+
+
+##### `template_name`
+
+Data type: `Optional[String]`
+
+The path to an .erb or .epp template file or `undef`.
+
+### extlib::dir_split
+
+Type: Puppet Language
+
+Use this function when you need to split a absolute path into multiple absolute paths
+that all descend from the given path.
+
+#### Examples
+
+##### calling the function
+
+```puppet
+extlib::dir_split('/opt/puppetlabs') => ['/opt', '/opt/puppetlabs']
+```
+
+#### `extlib::dir_split(Variant[Stdlib::Absolutepath, Array[Stdlib::Absolutepath]] $dirs)`
+
+Use this function when you need to split a absolute path into multiple absolute paths
+that all descend from the given path.
+
+Returns: `Array[String]` - an array of absolute paths after being cut into individual paths.
+
+##### Examples
+
+###### calling the function
+
+```puppet
+extlib::dir_split('/opt/puppetlabs') => ['/opt', '/opt/puppetlabs']
+```
+
+##### `dirs`
+
+Data type: `Variant[Stdlib::Absolutepath, Array[Stdlib::Absolutepath]]`
+
+- either an absolute path or a array of absolute paths.
+
+### extlib::dump_args
+
+Type: Ruby 4.x API
+
+Prints the args to STDOUT in Pretty JSON format.
+
+Useful for debugging purposes only. Ideally you would use this in
+conjunction with a rspec-puppet unit test.  Otherwise the output will
+be shown during a puppet run when verbose/debug options are enabled.
+
+#### `extlib::dump_args(Any $args)`
+
+Prints the args to STDOUT in Pretty JSON format.
+
+Useful for debugging purposes only. Ideally you would use this in
+conjunction with a rspec-puppet unit test.  Otherwise the output will
+be shown during a puppet run when verbose/debug options are enabled.
+
+Returns: `Undef` Returns nothing.
+
+##### `args`
+
+Data type: `Any`
+
+The data you want to dump as pretty JSON.
+
+### extlib::echo
+
+Type: Ruby 4.x API
+
+This function outputs the variable content and its type to the
+debug log. It's similiar to the `notice` function but provides
+a better output format useful to trace variable types and values
+in the manifests.
+
+```
+$v1 = 'test'
+$v2 = ["1", "2", "3"]
+$v3 = {"a"=>"1", "b"=>"2"}
+$v4 = true
+# $v5 is not defined
+$v6 = { "b" => { "b" => [1,2,3], "c" => true, "d" => { 'x' => 'y' }}, 'x' => 'y', 'z' => [1,2,3,4,5,6]}
+$v7 = 12345
+
+echo($v1, 'My string')
+echo($v2, 'My array')
+echo($v3, 'My hash')
+echo($v4, 'My boolean')
+echo($v5, 'My undef')
+echo($v6, 'My structure')
+echo($v7) # no comment here
+debug log output
+My string (String) "test"
+My array (Array) ["1", "2", "3"]
+My hash (Hash) {"a"=>"1", "b"=>"2"}
+My boolean (TrueClass) true
+My undef (String) ""
+My structure (Hash) {"b"=>{"b"=>["1", "2", "3"], "c"=>true, "d"=>{"x"=>"y"}}, "x"=>"y", "z"=>["1", "2", "3", "4", "5", "6"]}
+(String) "12345"
+```
+
+#### `extlib::echo(Any $value, Optional[String] $comment)`
+
+This function outputs the variable content and its type to the
+debug log. It's similiar to the `notice` function but provides
+a better output format useful to trace variable types and values
+in the manifests.
+
+```
+$v1 = 'test'
+$v2 = ["1", "2", "3"]
+$v3 = {"a"=>"1", "b"=>"2"}
+$v4 = true
+# $v5 is not defined
+$v6 = { "b" => { "b" => [1,2,3], "c" => true, "d" => { 'x' => 'y' }}, 'x' => 'y', 'z' => [1,2,3,4,5,6]}
+$v7 = 12345
+
+echo($v1, 'My string')
+echo($v2, 'My array')
+echo($v3, 'My hash')
+echo($v4, 'My boolean')
+echo($v5, 'My undef')
+echo($v6, 'My structure')
+echo($v7) # no comment here
+debug log output
+My string (String) "test"
+My array (Array) ["1", "2", "3"]
+My hash (Hash) {"a"=>"1", "b"=>"2"}
+My boolean (TrueClass) true
+My undef (String) ""
+My structure (Hash) {"b"=>{"b"=>["1", "2", "3"], "c"=>true, "d"=>{"x"=>"y"}}, "x"=>"y", "z"=>["1", "2", "3", "4", "5", "6"]}
+(String) "12345"
+```
+
+Returns: `Undef` Returns nothing.
+
+##### `value`
+
+Data type: `Any`
+
+The value you want to inspect.
+
+##### `comment`
+
+Data type: `Optional[String]`
+
+An optional comment to prepend to the debug output.
+
+### extlib::file_separator
+
+Type: Puppet Language
+
+Returns the os specific file path separator.
+
+#### Examples
+
+##### Example of how to use
+
+```puppet
+extlib::file_separator() => '/'
+```
+
+#### `extlib::file_separator()`
+
+The extlib::file_separator function.
+
+Returns: `String` - The os specific path separator.
+
+##### Examples
+
+###### Example of how to use
+
+```puppet
+extlib::file_separator() => '/'
+```
+
+### extlib::has_module
+
+Type: Ruby 4.x API
+
+A function that lets you know whether a specific module is on your modulepath.
+
+#### Examples
+
+##### Calling the function
+
+```puppet
+extlib::has_module('camptocamp/systemd')
+```
+
+#### `extlib::has_module(Pattern[/\A\w+[-\/]\w+\z/] $module_name)`
+
+A function that lets you know whether a specific module is on your modulepath.
+
+Returns: `Boolean` Returns `true` or `false`.
+
+##### Examples
+
+###### Calling the function
+
+```puppet
+extlib::has_module('camptocamp/systemd')
+```
+
+##### `module_name`
+
+Data type: `Pattern[/\A\w+[-\/]\w+\z/]`
+
+The full name of the module you want to know exists or not.
+Namespace and modulename can be separated with either `-` or `/`.
+
+### extlib::ip_to_cron
+
+Type: Ruby 4.x API
+
+Provides a "random" value to cron based on the last bit of the machine IP address.
+used to avoid starting a certain cron job at the same time on all servers.
+Takes the runinterval in seconds as parameter and returns an array of [hour, minute]
+
+example usage
+```
+ip_to_cron(3600) - returns [ '*', one value between 0..59 ]
+ip_to_cron(1800) - returns [ '*', an array of two values between 0..59 ]
+ip_to_cron(7200) - returns [ an array of twelve values between 0..23, one value between 0..59 ]
+```
+
+#### `extlib::ip_to_cron(Optional[Integer[1]] $runinterval)`
+
+Provides a "random" value to cron based on the last bit of the machine IP address.
+used to avoid starting a certain cron job at the same time on all servers.
+Takes the runinterval in seconds as parameter and returns an array of [hour, minute]
+
+example usage
+```
+ip_to_cron(3600) - returns [ '*', one value between 0..59 ]
+ip_to_cron(1800) - returns [ '*', an array of two values between 0..59 ]
+ip_to_cron(7200) - returns [ an array of twelve values between 0..23, one value between 0..59 ]
+```
+
+Returns: `Array`
+
+##### `runinterval`
+
+Data type: `Optional[Integer[1]]`
+
+The number of seconds to use as the run interval
+
+### extlib::mkdir_p
+
+Type: Puppet Language
+
+This creates file resources for all directories and utilizes the dir_split() function
+to get a list of all the descendant directories.  You will have no control over any other parameters
+for the file resource.  If you wish to control the file resources you can use the dir_split() function
+and get an array of directories for use in your own code.  Please note this does not use an exec resource.
+
+* **Note** splits the given directories into paths that are then created using file resources
+
+#### Examples
+
+##### How to use
+
+```puppet
+extlib::mkdir_p('/opt/puppetlabs/bin') => ['/opt', '/opt/puppetlabs', '/opt/puppetlabs/bin']
+```
+
+#### `extlib::mkdir_p(Variant[Stdlib::Absolutepath, Array[Stdlib::Absolutepath]] $dirs)`
+
+This creates file resources for all directories and utilizes the dir_split() function
+to get a list of all the descendant directories.  You will have no control over any other parameters
+for the file resource.  If you wish to control the file resources you can use the dir_split() function
+and get an array of directories for use in your own code.  Please note this does not use an exec resource.
+
+Returns: `Array[Stdlib::Absolutepath]`
+
+##### Examples
+
+###### How to use
+
+```puppet
+extlib::mkdir_p('/opt/puppetlabs/bin') => ['/opt', '/opt/puppetlabs', '/opt/puppetlabs/bin']
+```
+
+##### `dirs`
+
+Data type: `Variant[Stdlib::Absolutepath, Array[Stdlib::Absolutepath]]`
+
+- the path(s) to create
+
+### extlib::path_join
+
+Type: Puppet Language
+
+Because in how windows uses a different separator this function
+will format a windows path into a equilivent unix like path.  This type of unix like
+path will work on windows.
+
+#### Examples
+
+##### Joining Unix paths to return `/tmp/test/libs`
+
+```puppet
+extlib::path_join('/tmp', 'test', 'libs')
+```
+
+##### Joining Windows paths to return `/c/test/libs`
+
+```puppet
+extlib::path_join('c:', 'test', 'libs')
+```
+
+#### `extlib::path_join(Array[String] $dirs)`
+
+Because in how windows uses a different separator this function
+will format a windows path into a equilivent unix like path.  This type of unix like
+path will work on windows.
+
+Returns: `Stdlib::Absolutepath` The joined path
+
+##### Examples
+
+###### Joining Unix paths to return `/tmp/test/libs`
+
+```puppet
+extlib::path_join('/tmp', 'test', 'libs')
+```
+
+###### Joining Windows paths to return `/c/test/libs`
+
+```puppet
+extlib::path_join('c:', 'test', 'libs')
+```
+
+##### `dirs`
+
+Data type: `Array[String]`
+
+Joins two or more directories by file separator.
+
+### extlib::random_password
+
+Type: Ruby 4.x API
+
+A function to return a string of arbitrary length that contains randomly selected characters.
+
+#### Examples
+
+##### Calling the function
+
+```puppet
+random_password(42)
+```
+
+#### `extlib::random_password(Integer[1] $length)`
+
+A function to return a string of arbitrary length that contains randomly selected characters.
+
+Returns: `String` The random string returned consists of alphanumeric characters excluding 'look-alike' characters.
+
+##### Examples
+
+###### Calling the function
+
+```puppet
+random_password(42)
+```
+
+##### `length`
+
+Data type: `Integer[1]`
+
+The length of random password you want generated.
+
+### extlib::read_url
+
+Type: Ruby 4.x API
+
+Fetch a string from a URL (should only be used with 'small' remote files).
+
+This function should only be used with trusted/internal sources.
+This is especially important if using it in conjunction with `inline_template`
+or `inline_epp`.
+The current implementation is also very basic.  No thought has gone into timeouts,
+support for redirects, CA paths etc.
+
+#### Examples
+
+##### Calling the function
+
+```puppet
+extlib::read_url('https://example.com/sometemplate.epp')
+```
+
+#### `extlib::read_url(Stdlib::HTTPUrl $url)`
+
+Fetch a string from a URL (should only be used with 'small' remote files).
+
+This function should only be used with trusted/internal sources.
+This is especially important if using it in conjunction with `inline_template`
+or `inline_epp`.
+The current implementation is also very basic.  No thought has gone into timeouts,
+support for redirects, CA paths etc.
+
+Returns: `String` Returns the contents of the url as a string
+
+##### Examples
+
+###### Calling the function
+
+```puppet
+extlib::read_url('https://example.com/sometemplate.epp')
+```
+
+##### `url`
+
+Data type: `Stdlib::HTTPUrl`
+
+The URL to read from
+
+### extlib::resources_deep_merge
+
+Type: Ruby 4.x API
+
+Deeply merge a "defaults" hash into a "resources" hash like the ones expected by `create_resources()`.
+
+Internally calls the puppetlabs-stdlib function `deep_merge()`. In case of
+duplicate keys the `resources` hash keys win over the `defaults` hash keys.
+
+Example
+```puppet
+$defaults_hash = {
+  'one'   => '1',
+  'two'   => '2',
+  'three' => '3',
+  'four'  => {
+    'five'  => '5',
+    'six'   => '6',
+    'seven' => '7',
+  }
+}
+
+$numbers_hash = {
+  'german' => {
+    'one'   => 'eins',
+    'three' => 'drei',
+    'four'  => {
+      'six' => 'sechs',
+    },
+  },
+  'french' => {
+    'one' => 'un',
+    'two' => 'deux',
+    'four' => {
+      'five'  => 'cinq',
+      'seven' => 'sept',
+    },
+  }
+}
+
+$result_hash = resources_deep_merge($numbers_hash, $defaults_hash)
+```
+
+The $result_hash then looks like this:
+
+```puppet
+$result_hash = {
+  'german' => {
+    'one'   => 'eins',
+    'two'   => '2',
+    'three' => 'drei',
+    'four'  => {
+      'five'  => '5',
+      'six'   => 'sechs',
+      'seven' => '7',
+    }
+  },
+  'french' => {
+    'one'   => 'un',
+    'two'   => 'deux',
+    'three' => '3',
+    'four'  => {
+      'five'  => 'cinq',
+      'six'   => '6',
+      'seven' => 'sept',
+    }
+  }
+}
+```
+
+#### `extlib::resources_deep_merge(Hash $resources, Hash $defaults)`
+
+Deeply merge a "defaults" hash into a "resources" hash like the ones expected by `create_resources()`.
+
+Internally calls the puppetlabs-stdlib function `deep_merge()`. In case of
+duplicate keys the `resources` hash keys win over the `defaults` hash keys.
+
+Example
+```puppet
+$defaults_hash = {
+  'one'   => '1',
+  'two'   => '2',
+  'three' => '3',
+  'four'  => {
+    'five'  => '5',
+    'six'   => '6',
+    'seven' => '7',
+  }
+}
+
+$numbers_hash = {
+  'german' => {
+    'one'   => 'eins',
+    'three' => 'drei',
+    'four'  => {
+      'six' => 'sechs',
+    },
+  },
+  'french' => {
+    'one' => 'un',
+    'two' => 'deux',
+    'four' => {
+      'five'  => 'cinq',
+      'seven' => 'sept',
+    },
+  }
+}
+
+$result_hash = resources_deep_merge($numbers_hash, $defaults_hash)
+```
+
+The $result_hash then looks like this:
+
+```puppet
+$result_hash = {
+  'german' => {
+    'one'   => 'eins',
+    'two'   => '2',
+    'three' => 'drei',
+    'four'  => {
+      'five'  => '5',
+      'six'   => 'sechs',
+      'seven' => '7',
+    }
+  },
+  'french' => {
+    'one'   => 'un',
+    'two'   => 'deux',
+    'three' => '3',
+    'four'  => {
+      'five'  => 'cinq',
+      'six'   => '6',
+      'seven' => 'sept',
+    }
+  }
+}
+```
+
+Returns: `Hash` Returns the merged hash.
+
+##### `resources`
+
+Data type: `Hash`
+
+The hash of resources.
+
+##### `defaults`
+
+Data type: `Hash`
+
+The hash of defaults to merge.
+
+### extlib::sort_by_version
+
+Type: Ruby 4.x API
+
+A function that sorts an array of version numbers.
+
+#### Examples
+
+##### Calling the function
+
+```puppet
+extlib::sort_by_version(['10.0.0b12', '10.0.0b3', '10.0.0a2', '9.0.10', '9.0.3'])
+```
+
+#### `extlib::sort_by_version(Array[String] $versions)`
+
+A function that sorts an array of version numbers.
+
+Returns: `Array[String]` Returns the sorted array.
+
+##### Examples
+
+###### Calling the function
+
+```puppet
+extlib::sort_by_version(['10.0.0b12', '10.0.0b3', '10.0.0a2', '9.0.10', '9.0.3'])
+```
+
+##### `versions`
+
+Data type: `Array[String]`
+
+An array of version strings you want sorted.
+
Index: src/puppetcode/environments/gnuboat/modules/extlib/Rakefile
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/Rakefile	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/Rakefile	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,85 @@
+require 'puppetlabs_spec_helper/rake_tasks'
+
+# load optional tasks for releases
+# only available if gem group releases is installed
+begin
+  require 'voxpupuli/release/rake_tasks'
+rescue LoadError
+end
+
+PuppetLint.configuration.log_format = '%{path}:%{line}:%{check}:%{KIND}:%{message}'
+
+desc 'Auto-correct puppet-lint offenses'
+task 'lint:auto_correct' do
+  Rake::Task[:lint_fix].invoke
+end
+
+desc 'Run acceptance tests'
+RSpec::Core::RakeTask.new(:acceptance) do |t|
+  t.pattern = 'spec/acceptance'
+end
+
+desc 'Run tests'
+task test: [:release_checks]
+
+namespace :check do
+  desc 'Check for trailing whitespace'
+  task :trailing_whitespace do
+    Dir.glob('**/*.md', File::FNM_DOTMATCH).sort.each do |filename|
+      next if filename =~ %r{^((modules|acceptance|\.?vendor|spec/fixtures|pkg)/|REFERENCE.md)}
+      File.foreach(filename).each_with_index do |line, index|
+        if line =~ %r{\s\n$}
+          puts "#{filename} has trailing whitespace on line #{index + 1}"
+          exit 1
+        end
+      end
+    end
+  end
+end
+Rake::Task[:release_checks].enhance ['check:trailing_whitespace']
+
+desc "Run main 'test' task and report merged results to coveralls"
+task test_with_coveralls: [:test] do
+  if Dir.exist?(File.expand_path('../lib', __FILE__))
+    require 'coveralls/rake/task'
+    Coveralls::RakeTask.new
+    Rake::Task['coveralls:push'].invoke
+  else
+    puts 'Skipping reporting to coveralls.  Module has no lib dir'
+  end
+end
+
+desc 'Generate REFERENCE.md'
+task :reference, [:debug, :backtrace] do |t, args|
+  patterns = ''
+  Rake::Task['strings:generate:reference'].invoke(patterns, args[:debug], args[:backtrace])
+end
+
+begin
+  require 'github_changelog_generator/task'
+  GitHubChangelogGenerator::RakeTask.new :changelog do |config|
+    version = (Blacksmith::Modulefile.new).version
+    config.future_release = "v#{version}" if version =~ /^\d+\.\d+.\d+$/
+    config.header = "# Changelog\n\nAll notable changes to this project will be documented in this file.\nEach new release typically also includes the latest modulesync defaults.\nThese should not affect the functionality of the module."
+    config.exclude_labels = %w{duplicate question invalid wontfix wont-fix modulesync skip-changelog}
+    config.user = 'voxpupuli'
+    metadata_json = File.join(File.dirname(__FILE__), 'metadata.json')
+    metadata = JSON.load(File.read(metadata_json))
+    config.project = metadata['name']
+  end
+
+  # Workaround for https://github.com/github-changelog-generator/github-changelog-generator/issues/715
+  require 'rbconfig'
+  if RbConfig::CONFIG['host_os'] =~ /linux/
+    task :changelog do
+      puts 'Fixing line endings...'
+      changelog_file = File.join(__dir__, 'CHANGELOG.md')
+      changelog_txt = File.read(changelog_file)
+      new_contents = changelog_txt.gsub(%r{\r\n}, "\n")
+      File.open(changelog_file, "w") {|file| file.puts new_contents }
+    end
+  end
+
+rescue LoadError
+end
+# vim: syntax=ruby
Index: src/puppetcode/environments/gnuboat/modules/extlib/checksums.json
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/checksums.json	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/checksums.json	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,48 @@
+{
+  "CHANGELOG.md": "b5a94d4eb28751e72550d5b1a60a44ef",
+  "Gemfile": "b79dff2bb8f6133dda0fd1d08378cf11",
+  "LICENSE": "47bbee59c4c1cb14cc3667035a227be0",
+  "README.md": "eae5b0efd9b92884da8a28db9d192437",
+  "REFERENCE.md": "76c61164b6941fa83c53bd35ed6793eb",
+  "Rakefile": "b8f05e37a630a753bb2c5d6119d13109",
+  "functions/dir_split.pp": "9562faf3cdf8065516e3e5dc3e7902e6",
+  "functions/file_separator.pp": "37a60ede8ccb6cf2352e06455a3584e5",
+  "functions/mkdir_p.pp": "ebb19ae142b0ca5f241ad7f3f8861e92",
+  "functions/path_join.pp": "8f9e888f268f9e3198243df7d4f302b3",
+  "lib/facter/extlib__puppet_config.rb": "1028830968547bdd9c2aec9d1484e6a8",
+  "lib/puppet/functions/extlib/cache_data.rb": "636086e25b9aadee49198e29b862366f",
+  "lib/puppet/functions/extlib/default_content.rb": "290d994d1ac3e1994de7c7afb7015d54",
+  "lib/puppet/functions/extlib/dump_args.rb": "5410bb8374e75e94d13c881211548676",
+  "lib/puppet/functions/extlib/echo.rb": "8d597705fa8511d78f910c5be0c49ffc",
+  "lib/puppet/functions/extlib/has_module.rb": "e44a5c23088a5b597e30171053ca13bd",
+  "lib/puppet/functions/extlib/ip_to_cron.rb": "7fac665c4eddec7b5c88768bf05c4764",
+  "lib/puppet/functions/extlib/random_password.rb": "f355e6ccf675647b58cb6c1d7a6f2ef7",
+  "lib/puppet/functions/extlib/read_url.rb": "1ad979a0796ffacbdf1217256b8297f0",
+  "lib/puppet/functions/extlib/resources_deep_merge.rb": "0efda624630493e8d6b11dfef8505e32",
+  "lib/puppet/functions/extlib/sort_by_version.rb": "8931392d8472511201fe7db9e09ee3cf",
+  "metadata.json": "8fe14d73eff5a356324ff1d5092f33d2",
+  "spec/acceptance/nodesets/archlinux-2-x64.yml": "daafcfcb4c8c8766856f52cec6ae5e86",
+  "spec/acceptance/nodesets/ec2/amazonlinux-2016091.yml": "b3dc2d81918fcc6d56855c88ba5b7ce8",
+  "spec/acceptance/nodesets/ec2/image_templates.yaml": "516f9c4c3407993a100090ce9e1a643c",
+  "spec/acceptance/nodesets/ec2/rhel-73-x64.yml": "e74670a1cb8eea32afc879a5d786f9bd",
+  "spec/acceptance/nodesets/ec2/sles-12sp2-x64.yml": "2506efcc9fb420132edc37bf88d6e21d",
+  "spec/acceptance/nodesets/ec2/ubuntu-1604-x64.yml": "87efd97ff1b073c3448f429a8ffc5a7c",
+  "spec/acceptance/nodesets/ec2/windows-2016-base-x64.yml": "e9db4dd16c60c52b433694130c2583a0",
+  "spec/functions/extlib/cache_data_spec.rb": "42c914ba91f59844050cbf2419549758",
+  "spec/functions/extlib/default_content_spec.rb": "d7591d304777d7630c4ca6ade53f2c65",
+  "spec/functions/extlib/dir_split_spec.rb": "52c09a6f2e5e6e4145858ce4692ea42b",
+  "spec/functions/extlib/dump_args_spec.rb": "0a2263b4fa56fb1fee378b4aceb3a451",
+  "spec/functions/extlib/echo_spec.rb": "2f821f405d7ba62e289f10c4bf5fc36b",
+  "spec/functions/extlib/file_separator_spec.rb": "0c4f7ab84c06fd541bb95216e9800d79",
+  "spec/functions/extlib/has_module_spec.rb": "967ab4056ecf46091f0f27e631b21cdc",
+  "spec/functions/extlib/ip_to_cron_spec.rb": "ab2d1854720a4e91d35779f8b95a208b",
+  "spec/functions/extlib/mkdir_p_spec.rb": "4a12eb7d60d7811f817d154326eab22c",
+  "spec/functions/extlib/path_join_spec.rb": "df59d5d50024ae0c1300ed6e21763f26",
+  "spec/functions/extlib/random_password_spec.rb": "7c6a023c2df796692d7f4b9feda2d2f3",
+  "spec/functions/extlib/read_url_spec.rb": "204b0e422753fd43aeb4e378ed99747a",
+  "spec/functions/extlib/resources_deep_merge_spec.rb": "0ef1fc731facde8e5b0035a3f89ead62",
+  "spec/functions/extlib/sort_by_version_spec.rb": "eb201eef4336641a60b59969f0107c20",
+  "spec/spec_helper.rb": "acdb87f6ec6ec9e26c04bc5a2b51b336",
+  "spec/spec_helper_methods.rb": "e29543aef8749fedacf6f003c6568cea",
+  "spec/unit/facter/extlib__puppet_config_spec.rb": "63b0b4b9c85474a64357b1a68fe8cfbc"
+}
Index: src/puppetcode/environments/gnuboat/modules/extlib/functions/dir_split.pp
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/functions/dir_split.pp	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/functions/dir_split.pp	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,25 @@
+# @summary Splits the given directory or directories into individual paths.
+#
+# Use this function when you need to split a absolute path into multiple absolute paths
+# that all descend from the given path.
+#
+# @param dirs [Variant[Stdlib::Absolutepath, Array[Stdlib::Absolutepath]]] - either an absolute path or a array of absolute paths.
+# @return [Array[String]] - an array of absolute paths after being cut into individual paths.
+# @example calling the function
+#  extlib::dir_split('/opt/puppetlabs') => ['/opt', '/opt/puppetlabs']
+function extlib::dir_split(Variant[Stdlib::Absolutepath, Array[Stdlib::Absolutepath]] $dirs) >> Array[String] {
+  $sep = extlib::file_separator()
+
+  $dirs_array = [$dirs].flatten.unique.map | Stdlib::Absolutepath $dir | {
+    $dir.split(shell_escape($sep)).reduce([]) |Array $acc, $value  | {
+        $counter = $acc.length - 1
+        $acc_value = ($acc[$counter] =~ Undef) ? { true => '', false => $acc[$counter] }
+        unless empty($value) {
+          $acc + extlib::path_join([$acc_value, $value])
+        } else {
+          $acc
+        }
+      }
+  }
+  $dirs_array.flatten.unique
+}
Index: src/puppetcode/environments/gnuboat/modules/extlib/functions/file_separator.pp
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/functions/file_separator.pp	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/functions/file_separator.pp	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,7 @@
+# @summary Returns the os specific file path separator.
+# @return [String] - The os specific path separator.
+# @example Example of how to use
+#  extlib::file_separator() => '/'
+function extlib::file_separator() >> String {
+  ($::facts['kernel'] == 'windows' ) ? { true => "\\", false => '/' }
+}
Index: src/puppetcode/environments/gnuboat/modules/extlib/functions/mkdir_p.pp
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/functions/mkdir_p.pp	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/functions/mkdir_p.pp	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,20 @@
+# @summary Like the unix command mkdir_p except with puppet code.
+# This creates file resources for all directories and utilizes the dir_split() function
+# to get a list of all the descendant directories.  You will have no control over any other parameters
+# for the file resource.  If you wish to control the file resources you can use the dir_split() function
+# and get an array of directories for use in your own code.  Please note this does not use an exec resource.
+#
+# @param dirs [Variant[Stdlib::Absolutepath, Array[Stdlib::Absolutepath]]] - the path(s) to create
+# @return [Array[Stdlib::Absolutepath]]
+# @example How to use
+#  extlib::mkdir_p('/opt/puppetlabs/bin') => ['/opt', '/opt/puppetlabs', '/opt/puppetlabs/bin']
+# @note splits the given directories into paths that are then created using file resources
+# @note if you wish to create the directories manually you can use the extlib::dir_split() function in the same manner
+function extlib::mkdir_p(Variant[Stdlib::Absolutepath, Array[Stdlib::Absolutepath]] $dirs) >> Array[Stdlib::Absolutepath] {
+  $dirs_array = extlib::dir_split($dirs)
+  @file{$dirs_array:
+    ensure => directory,
+  }
+  realize(File[$dirs_array])
+  $dirs_array
+}
Index: src/puppetcode/environments/gnuboat/modules/extlib/functions/path_join.pp
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/functions/path_join.pp	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/functions/path_join.pp	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,29 @@
+# @summary Take one or more paths and join them together using the os specific separator.
+# Because in how windows uses a different separator this function
+# will format a windows path into a equilivent unix like path.  This type of unix like
+# path will work on windows.
+#
+# @param dirs Joins two or more directories by file separator.
+# @return [Stdlib::Absolutepath] The joined path
+# @example Joining Unix paths to return `/tmp/test/libs`
+#   extlib::path_join('/tmp', 'test', 'libs')
+# @example Joining Windows paths to return `/c/test/libs`
+#   extlib::path_join('c:', 'test', 'libs')
+function extlib::path_join(Array[String] $dirs) >> Stdlib::Absolutepath {
+  $unix_sep = '/'
+  $sep_regex = /\/|\\/
+  $first_value = $dirs[0]
+  # when first value is absolute path, append all other elements
+  # by breaking the path into pieces first, then joining
+  if $first_value =~ Stdlib::Absolutepath {
+    $fixed_dirs = $first_value.split($sep_regex) + $dirs.delete($first_value)
+  } else {
+    $fixed_dirs = $dirs
+  }
+  $no_empty_dirs = $fixed_dirs.filter |$dir| { !empty($dir) }
+  $dirs_without_sep = $no_empty_dirs.map |String $dir | {
+    # remove : and file separator
+    $dir.regsubst($sep_regex, '').regsubst(':', '')
+  }
+  join([$unix_sep,$dirs_without_sep.join($unix_sep)])
+}
Index: src/puppetcode/environments/gnuboat/modules/extlib/lib/facter/extlib__puppet_config.rb
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/lib/facter/extlib__puppet_config.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/lib/facter/extlib__puppet_config.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,39 @@
+Facter.add(:extlib__puppet_config) do
+  setcode do
+    puppet_config = {}
+
+    desired_settings = {
+      master: [
+        :localcacert,
+        :ssldir
+      ],
+      main: [
+        :hostpubkey,
+        :hostprivkey,
+        :hostcert,
+        :localcacert,
+        :ssldir,
+        :vardir,
+        :server
+      ]
+    }
+
+    desired_settings.each_pair do |section, settings|
+      settings.each do |setting|
+        puppet_config[section.to_s] = {} unless puppet_config.key?(section.to_s)
+        puppet_config[section.to_s][setting.to_s] = Puppet.settings.values(
+          Puppet[:environment].to_sym, section
+        ).interpolate(setting)
+      end
+    end
+
+    puppet_config
+  end
+end
+
+# Facter 4 namespaced version
+Facter.add(:'extlib.puppet_config') do
+  setcode do
+    Facter.value(:extlib__puppet_config)
+  end
+end
Index: src/puppetcode/environments/gnuboat/modules/extlib/lib/puppet/functions/extlib/cache_data.rb
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/lib/puppet/functions/extlib/cache_data.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/lib/puppet/functions/extlib/cache_data.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,48 @@
+require 'fileutils'
+require 'yaml'
+require 'etc'
+
+# @summary Retrieves data from a cache file, or creates it with supplied data if the file doesn't exist
+#
+# Retrieves data from a cache file, or creates it with supplied data if the
+# file doesn't exist
+#
+# Useful for having data that's randomly generated once on the master side
+# (e.g. a password), but then stays the same on subsequent runs. Because it's
+# stored on the master on disk, it doesn't work when you use mulitple Puppet
+# masters that don't share their vardir.
+#
+# @example Calling the function
+#   $password = cache_data('mysql', 'mysql_password', 'this_is_my_password')
+#
+# @example With a random password
+#   $password = cache_data('mysql', 'mysql_password', random_password())
+Puppet::Functions.create_function(:'extlib::cache_data') do
+  # @param namespace Namespace for the cache
+  # @param name Cache key within the namespace
+  # @param initial_data The data for when there is no cache yet
+  # @return The cached value when it exists. The initial data when no cache exists
+  dispatch :cache_data do
+    param 'String[1]', :namespace
+    param 'String[1]', :name
+    param 'Any', :initial_data
+    return_type 'Any'
+  end
+
+  def cache_data(namespace, name, initial_data)
+    cache_dir = File.join(Puppet[:vardir], namespace)
+    cache = File.join(cache_dir, name)
+
+    if File.exist? cache
+      YAML.load(File.read(cache))
+    else
+      FileUtils.mkdir_p(cache_dir)
+      File.open(cache, 'w', 0o600) do |c|
+        c.write(YAML.dump(initial_data))
+      end
+      File.chown(File.stat(Puppet[:vardir]).uid, nil, cache)
+      File.chown(File.stat(Puppet[:vardir]).uid, nil, cache_dir)
+      initial_data
+    end
+  end
+end
Index: src/puppetcode/environments/gnuboat/modules/extlib/lib/puppet/functions/extlib/default_content.rb
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/lib/puppet/functions/extlib/default_content.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/lib/puppet/functions/extlib/default_content.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,37 @@
+# Takes an optional content and an optional template name and returns the contents of a file.
+Puppet::Functions.create_function(:'extlib::default_content') do
+  # @param content
+  # @param template_name
+  #   The path to an .erb or .epp template file or `undef`.
+  # @return
+  #   Returns the value of the content parameter if it's a non empty string.
+  #   Otherwise returns the rendered output from `template_name`.
+  #   Returns `undef` if both `content` and `template_name` are `undef`.
+  #
+  # @example Using the function with a file resource.
+  #   $config_file_content = default_content($file_content, $template_location)
+  #   file { '/tmp/x':
+  #     ensure  => 'file',
+  #     content => $config_file_content,
+  #   }
+  dispatch :default_content do
+    param 'Optional[String]', :content
+    param 'Optional[String]', :template_name
+    return_type 'Optional[String]'
+  end
+
+  def emptyish(x)
+    x.nil? || x.empty? || x == :undef
+  end
+
+  def default_content(content = :undef, template_name = :undef)
+    return content unless emptyish(content)
+
+    unless emptyish(template_name)
+      return call_function('template', template_name) unless template_name.end_with?('.epp')
+      return call_function('epp', template_name)
+    end
+
+    :undef
+  end
+end
Index: src/puppetcode/environments/gnuboat/modules/extlib/lib/puppet/functions/extlib/dump_args.rb
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/lib/puppet/functions/extlib/dump_args.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/lib/puppet/functions/extlib/dump_args.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,20 @@
+require 'json'
+
+# @summary Prints the args to STDOUT in Pretty JSON format.
+#
+# Prints the args to STDOUT in Pretty JSON format.
+#
+# Useful for debugging purposes only. Ideally you would use this in
+# conjunction with a rspec-puppet unit test.  Otherwise the output will
+# be shown during a puppet run when verbose/debug options are enabled.
+Puppet::Functions.create_function(:'extlib::dump_args') do
+  # @param args The data you want to dump as pretty JSON.
+  # @return [Undef] Returns nothing.
+  dispatch :dump_args do
+    param 'Any', :args
+  end
+
+  def dump_args(args)
+    puts JSON.pretty_generate(args)
+  end
+end
Index: src/puppetcode/environments/gnuboat/modules/extlib/lib/puppet/functions/extlib/echo.rb
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/lib/puppet/functions/extlib/echo.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/lib/puppet/functions/extlib/echo.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,45 @@
+# This function outputs the variable content and its type to the
+# debug log. It's similiar to the `notice` function but provides
+# a better output format useful to trace variable types and values
+# in the manifests.
+#
+# ```
+# $v1 = 'test'
+# $v2 = ["1", "2", "3"]
+# $v3 = {"a"=>"1", "b"=>"2"}
+# $v4 = true
+# # $v5 is not defined
+# $v6 = { "b" => { "b" => [1,2,3], "c" => true, "d" => { 'x' => 'y' }}, 'x' => 'y', 'z' => [1,2,3,4,5,6]}
+# $v7 = 12345
+#
+# echo($v1, 'My string')
+# echo($v2, 'My array')
+# echo($v3, 'My hash')
+# echo($v4, 'My boolean')
+# echo($v5, 'My undef')
+# echo($v6, 'My structure')
+# echo($v7) # no comment here
+# debug log output
+# My string (String) "test"
+# My array (Array) ["1", "2", "3"]
+# My hash (Hash) {"a"=>"1", "b"=>"2"}
+# My boolean (TrueClass) true
+# My undef (String) ""
+# My structure (Hash) {"b"=>{"b"=>["1", "2", "3"], "c"=>true, "d"=>{"x"=>"y"}}, "x"=>"y", "z"=>["1", "2", "3", "4", "5", "6"]}
+# (String) "12345"
+# ```
+Puppet::Functions.create_function(:'extlib::echo') do
+  # @param value The value you want to inspect.
+  # @param comment An optional comment to prepend to the debug output.
+  # @return [Undef] Returns nothing.
+  dispatch :echo do
+    param 'Any', :value
+    optional_param 'String', :comment
+  end
+
+  def echo(value, comment = nil)
+    message = "(#{value.class}) #{value.inspect}"
+    message = "#{comment} #{message}" if comment
+    Puppet.debug message
+  end
+end
Index: src/puppetcode/environments/gnuboat/modules/extlib/lib/puppet/functions/extlib/has_module.rb
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/lib/puppet/functions/extlib/has_module.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/lib/puppet/functions/extlib/has_module.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,33 @@
+require 'json'
+
+# A function that lets you know whether a specific module is on your modulepath.
+Puppet::Functions.create_function(:'extlib::has_module') do
+  # @param module_name The full name of the module you want to know exists or not.
+  #   Namespace and modulename can be separated with either `-` or `/`.
+  # @return Returns `true` or `false`.
+  # @example Calling the function
+  #   extlib::has_module('camptocamp/systemd')
+  dispatch :has_module do
+    param 'Pattern[/\A\w+[-\/]\w+\z/]', :module_name
+    return_type 'Boolean'
+  end
+
+  def has_module(module_name) # rubocop:disable Style/PredicateName
+    full_module_name = module_name.gsub(%r{/}, '-')
+    module_name = full_module_name[%r{(?<=-).+}]
+    begin
+      module_path = call_function('get_module_path', module_name)
+    rescue Puppet::ParseError
+      # stdlib function get_module_path raises Puppet::ParseError if module isn't in your environment
+      return false
+    end
+
+    metadata_json = File.join(module_path, 'metadata.json')
+
+    return false unless File.exist?(metadata_json)
+
+    metadata = JSON.parse(File.read(metadata_json))
+    return true if metadata['name'] == full_module_name
+    false
+  end
+end
Index: src/puppetcode/environments/gnuboat/modules/extlib/lib/puppet/functions/extlib/ip_to_cron.rb
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/lib/puppet/functions/extlib/ip_to_cron.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/lib/puppet/functions/extlib/ip_to_cron.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,39 @@
+# Provides a "random" value to cron based on the last bit of the machine IP address.
+# used to avoid starting a certain cron job at the same time on all servers.
+# Takes the runinterval in seconds as parameter and returns an array of [hour, minute]
+#
+# example usage
+# ```
+# ip_to_cron(3600) - returns [ '*', one value between 0..59 ]
+# ip_to_cron(1800) - returns [ '*', an array of two values between 0..59 ]
+# ip_to_cron(7200) - returns [ an array of twelve values between 0..23, one value between 0..59 ]
+# ```
+Puppet::Functions.create_function(:'extlib::ip_to_cron') do
+  # @param runinterval The number of seconds to use as the run interval
+  # return [Array] Returns an array of the form `[hour, minute]`
+  dispatch :ip_to_cron do
+    optional_param 'Integer[1]', :runinterval
+    return_type 'Array'
+  end
+
+  def ip_to_cron(runinterval = 1800)
+    facts = closure_scope['facts']
+    ip = facts['networking']['ip']
+    ip_last_octet = ip.to_s.split('.')[3].to_i
+
+    if runinterval <= 3600
+      occurances = 3600 / runinterval
+      scope = 60
+      base = ip_last_octet % scope
+      hour = '*'
+      minute = (1..occurances).map { |i| (base - (scope / occurances * i)) % scope }.sort
+    else
+      occurances = 86_400 / runinterval
+      scope = 24
+      base = ip_last_octet % scope
+      hour = (1..occurances).map { |i| (base - (scope / occurances * i)) % scope }.sort
+      minute = ip_last_octet % 60
+    end
+    [hour, minute]
+  end
+end
Index: src/puppetcode/environments/gnuboat/modules/extlib/lib/puppet/functions/extlib/random_password.rb
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/lib/puppet/functions/extlib/random_password.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/lib/puppet/functions/extlib/random_password.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,63 @@
+# vim: set ts=2 sw=2 et :
+# encoding: utf-8
+
+# random_password.rb
+#
+# Copyright 2012 Krzysztof Wilczynski
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# For example:
+# ```
+# Given the following statements:
+#
+#   $a = 4
+#   $b = 8
+#   $c = 16
+#
+#   notice random_password($a)
+#   notice random_password($b)
+#   notice random_password($c)
+#
+# The result will be as follows:
+#
+#   notice: Scope(Class[main]): fNDC
+#   notice: Scope(Class[main]): KcKDLrjR
+#   notice: Scope(Class[main]): FtvfvkS9j9wXLsd6
+# ```
+
+# A function to return a string of arbitrary length that contains randomly selected characters.
+Puppet::Functions.create_function(:'extlib::random_password') do
+  # @param length The length of random password you want generated.
+  # @return [String] The random string returned consists of alphanumeric characters excluding 'look-alike' characters.
+  # @example Calling the function
+  #   random_password(42)
+  dispatch :random_password do
+    param 'Integer[1]', :length
+    return_type 'String'
+  end
+
+  def random_password(length)
+    # These are quite often confusing ...
+    ambiguous_characters = %w[0 1 O I l]
+
+    # Get allowed characters set ...
+    set = ('a'..'z').to_a + ('A'..'Z').to_a + ('0'..'9').to_a
+    set -= ambiguous_characters
+
+    # Shuffle characters in the set at random and return desired number of them ...
+    Array.new(length) do |_i|
+      set[rand(set.length)]
+    end.join
+  end
+end
Index: src/puppetcode/environments/gnuboat/modules/extlib/lib/puppet/functions/extlib/read_url.rb
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/lib/puppet/functions/extlib/read_url.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/lib/puppet/functions/extlib/read_url.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,23 @@
+# Fetch a string from a URL (should only be used with 'small' remote files).
+#
+# This function should only be used with trusted/internal sources.
+# This is especially important if using it in conjunction with `inline_template`
+# or `inline_epp`.
+# The current implementation is also very basic.  No thought has gone into timeouts,
+# support for redirects, CA paths etc.
+Puppet::Functions.create_function(:'extlib::read_url') do
+  # @param url The URL to read from
+  # @return Returns the contents of the url as a string
+  # @example Calling the function
+  #   extlib::read_url('https://example.com/sometemplate.epp')
+  dispatch :read_url do
+    param 'Stdlib::HTTPUrl', :url
+    return_type 'String'
+  end
+
+  def read_url(url)
+    require 'open-uri'
+    uri = URI.parse(url)
+    uri.read
+  end
+end
Index: src/puppetcode/environments/gnuboat/modules/extlib/lib/puppet/functions/extlib/resources_deep_merge.rb
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/lib/puppet/functions/extlib/resources_deep_merge.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/lib/puppet/functions/extlib/resources_deep_merge.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,87 @@
+# @summary Deeply merge a "defaults" hash into a "resources" hash like the ones expected by `create_resources()`.
+#
+# Deeply merge a "defaults" hash into a "resources" hash like the ones expected by `create_resources()`.
+#
+# Internally calls the puppetlabs-stdlib function `deep_merge()`. In case of
+# duplicate keys the `resources` hash keys win over the `defaults` hash keys.
+#
+# Example
+# ```puppet
+# $defaults_hash = {
+#   'one'   => '1',
+#   'two'   => '2',
+#   'three' => '3',
+#   'four'  => {
+#     'five'  => '5',
+#     'six'   => '6',
+#     'seven' => '7',
+#   }
+# }
+#
+# $numbers_hash = {
+#   'german' => {
+#     'one'   => 'eins',
+#     'three' => 'drei',
+#     'four'  => {
+#       'six' => 'sechs',
+#     },
+#   },
+#   'french' => {
+#     'one' => 'un',
+#     'two' => 'deux',
+#     'four' => {
+#       'five'  => 'cinq',
+#       'seven' => 'sept',
+#     },
+#   }
+# }
+#
+# $result_hash = resources_deep_merge($numbers_hash, $defaults_hash)
+# ```
+#
+# The $result_hash then looks like this:
+#
+# ```puppet
+# $result_hash = {
+#   'german' => {
+#     'one'   => 'eins',
+#     'two'   => '2',
+#     'three' => 'drei',
+#     'four'  => {
+#       'five'  => '5',
+#       'six'   => 'sechs',
+#       'seven' => '7',
+#     }
+#   },
+#   'french' => {
+#     'one'   => 'un',
+#     'two'   => 'deux',
+#     'three' => '3',
+#     'four'  => {
+#       'five'  => 'cinq',
+#       'six'   => '6',
+#       'seven' => 'sept',
+#     }
+#   }
+# }
+# ```
+Puppet::Functions.create_function(:'extlib::resources_deep_merge') do
+  # Deep-merges defaults into a resources hash
+  # @param resources The hash of resources.
+  # @param defaults The hash of defaults to merge.
+  # @return Returns the merged hash.
+  dispatch :resources_deep_merge do
+    param 'Hash', :resources
+    param 'Hash', :defaults
+    return_type 'Hash'
+  end
+
+  def resources_deep_merge(resources, defaults)
+    deep_merged_resources = {}
+    resources.each do |title, params|
+      deep_merged_resources[title] = call_function('deep_merge', defaults, params)
+    end
+
+    deep_merged_resources
+  end
+end
Index: src/puppetcode/environments/gnuboat/modules/extlib/lib/puppet/functions/extlib/sort_by_version.rb
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/lib/puppet/functions/extlib/sort_by_version.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/lib/puppet/functions/extlib/sort_by_version.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,15 @@
+# A function that sorts an array of version numbers.
+Puppet::Functions.create_function(:'extlib::sort_by_version') do
+  # @param versions An array of version strings you want sorted.
+  # @return Returns the sorted array.
+  # @example Calling the function
+  #   extlib::sort_by_version(['10.0.0b12', '10.0.0b3', '10.0.0a2', '9.0.10', '9.0.3'])
+  dispatch :sort_by_version do
+    param 'Array[String]', :versions
+    return_type 'Array[String]'
+  end
+
+  def sort_by_version(versions)
+    versions.sort_by { |v| Gem::Version.new(v) }
+  end
+end
Index: src/puppetcode/environments/gnuboat/modules/extlib/metadata.json
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/metadata.json	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/metadata.json	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,69 @@
+{
+  "name": "puppet-extlib",
+  "version": "5.0.0",
+  "author": "Vox Pupuli",
+  "summary": "extlib provides functions out of scope puppetlabs/stdlib",
+  "license": "Apache-2.0",
+  "source": "https://github.com/voxpupuli/puppet-extlib.git",
+  "project_page": "https://github.com/voxpupuli/puppet-extlib",
+  "issues_url": "https://github.com/voxpupuli/puppet-extlib/issues",
+  "dependencies": [
+    {
+      "name": "puppetlabs/stdlib",
+      "version_requirement": ">= 4.18.0 < 7.0.0"
+    }
+  ],
+  "data_provider": null,
+  "description": "extlib provides functions out of scope puppetlabs/stdlib",
+  "tags": [
+    "voxpupuli",
+    "extlib",
+    "stdlib"
+  ],
+  "requirements": [
+    {
+      "name": "puppet",
+      "version_requirement": ">= 5.5.8 < 7.0.0"
+    }
+  ],
+  "operatingsystem_support": [
+    {
+      "operatingsystem": "RedHat",
+      "operatingsystemrelease": [
+        "6",
+        "7",
+        "8"
+      ]
+    },
+    {
+      "operatingsystem": "CentOS",
+      "operatingsystemrelease": [
+        "6",
+        "7",
+        "8"
+      ]
+    },
+    {
+      "operatingsystem": "Scientific",
+      "operatingsystemrelease": [
+        "6",
+        "7"
+      ]
+    },
+    {
+      "operatingsystem": "Debian",
+      "operatingsystemrelease": [
+        "8",
+        "9",
+        "10"
+      ]
+    },
+    {
+      "operatingsystem": "Ubuntu",
+      "operatingsystemrelease": [
+        "16.04",
+        "18.04"
+      ]
+    }
+  ]
+}
Index: src/puppetcode/environments/gnuboat/modules/extlib/spec/acceptance/nodesets/archlinux-2-x64.yml
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/spec/acceptance/nodesets/archlinux-2-x64.yml	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/spec/acceptance/nodesets/archlinux-2-x64.yml	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,13 @@
+---
+# This file is managed via modulesync
+# https://github.com/voxpupuli/modulesync
+# https://github.com/voxpupuli/modulesync_config
+HOSTS:
+  archlinux-2-x64:
+    roles:
+      - master
+    platform: archlinux-2-x64
+    box: archlinux/archlinux
+    hypervisor: vagrant
+CONFIG:
+  type: foss
Index: src/puppetcode/environments/gnuboat/modules/extlib/spec/acceptance/nodesets/ec2/amazonlinux-2016091.yml
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/spec/acceptance/nodesets/ec2/amazonlinux-2016091.yml	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/spec/acceptance/nodesets/ec2/amazonlinux-2016091.yml	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,31 @@
+---
+# This file is managed via modulesync
+# https://github.com/voxpupuli/modulesync
+# https://github.com/voxpupuli/modulesync_config
+#
+# Additional ~/.fog config file with AWS EC2 credentials
+# required.
+#
+# see: https://github.com/puppetlabs/beaker/blob/master/docs/how_to/hypervisors/ec2.md
+#
+# Amazon Linux is not a RHEL clone.
+#
+HOSTS:
+  amazonlinux-2016091-x64:
+    roles:
+      - master
+    platform: centos-6-x86_64
+    hypervisor: ec2
+    # refers to image_tempaltes.yaml AMI[vmname] entry:
+    vmname: amazonlinux-2016091-eu-central-1
+    # refers to image_tempaltes.yaml entry inside AMI[vmname][:image]:
+    snapshot: aio
+    # t2.micro is free tier eligible (https://aws.amazon.com/en/free/):
+    amisize: t2.micro
+    # required so that beaker sanitizes sshd_config and root authorized_keys:
+    user: ec2-user
+CONFIG:
+  type: aio
+  :ec2_yaml: spec/acceptance/nodesets/ec2/image_templates.yaml
+...
+# vim: syntax=yaml
Index: src/puppetcode/environments/gnuboat/modules/extlib/spec/acceptance/nodesets/ec2/image_templates.yaml
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/spec/acceptance/nodesets/ec2/image_templates.yaml	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/spec/acceptance/nodesets/ec2/image_templates.yaml	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,34 @@
+# This file is managed via modulesync
+# https://github.com/voxpupuli/modulesync
+# https://github.com/voxpupuli/modulesync_config
+#
+# see also: https://github.com/puppetlabs/beaker/blob/master/docs/how_to/hypervisors/ec2.md
+#
+# Hint: image IDs (ami-*) for the same image are different per location.
+#
+AMI:
+  # Amazon Linux AMI 2016.09.1 (HVM), SSD Volume Type
+  amazonlinux-2016091-eu-central-1:
+    :image:
+      :aio: ami-af0fc0c0
+    :region: eu-central-1
+  # Red Hat Enterprise Linux 7.3 (HVM), SSD Volume Type
+  rhel-73-eu-central-1:
+    :image:
+      :aio: ami-e4c63e8b
+    :region: eu-central-1
+  # SUSE Linux Enterprise Server 12 SP2 (HVM), SSD Volume Type
+  sles-12sp2-eu-central-1:
+    :image:
+      :aio: ami-c425e4ab
+    :region: eu-central-1
+  # Ubuntu Server 16.04 LTS (HVM), SSD Volume Type
+  ubuntu-1604-eu-central-1:
+    :image:
+      :aio: ami-fe408091
+    :region: eu-central-1
+  # Microsoft Windows Server 2016 Base
+  windows-2016-base-eu-central-1:
+    :image:
+      :aio: ami-88ec20e7
+    :region: eu-central-1
Index: src/puppetcode/environments/gnuboat/modules/extlib/spec/acceptance/nodesets/ec2/rhel-73-x64.yml
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/spec/acceptance/nodesets/ec2/rhel-73-x64.yml	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/spec/acceptance/nodesets/ec2/rhel-73-x64.yml	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,29 @@
+---
+# This file is managed via modulesync
+# https://github.com/voxpupuli/modulesync
+# https://github.com/voxpupuli/modulesync_config
+#
+# Additional ~/.fog config file with AWS EC2 credentials
+# required.
+#
+# see: https://github.com/puppetlabs/beaker/blob/master/docs/how_to/hypervisors/ec2.md
+#
+HOSTS:
+  rhel-73-x64:
+    roles:
+      - master
+    platform: el-7-x86_64
+    hypervisor: ec2
+    # refers to image_tempaltes.yaml AMI[vmname] entry:
+    vmname: rhel-73-eu-central-1
+    # refers to image_tempaltes.yaml entry inside AMI[vmname][:image]:
+    snapshot: aio
+    # t2.micro is free tier eligible (https://aws.amazon.com/en/free/):
+    amisize: t2.micro
+    # required so that beaker sanitizes sshd_config and root authorized_keys:
+    user: ec2-user
+CONFIG:
+  type: aio
+  :ec2_yaml: spec/acceptance/nodesets/ec2/image_templates.yaml
+...
+# vim: syntax=yaml
Index: src/puppetcode/environments/gnuboat/modules/extlib/spec/acceptance/nodesets/ec2/sles-12sp2-x64.yml
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/spec/acceptance/nodesets/ec2/sles-12sp2-x64.yml	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/spec/acceptance/nodesets/ec2/sles-12sp2-x64.yml	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,29 @@
+---
+# This file is managed via modulesync
+# https://github.com/voxpupuli/modulesync
+# https://github.com/voxpupuli/modulesync_config
+#
+# Additional ~/.fog config file with AWS EC2 credentials
+# required.
+#
+# see: https://github.com/puppetlabs/beaker/blob/master/docs/how_to/hypervisors/ec2.md
+#
+HOSTS:
+  sles-12sp2-x64:
+    roles:
+      - master
+    platform: sles-12-x86_64
+    hypervisor: ec2
+    # refers to image_tempaltes.yaml AMI[vmname] entry:
+    vmname: sles-12sp2-eu-central-1
+    # refers to image_tempaltes.yaml entry inside AMI[vmname][:image]:
+    snapshot: aio
+    # t2.micro is free tier eligible (https://aws.amazon.com/en/free/):
+    amisize: t2.micro
+    # required so that beaker sanitizes sshd_config and root authorized_keys:
+    user: ec2-user
+CONFIG:
+  type: aio
+  :ec2_yaml: spec/acceptance/nodesets/ec2/image_templates.yaml
+...
+# vim: syntax=yaml
Index: src/puppetcode/environments/gnuboat/modules/extlib/spec/acceptance/nodesets/ec2/ubuntu-1604-x64.yml
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/spec/acceptance/nodesets/ec2/ubuntu-1604-x64.yml	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/spec/acceptance/nodesets/ec2/ubuntu-1604-x64.yml	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,29 @@
+---
+# This file is managed via modulesync
+# https://github.com/voxpupuli/modulesync
+# https://github.com/voxpupuli/modulesync_config
+#
+# Additional ~/.fog config file with AWS EC2 credentials
+# required.
+#
+# see: https://github.com/puppetlabs/beaker/blob/master/docs/how_to/hypervisors/ec2.md
+#
+HOSTS:
+  ubuntu-1604-x64:
+    roles:
+      - master
+    platform: ubuntu-16.04-amd64
+    hypervisor: ec2
+    # refers to image_tempaltes.yaml AMI[vmname] entry:
+    vmname: ubuntu-1604-eu-central-1
+    # refers to image_tempaltes.yaml entry inside AMI[vmname][:image]:
+    snapshot: aio
+    # t2.micro is free tier eligible (https://aws.amazon.com/en/free/):
+    amisize: t2.micro
+    # required so that beaker sanitizes sshd_config and root authorized_keys:
+    user: ubuntu
+CONFIG:
+  type: aio
+  :ec2_yaml: spec/acceptance/nodesets/ec2/image_templates.yaml
+...
+# vim: syntax=yaml
Index: src/puppetcode/environments/gnuboat/modules/extlib/spec/acceptance/nodesets/ec2/windows-2016-base-x64.yml
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/spec/acceptance/nodesets/ec2/windows-2016-base-x64.yml	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/spec/acceptance/nodesets/ec2/windows-2016-base-x64.yml	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,29 @@
+---
+# This file is managed via modulesync
+# https://github.com/voxpupuli/modulesync
+# https://github.com/voxpupuli/modulesync_config
+#
+# Additional ~/.fog config file with AWS EC2 credentials
+# required.
+#
+# see: https://github.com/puppetlabs/beaker/blob/master/docs/how_to/hypervisors/ec2.md
+#
+HOSTS:
+  windows-2016-base-x64:
+    roles:
+      - master
+    platform: windows-2016-64
+    hypervisor: ec2
+    # refers to image_tempaltes.yaml AMI[vmname] entry:
+    vmname: windows-2016-base-eu-central-1
+    # refers to image_tempaltes.yaml entry inside AMI[vmname][:image]:
+    snapshot: aio
+    # t2.micro is free tier eligible (https://aws.amazon.com/en/free/):
+    amisize: t2.micro
+    # required so that beaker sanitizes sshd_config and root authorized_keys:
+    user: ec2-user
+CONFIG:
+  type: aio
+  :ec2_yaml: spec/acceptance/nodesets/ec2/image_templates.yaml
+...
+# vim: syntax=yaml
Index: src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/cache_data_spec.rb
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/cache_data_spec.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/cache_data_spec.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,40 @@
+require 'spec_helper'
+
+describe 'extlib::cache_data' do
+  let(:initial_data) { 'original_password' }
+  let(:data_name) { 'mysql_password' }
+  let(:namespace) { 'data_cache' }
+  let(:vardir)    { "#{FIXTURES_PATH}/tmpdir" }
+
+  it { expect(subject).not_to eq(nil) }
+  it { is_expected.not_to eq(nil) }
+  it { is_expected.to run.with_params(data_name).and_raise_error(ArgumentError) }
+  it { is_expected.to run.with_params('', initial_data).and_raise_error(ArgumentError) }
+  it { is_expected.to run.with_params('', 'mysql_password', initial_data).and_raise_error(ArgumentError) }
+
+  describe 'data caching' do
+    before do
+      # Fool rspec-puppet into creating a consistent vardir for these tests!
+      allow(Dir).to receive(:mktmpdir).and_return("#{FIXTURES_PATH}/tmpdir")
+      # Stop rspec-puppet from blowing away the vardir between each example.  Is unstubbed in the after block.
+      allow(FileUtils).to receive(:rm_rf).with(vardir).and_return(true)
+    end
+    after do
+      # Since rspec-puppet won't be removing the vardir, we'd better do that ourselves.
+      FileUtils.rm_rf(vardir) if File.directory?(vardir)
+    end
+
+    context 'when not in cache' do
+      it 'returns supplied data' do
+        is_expected.to run.with_params(namespace, data_name, initial_data).and_return(initial_data)
+      end
+    end
+
+    context 'when cached' do
+      it 'returns cached data' do
+        is_expected.to run.with_params(namespace, data_name, initial_data).and_return(initial_data)
+        is_expected.to run.with_params(namespace, data_name, 'new_password').and_return(initial_data)
+      end
+    end
+  end
+end
Index: src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/default_content_spec.rb
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/default_content_spec.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/default_content_spec.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,37 @@
+require 'spec_helper'
+
+describe 'extlib::default_content' do
+  it { is_expected.not_to eq(nil) }
+  it { is_expected.to run.with_params.and_raise_error(ArgumentError) }
+  it { is_expected.to run.with_params(:undef, :undef).and_return(:undef) }
+
+  describe 'signature validation' do
+    it 'exists' do
+      is_expected.not_to be_nil
+    end
+  end
+
+  context 'should return the correct string for' do
+    it 'a string' do
+      is_expected.to run.with_params('a string', :undef).and_return 'a string'
+    end
+
+    it 'an empty string and an epp template' do
+      File.open('/tmp/foo.epp', 'w') do |f|
+        f.write '<% $foo = 2 %>a template string <%= $foo + 1 %>'
+      end
+      is_expected.to run.with_params(:undef, '/tmp/foo.epp').and_return 'a template string 3'
+    end
+
+    it 'an empty string and an erb template' do
+      File.open('/tmp/foo.erb', 'w') do |f|
+        f.write '<% @foo = 1 %>a template string <%= @foo + 1 %>'
+      end
+      is_expected.to run.with_params(:undef, '/tmp/foo.erb').and_return 'a template string 2'
+    end
+
+    it 'an empty string and an empty template' do
+      is_expected.to run.with_params(:undef, :undef).and_return :undef
+    end
+  end
+end
Index: src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/dir_split_spec.rb
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/dir_split_spec.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/dir_split_spec.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,60 @@
+require 'spec_helper'
+
+describe 'extlib::dir_split' do
+  describe 'windows' do
+    let(:dirs) do
+      'c:\windows\puppetlabs\puppet\embedded\gems'
+    end
+    let(:facts) do
+      {
+        kernel: 'windows'
+      }
+    end
+
+    it {
+      is_expected.to run.with_params(dirs).and_return(['/c', '/c/windows', '/c/windows/puppetlabs',
+                                                       '/c/windows/puppetlabs/puppet', '/c/windows/puppetlabs/puppet/embedded',
+                                                       '/c/windows/puppetlabs/puppet/embedded/gems'])
+    }
+
+    describe 'multiple_dirs' do
+      let(:dirs) do
+        ['c:\windows\puppetlabs\puppet\embedded\gems', 'c:\temp\gems']
+      end
+
+      it {
+        is_expected.to run.with_params(dirs).and_return(['/c', '/c/windows', '/c/windows/puppetlabs',
+                                                         '/c/windows/puppetlabs/puppet', '/c/windows/puppetlabs/puppet/embedded',
+                                                         '/c/windows/puppetlabs/puppet/embedded/gems', '/c/temp', '/c/temp/gems'])
+      }
+    end
+  end
+
+  describe 'not_windows' do
+    let(:dirs) do
+      '/opt/puppetlabs/puppet/embedded/bin/gems'
+    end
+    let(:facts) do
+      {
+        kernel: 'linux'
+      }
+    end
+
+    it {
+      is_expected.to run.with_params(dirs).and_return(['/opt', '/opt/puppetlabs', '/opt/puppetlabs/puppet',
+                                                       '/opt/puppetlabs/puppet/embedded', '/opt/puppetlabs/puppet/embedded/bin', '/opt/puppetlabs/puppet/embedded/bin/gems'])
+    }
+
+    describe 'multiple_dirs' do
+      let(:dirs) do
+        ['/opt/puppetlabs/puppet/embedded/bin/gems', '/tmp/gems']
+      end
+
+      it {
+        is_expected.to run.with_params(dirs).and_return(['/opt', '/opt/puppetlabs', '/opt/puppetlabs/puppet',
+                                                         '/opt/puppetlabs/puppet/embedded', '/opt/puppetlabs/puppet/embedded/bin',
+                                                         '/opt/puppetlabs/puppet/embedded/bin/gems', '/tmp', '/tmp/gems'])
+      }
+    end
+  end
+end
Index: src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/dump_args_spec.rb
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/dump_args_spec.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/dump_args_spec.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,30 @@
+require 'spec_helper'
+require 'json'
+
+describe 'extlib::dump_args' do
+  it 'exists' do
+    is_expected.not_to be_nil
+  end
+
+  it 'requires an argument' do
+    is_expected.to run.with_params.and_raise_error(ArgumentError)
+  end
+
+  context 'when called with a hash' do
+    let(:hash) { { 'param_one' => 'value', 'param_two' => 42 } }
+
+    it 'puts pretty JSON' do
+      allow(STDOUT).to receive(:puts).with(JSON.pretty_generate(hash))
+      is_expected.to run.with_params(hash)
+    end
+  end
+
+  context 'when called with an integer' do
+    let(:int) { 42 }
+
+    it 'puts pretty JSON' do
+      allow(STDOUT).to receive(:puts).with(JSON.pretty_generate(int))
+      is_expected.to run.with_params(int)
+    end
+  end
+end
Index: src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/echo_spec.rb
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/echo_spec.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/echo_spec.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,39 @@
+require 'spec_helper'
+
+describe 'extlib::echo' do
+  describe 'signature validation' do
+    it 'exists' do
+      is_expected.not_to be_nil
+    end
+    it 'requires at least one argument' do
+      is_expected.to run.with_params.and_raise_error(ArgumentError)
+    end
+  end
+
+  context 'should output a correct debug string for' do
+    it 'a string' do
+      allow(scope).to receive(:debug).with '(String) "test"'
+      is_expected.to run.with_params('test')
+    end
+    it 'a string with a comment' do
+      allow(scope).to receive(:debug).with 'My String (String) "test"'
+      is_expected.to run.with_params('test', 'My String')
+    end
+    it 'and array' do
+      allow(scope).to receive(:debug).with 'My Array (Array) ["1", "2", "3"]'
+      is_expected.to run.with_params(%w[1 2 3], 'My Array')
+    end
+    it 'a hash' do
+      allow(scope).to receive(:debug).with 'My Hash (Hash) {"a"=>"1"}'
+      is_expected.to run.with_params({ 'a' => '1' }, 'My Hash')
+    end
+    it 'a boolean value' do
+      allow(scope).to receive(:debug).with 'My Boolean (FalseClass) false'
+      is_expected.to run.with_params(false, 'My Boolean')
+    end
+    it 'an undefind value' do
+      allow(scope).to receive(:debug).with 'Undefined Value (NilClass) nil'
+      is_expected.to run.with_params(nil, 'Undefined Value')
+    end
+  end
+end
Index: src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/file_separator_spec.rb
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/file_separator_spec.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/file_separator_spec.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,23 @@
+require 'spec_helper'
+
+describe 'extlib::file_separator' do
+  describe 'windows' do
+    let(:facts) do
+      {
+        kernel: 'windows'
+      }
+    end
+
+    it { is_expected.to run.with_params.and_return('\\') }
+  end
+
+  describe 'not_windows' do
+    let(:facts) do
+      {
+        kernel: 'linux'
+      }
+    end
+
+    it { is_expected.to run.with_params.and_return('/') }
+  end
+end
Index: src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/has_module_spec.rb
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/has_module_spec.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/has_module_spec.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,31 @@
+require 'spec_helper'
+
+describe 'extlib::has_module' do
+  it { is_expected.not_to eq(nil) }
+  it { is_expected.to run.with_params.and_raise_error(ArgumentError) }
+  it { is_expected.to run.with_params('not_a_valid_module_name').and_raise_error(ArgumentError) }
+
+  context 'modules on our module path' do
+    [
+      'puppet-extlib',
+      'puppet/extlib',
+      'puppetlabs/stdlib'
+    ].each do |good_module_name|
+      it "returns true for #{good_module_name}" do
+        is_expected.to run.with_params(good_module_name).and_return(true)
+      end
+    end
+  end
+
+  context 'modules not on our module path' do
+    it do
+      is_expected.to run.with_params('puppet/nosuchmodule').and_return(false)
+    end
+  end
+
+  context 'modules not in the right namespace' do
+    it do
+      is_expected.to run.with_params('puppet/stdlib').and_return(false)
+    end
+  end
+end
Index: src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/ip_to_cron_spec.rb
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/ip_to_cron_spec.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/ip_to_cron_spec.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,45 @@
+require 'spec_helper'
+
+describe 'extlib::ip_to_cron' do
+  it 'exists' do
+    is_expected.not_to be_nil
+  end
+
+  describe 'when runinterval is 1 hour' do
+    let(:runinterval) { 3600 }
+
+    context 'and IP address is 10.0.0.150' do
+      let(:facts) { { networking: { ip: '10.0.0.150' } } }
+
+      it { is_expected.to run.with_params(runinterval).and_return(['*', [30]]) }
+    end
+
+    context 'and IP address is 10.0.0.160' do
+      let(:facts) { { networking: { ip: '10.0.0.160' } } }
+
+      it { is_expected.to run.with_params(runinterval).and_return(['*', [40]]) }
+    end
+  end
+
+  context 'with IP address 10.0.0.1' do
+    let(:facts) { { networking: { ip: '10.0.0.1' } } }
+
+    describe 'when runinterval is 30 minutes' do
+      let(:runinterval) { 1800 }
+
+      it { is_expected.to run.with_params(runinterval).and_return(['*', [1, 31]]) }
+    end
+
+    describe 'when runinterval is 2 hours' do
+      let(:runinterval) { 7200 }
+
+      it { is_expected.to run.with_params(runinterval).and_return([[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23], 1]) }
+    end
+  end
+
+  describe 'when runinterval not specified and IP address is 10.0.0.60' do
+    let(:facts) { { networking: { ip: '10.0.0.60' } } }
+
+    it { is_expected.to run.and_return(['*', [0, 30]]) }
+  end
+end
Index: src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/mkdir_p_spec.rb
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/mkdir_p_spec.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/mkdir_p_spec.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,61 @@
+require 'spec_helper'
+
+describe 'extlib::mkdir_p' do
+  describe 'windows' do
+    let(:dirs) do
+      'c:\windows\puppetlabs\puppet\embedded\gems'
+    end
+    let(:facts) do
+      {
+        kernel: 'windows'
+      }
+    end
+
+    it {
+      is_expected.to run.with_params(dirs).and_return(['/c', '/c/windows', '/c/windows/puppetlabs',
+                                                       '/c/windows/puppetlabs/puppet', '/c/windows/puppetlabs/puppet/embedded',
+                                                       '/c/windows/puppetlabs/puppet/embedded/gems'])
+    }
+
+    describe 'multiple_dirs' do
+      let(:dirs) do
+        ['c:\windows\puppetlabs\puppet\embedded\gems', 'c:\temp\gems']
+      end
+
+      it {
+        is_expected.to run.with_params(dirs).and_return(['/c', '/c/windows', '/c/windows/puppetlabs',
+                                                         '/c/windows/puppetlabs/puppet', '/c/windows/puppetlabs/puppet/embedded',
+                                                         '/c/windows/puppetlabs/puppet/embedded/gems', '/c/temp', '/c/temp/gems'])
+      }
+    end
+  end
+
+  describe 'not_windows' do
+    let(:dirs) do
+      '/opt/puppetlabs/puppet/embedded/bin/gems'
+    end
+    let(:facts) do
+      {
+        kernel: 'linux'
+      }
+    end
+
+    it {
+      is_expected.to run.with_params(dirs).and_return(['/opt', '/opt/puppetlabs', '/opt/puppetlabs/puppet',
+                                                       '/opt/puppetlabs/puppet/embedded', '/opt/puppetlabs/puppet/embedded/bin', '/opt/puppetlabs/puppet/embedded/bin/gems'])
+    }
+
+    describe 'multiple_dirs' do
+      let(:dirs) do
+        ['/opt/puppetlabs/puppet/embedded/bin/gems', '/tmp/gems']
+      end
+      let(:expected_dirs) do
+        ['/opt', '/opt/puppetlabs', '/opt/puppetlabs/puppet',
+         '/opt/puppetlabs/puppet/embedded', '/opt/puppetlabs/puppet/embedded/bin',
+         '/opt/puppetlabs/puppet/embedded/bin/gems', '/tmp', '/tmp/gems']
+      end
+
+      it { is_expected.to run.with_params(dirs).and_return(expected_dirs) }
+    end
+  end
+end
Index: src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/path_join_spec.rb
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/path_join_spec.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/path_join_spec.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,34 @@
+require 'spec_helper'
+
+describe 'extlib::path_join' do
+  describe 'windows' do
+    let(:dirs) do
+      ['c:', 'tmp', 'test', 'test.txt']
+    end
+
+    let(:facts) do
+      {
+        kernel: 'windows'
+      }
+    end
+
+    it { is_expected.to run.with_params(dirs).and_return('/c/tmp/test/test.txt') }
+    it { is_expected.to run.with_params(['c:\\windows\\puppetlabs\\puppet\\embedded\\gems']).and_return('/c/windows/puppetlabs/puppet/embedded/gems') }
+    it { is_expected.to run.with_params(['/c']).and_return('/c') }
+  end
+
+  describe 'not_windows' do
+    let(:dirs) do
+      ['/tmp', 'test', 'test']
+    end
+
+    let(:facts) do
+      {
+        kernel: 'linux'
+      }
+    end
+
+    it { is_expected.to run.with_params(dirs).and_return('/tmp/test/test') }
+    it { is_expected.to run.with_params(['/tmp']).and_return('/tmp') }
+  end
+end
Index: src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/random_password_spec.rb
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/random_password_spec.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/random_password_spec.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,30 @@
+require 'spec_helper'
+
+describe 'extlib::random_password' do
+  it 'exists' do
+    is_expected.not_to be_nil
+  end
+
+  context 'when called with no parameters' do
+    it { is_expected.to run.with_params.and_raise_error(ArgumentError) }
+  end
+
+  context 'when called with a string' do
+    it { is_expected.to run.with_params('42').and_raise_error(ArgumentError) }
+  end
+
+  [4, 32].each do |length|
+    context "when called with #{length}" do
+      it "returns a string of length #{length}" do
+        expect(subject.execute(length)).to be_a String
+        subject.execute(length).length == length
+      end
+    end
+  end
+
+  context 'when called multiple times with the same argument' do
+    it 'returns different strings' do
+      expect(subject.execute(12)).not_to eq(subject.execute(12))
+    end
+  end
+end
Index: src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/read_url_spec.rb
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/read_url_spec.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/read_url_spec.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,13 @@
+require 'spec_helper'
+
+describe 'extlib::read_url' do
+  it { is_expected.not_to eq(nil) }
+  it { is_expected.to run.with_params.and_raise_error(ArgumentError) }
+
+  context 'when called with a valid url' do
+    it 'returns the content of the url' do
+      returned_data = subject.execute('https://raw.githubusercontent.com/voxpupuli/puppet-extlib/master/README.md')
+      expect(returned_data).to include('Extlib module for Puppet')
+    end
+  end
+end
Index: src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/resources_deep_merge_spec.rb
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/resources_deep_merge_spec.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/resources_deep_merge_spec.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,75 @@
+require 'spec_helper'
+
+describe 'extlib::resources_deep_merge' do
+  let(:resources) do
+    {
+      'one' => {
+        'attributes' => {
+          'user' => '1',
+          'pass' => '1'
+        }
+      },
+      'two' => {
+        'attributes' => {
+          'user' => '2',
+          'pass' => '2'
+        }
+      }
+    }
+  end
+
+  let(:defaults) do
+    {
+      'ensure' => 'present',
+      'attributes' => {
+        'type' => 'psql'
+      }
+    }
+  end
+
+  let(:result) do
+    {
+      'one' => {
+        'ensure' => 'present',
+        'attributes' => {
+          'type' => 'psql',
+          'user' => '1',
+          'pass' => '1'
+        }
+      },
+      'two' => {
+        'ensure' => 'present',
+        'attributes' => {
+          'type' => 'psql',
+          'user' => '2',
+          'pass' => '2'
+        }
+      }
+    }
+  end
+
+  describe 'signature validation' do
+    it 'exists' do
+      is_expected.not_to be_nil
+    end
+
+    it 'raises an ArgumentError if there is less than 1 arguments' do
+      is_expected.to run.with_params.and_raise_error ArgumentError
+    end
+
+    it 'does not compile when 1 argument is passed' do
+      my_hash = { 'one' => 1 }
+      is_expected.to run.with_params(my_hash).and_raise_error ArgumentError
+    end
+
+    it 'requires all parameters are hashes' do
+      is_expected.to run.with_params({}, '2').and_raise_error ArgumentError
+    end
+  end
+
+  describe 'when calling resources_deep_merge on a resource and a defaults hash' do
+    it 'is able to deep_merge a resource hash and a defaults hash' do
+      is_expected.to run.with_params(resources, defaults).and_return(result)
+    end
+  end
+end
Index: src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/sort_by_version_spec.rb
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/sort_by_version_spec.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/spec/functions/extlib/sort_by_version_spec.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,13 @@
+require 'spec_helper'
+
+describe 'extlib::sort_by_version' do
+  it { is_expected.not_to eq(nil) }
+  it { is_expected.to run.with_params.and_raise_error(ArgumentError) }
+  it { is_expected.to run.with_params('not_an_array').and_raise_error(ArgumentError) }
+
+  it 'sorts versions' do
+    is_expected.to run.
+      with_params(['10.0.0b12', '10.0.0b3', '10.0.0a2', '9.0.10', '9.0.3']).
+      and_return(['9.0.3', '9.0.10', '10.0.0a2', '10.0.0b3', '10.0.0b12'])
+  end
+end
Index: src/puppetcode/environments/gnuboat/modules/extlib/spec/spec_helper.rb
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/spec/spec_helper.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/spec/spec_helper.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,67 @@
+# This file is managed via modulesync
+# https://github.com/voxpupuli/modulesync
+# https://github.com/voxpupuli/modulesync_config
+RSpec.configure do |c|
+  c.mock_with :rspec
+end
+
+require 'puppetlabs_spec_helper/module_spec_helper'
+require 'rspec-puppet-facts'
+require 'bundler'
+include RspecPuppetFacts
+
+if ENV['DEBUG']
+  Puppet::Util::Log.level = :debug
+  Puppet::Util::Log.newdestination(:console)
+end
+
+if File.exist?(File.join(__dir__, 'default_module_facts.yml'))
+  facts = YAML.load(File.read(File.join(__dir__, 'default_module_facts.yml')))
+  if facts
+    facts.each do |name, value|
+      add_custom_fact name.to_sym, value
+    end
+  end
+end
+
+if Dir.exist?(File.expand_path('../../lib', __FILE__))
+  require 'coveralls'
+  require 'simplecov'
+  require 'simplecov-console'
+  SimpleCov.formatters = [
+    SimpleCov::Formatter::HTMLFormatter,
+    SimpleCov::Formatter::Console
+  ]
+  SimpleCov.start do
+    track_files 'lib/**/*.rb'
+    add_filter '/spec'
+    add_filter '/vendor'
+    add_filter '/.vendor'
+    add_filter Bundler.configured_bundle_path.path
+  end
+end
+
+RSpec.configure do |c|
+  # getting the correct facter version is tricky. We use facterdb as a source to mock facts
+  # see https://github.com/camptocamp/facterdb
+  # people might provide a specific facter version. In that case we use it.
+  # Otherwise we need to match the correct facter version to the used puppet version.
+  # as of 2019-10-31, puppet 5 ships facter 3.11 and puppet 6 ships facter 3.14
+  # https://puppet.com/docs/puppet/5.5/about_agent.html
+  #
+  # The environment variable `PUPPET_VERSION` is available in our travis environment, but we cannot rely on it
+  # if somebody runs the tests locally. For that case we should fallback the the puppet gem version.
+  c.default_facter_version = if ENV['FACTERDB_FACTS_VERSION']
+                               ENV['FACTERDB_FACTS_VERSION']
+                             else
+                               puppet_version = ENV['PUPPET_VERSION'] ? ENV['PUPPET_VERSION'] : Gem.loaded_specs['puppet'].version.to_s
+                               Gem::Dependency.new('', puppet_version).match?('', '5') ? '3.11.0' : '3.14.0'
+                             end
+
+  # Coverage generation
+  c.after(:suite) do
+    RSpec::Puppet::Coverage.report!
+  end
+end
+
+require 'spec_helper_methods'
Index: src/puppetcode/environments/gnuboat/modules/extlib/spec/spec_helper_methods.rb
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/spec/spec_helper_methods.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/spec/spec_helper_methods.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,5 @@
+# From https://gist.github.com/stefanozanella/4190920
+# Make stdlib (i.e. its functions) available to rspec so our own functions that
+# require stdlib functions can load them.
+$LOAD_PATH.unshift File.join(File.dirname(__FILE__), 'fixtures', 'modules', 'stdlib', 'lib')
+FIXTURES_PATH = File.expand_path(File.join(__FILE__, '..', 'fixtures'))
Index: src/puppetcode/environments/gnuboat/modules/extlib/spec/unit/facter/extlib__puppet_config_spec.rb
===================================================================
--- src/puppetcode/environments/gnuboat/modules/extlib/spec/unit/facter/extlib__puppet_config_spec.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/extlib/spec/unit/facter/extlib__puppet_config_spec.rb	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,31 @@
+require 'spec_helper'
+require 'puppet'
+
+describe 'extlib__puppet_config fact' do
+  let(:hostname) { Puppet[:certname] }
+  let(:settings) do
+    {
+      'main' => {
+        'hostcert' => "/dev/null/ssl/certs/#{hostname}.pem",
+        'hostprivkey' => "/dev/null/ssl/private_keys/#{hostname}.pem",
+        'hostpubkey' => "/dev/null/ssl/public_keys/#{hostname}.pem",
+        'localcacert' => '/dev/null/ssl/certs/ca.pem',
+        'server' => 'puppet',
+        'ssldir' => '/dev/null/ssl',
+        'vardir' => '/dev/null'
+      },
+      'master' => {
+        'localcacert' => '/dev/null/ssl/certs/ca.pem',
+        'ssldir' => '/dev/null/ssl'
+      }
+    }
+  end
+
+  it { expect(Facter.fact(:extlib__puppet_config).value).to eq(settings) }
+
+  if Gem::Version.new(Gem.loaded_specs['facter'].version) >= Gem::Version.new('4')
+    it 'is also available under the toplevel `extlib` structured fact' do
+      expect(Facter.fact(:extlib).value).to include('puppet_config' => settings)
+    end
+  end
+end
Index: src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/files/gnuboat_mapservice.sql
===================================================================
--- src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/files/gnuboat_mapservice.sql	(revision 56d997983a4c8c1df518d22b75a7af00bf60eccc)
+++ src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/files/gnuboat_mapservice.sql	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -262,4 +262,18 @@
 
 ALTER SEQUENCE public.processingstatus_id_seq OWNED BY public.processingstatus.id;
+
+
+--
+-- Data for Name: processingstatus; Type: TABLE DATA; Schema: public; Owner: -
+--
+
+INSERT INTO public.processingstatus(id, label) VALUES (1, 'Undefined');
+INSERT INTO public.processingstatus(id, label) VALUES (2, 'Queued for Parsing');
+INSERT INTO public.processingstatus(id, label) VALUES (3, 'Parsing');
+INSERT INTO public.processingstatus(id, label) VALUES (4, 'Queued for Processing');
+INSERT INTO public.processingstatus(id, label) VALUES (5, 'Processing');
+INSERT INTO public.processingstatus(id, label) VALUES (6, 'Deployed');
+INSERT INTO public.processingstatus(id, label) VALUES (7, 'To Old');
+INSERT INTO public.processingstatus(id, label) VALUES (8, 'Error');
 
 
Index: src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/files/mapservice_celery_entrypoint.sh
===================================================================
--- src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/files/mapservice_celery_entrypoint.sh	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/files/mapservice_celery_entrypoint.sh	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,15 @@
+#!/bin/bash
+source /etc/gnuboat/mapservice-celery.conf
+
+# Create needed directories
+mkdir -p "$(dirname "${CELERYD_PID_FILE}")"
+mkdir -p "$(dirname "${CELERYD_LOG_FILE}")"
+# Clean up PID files (we are running in a container, so nothing can run already)
+rm -f "$(dirname "${CELERYD_PID_FILE}")/*"
+
+
+# Start Celery Workers
+${CELERY_BIN} -A ${CELERY_APP} worker --pidfile=${CELERYD_PID_FILE} --logfile=${CELERYD_LOG_FILE} --loglevel="${CELERYD_LOG_LEVEL}" $CELERYD_OPTS &
+# Start Celery Beat
+${CELERY_BIN} -A ${CELERY_APP} beat --pidfile=${CELERYBEAT_PID_FILE} --logfile=${CELERYBEAT_LOG_FILE} --loglevel=${CELERYD_LOG_LEVEL}
+#celery worker --workdir /app --app dri -l info --beat &> /log/celery_beat.log  &
Index: src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/files/mapservice_database_dockerfile
===================================================================
--- src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/files/mapservice_database_dockerfile	(revision 56d997983a4c8c1df518d22b75a7af00bf60eccc)
+++ src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/files/mapservice_database_dockerfile	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -1,14 +1,5 @@
 FROM postgis/postgis
-#ARG FACTER_GNUBOAT_ROLE=GNUBOAT_MAPSERVICE_DATABASE
-#ADD puppet /etc/puppet
-#ADD database_run /usr/local/bin/
-#ADD database_setup.sql /tmp/
-#RUN chmod +x /etc/puppet/environments/gnuboat/configversion /usr/local/bin/database_run
-#RUN apt-get update && apt-get -y install puppet
-#RUN puppet apply --config /etc/puppet/gnuboat_puppet.conf --environment gnuboat /etc/puppet/environments/gnuboat/manifests/
-#RUN rm -rf /etc/puppet
 WORKDIR /docker-entrypoint-initdb.d
 ADD gnuboat_mapservice.sql /docker-entrypoint-initdb.d
 VOLUME /var/lib/postgresql
 EXPOSE 5432
-#CMD ["/usr/local/bin/database_run"]
Index: src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/files/mapservice_mapservice_dockerfile
===================================================================
--- src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/files/mapservice_mapservice_dockerfile	(revision 56d997983a4c8c1df518d22b75a7af00bf60eccc)
+++ 	(revision )
@@ -1,14 +1,0 @@
-FROM debian:bullseye
-ARG FACTER_GNUBOAT_ROLE=GNUBOAT_MAPSERVICE_MAPSERVICE
-COPY gnuboat-keyring.gpg /etc/apt/trusted.gpg.d/
-RUN echo "deb http://ftp.engsas.de/unstable/gnuboat/ bullseye main" > /etc/apt/sources.list.d/gnuboat.list
-RUN apt-get update && apt-get -y install gnuboat-puppet
-#COPY requirements.txt /
-#ADD puppet /etc/puppet
-#RUN apt-get update && apt-get -y install puppet
-#RUN puppet apply --config /etc/puppet/gnuboat_puppet.conf --environment gnuboat /etc/puppet/environments/gnuboat/manifests/
-#RUN rm -rf /etc/puppet
-#VOLUME /var/lib/mysql
-#EXPOSE 3306
-#ENTRYPOINT [""]
-#CMD ["/usr/local/bin/database_run"]
Index: src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/files/mapservice_memcached_dockerfile
===================================================================
--- src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/files/mapservice_memcached_dockerfile	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/files/mapservice_memcached_dockerfile	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,4 @@
+FROM memcached:latest
+EXPOSE 11211
+ENTRYPOINT ["memcached"]
+CMD ["-m", "64"]
Index: src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/files/mapservice_rabbitmq_dockerfile
===================================================================
--- src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/files/mapservice_rabbitmq_dockerfile	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/files/mapservice_rabbitmq_dockerfile	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,3 @@
+FROM rabbitmq:latest
+VOLUME /var/lib/rabbitmq
+EXPOSE 5672
Index: src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/files/osm_dockerfile
===================================================================
--- src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/files/osm_dockerfile	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/files/osm_dockerfile	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,2 @@
+FROM overv/openstreetmap-tile-server
+
Index: src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/manifests/apache_config.pp
===================================================================
--- src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/manifests/apache_config.pp	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/manifests/apache_config.pp	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,35 @@
+class gnuboat_mapservice::apache_config inherits gnuboat_mapservice
+{
+	# Configure apache, if wanted
+        if($apache_enabled){
+                if empty($apache_vhost_ssl_cert) and empty($apache_vhost_ssl_key) {
+                        apache::vhost{$apache_vhost_name:
+                                servername => $apache_vhost_servername,
+                                port => '80',
+                                docroot => '/var/www',
+                                proxy_pass => [
+                                        { path => '/', url => 'http://localhost:8080/' },
+                                ],
+                                suphp_engine => off,
+                        }
+                } else {
+                        apache::vhost{$apache_vhost_name:
+                                servername => $apache_vhost_servername,
+                                port => '443',
+                                docroot => '/var/www',
+                                proxy_pass => [
+                                        { path => '/', url => 'http://localhost:8080/' },
+                                ],
+                                suphp_engine => off,
+                                ssl => true,
+                                ssl_cert => $apache_vhost_ssl_cert,
+                                ssl_key => $apache_vhost_ssl_key,
+                        }
+                }
+
+                if($apache_replace_default_host){
+                        class {'apache': default_vhost => false,
+                        }
+                }
+        }
+}
Index: src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/manifests/host_install.pp
===================================================================
--- src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/manifests/host_install.pp	(revision 56d997983a4c8c1df518d22b75a7af00bf60eccc)
+++ src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/manifests/host_install.pp	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -1,53 +1,135 @@
-class gnuboat_mapservice::host_install inherits gnuboat_mapservice
+class gnuboat_mapservice::host_install (
+	String $database_host = "gnuboat_mapservice_database",
+	String $broker_host = "gnuboat_mapservice_rabbitmq",
+	String $celery_cache_host = "gnuboat_mapservice_cache",
+	Integer $mapservice_workers = 2,
+) inherits gnuboat_mapservice
 {
-	file { '/var/lib/gnuboat':
+        file { extlib::dir_split($mapservice_tile_cache_dir):
                 ensure => 'directory',
+                mode => '0750',
         }
+
+	unless File['/var/lib/gnuboat'] {
+		file { '/var/lib/gnuboat':
+		        ensure => 'directory',
+	        }
+	}
 	file { '/var/lib/gnuboat/mapservice':
                 ensure => 'directory',
         }
-	file { '/var/lib/gnuboat/mapservice/database':
+	file { '/var/lib/gnuboat/mapservice/rabbitmq':
+                ensure => 'directory',
+        }
+
+	file { '/var/lib/gnuboat/mapservice/docker_database':
 		ensure => 'directory',
 	}
 
-	file { '/tmp/gnuboat_mapservice_database':
+	file { '/var/lib/gnuboat/mapservice/docker_mapservice':
+                ensure => 'directory',
+        }
+
+	file { '/var/lib/gnuboat/mapservice/docker_mapservice_celery':
 		ensure => 'directory',
 	}
 
-	file { '/tmp/gnuboat_mapservice_mapservice':
+	file { '/var/lib/gnuboat/mapservice/docker_rabbitmq':
                 ensure => 'directory',
         }
 
-	file { '/tmp/gnuboat_mapservice_database/Dockerfile':
+	file { '/var/lib/gnuboat/mapservice/docker_memcached':
+                ensure => 'directory',
+        }
+
+	file { '/var/lib/gnuboat/mapservice/docker_database/Dockerfile':
 		ensure => file,
-		path => '/tmp/gnuboat_mapservice_database/Dockerfile',
 		content => file('gnuboat_mapservice/mapservice_database_dockerfile'),
 	}
 
-	file { '/tmp/gnuboat_mapservice_database/gnuboat_mapservice.sql':
+	file { '/var/lib/gnuboat/mapservice/docker_database/gnuboat_mapservice.sql':
                 ensure => file,
                 content => file('gnuboat_mapservice/gnuboat_mapservice.sql'),
         }
 
-	file { '/tmp/gnuboat_mapservice_mapservice/Dockerfile':
+	file { '/var/lib/gnuboat/mapservice/docker_mapservice/Dockerfile':
                 ensure => file,
-                path => '/tmp/gnuboat_mapservice_mapservice/Dockerfile',
-                content => file('gnuboat_mapservice/mapservice_mapservice_dockerfile'),
+                content => epp('gnuboat_mapservice/mapservice_mapservice_dockerfile.epp',
+		{
+			'mapservice_workers' => $mapservice_workers,
+			'mapservice_tile_cache_dir' => $mapservice_tile_cache_dir,
+		}),
         }
 
-	file { '/tmp/gnuboat_mapservice_mapservice/gnuboat-keyring.gpg':
+	file { '/var/lib/gnuboat/mapservice/docker_mapservice/gnuboat-keyring.gpg':
                 ensure => file,
-                path => '/tmp/gnuboat_mapservice_mapservice/gnuboat-keyring.gpg',
                 content => file('gnuboat_mapservice/gnuboat-keyring.gpg'),
         }
 
-#	file { '/tmp/puppet':
-#		before => File['/tmp/gnuboat_mapservice_database/Dockerfile'],
-#		path => '/tmp/gnuboat_mapservice_database/puppet',
-#		source => '/etc/puppet',
-#		recurse => true,
-#	}
+	file { '/var/lib/gnuboat/mapservice/docker_mapservice/mapservice.conf':
+                ensure => file,
+                content => epp('gnuboat_mapservice/mapservice.conf.epp',
+                {
+                        'database_name' => $database_name,
+                        'database_user' => $database_user,
+                        'database_password' => $database_password,
+			'database_host' => $database_host,
+			'broker_host' => $broker_host,
+			'celery_cache_host' => $celery_cache_host,
+                        'mapservice_tile_cache_dir' => $mapservice_tile_cache_dir,
+                }),
+        }
 
-	file { '/tmp/gnuboat_mapservice.yaml':
+        # Configure celery worker service
+        file { '/var/lib/gnuboat/mapservice/docker_mapservice_celery/mapservice-celery.conf':
+                ensure => file,
+                content => epp('gnuboat_mapservice/mapservice_celery.conf.epp',
+                {
+                        'mapservice_celery_nodes' => $mapservice_celery_nodes,
+                }),
+        }
+	file { '/var/lib/gnuboat/mapservice/docker_mapservice_celery/mapservice_celery_entrypoint.sh':
+                ensure => file,
+                content => file('gnuboat_mapservice/mapservice_celery_entrypoint.sh'),
+		mode => '0755',
+        }
+	file { '/var/lib/gnuboat/mapservice/docker_mapservice_celery/mapservice.conf':
+                ensure => file,
+                content => epp('gnuboat_mapservice/mapservice.conf.epp',
+                {
+                        'database_name' => $database_name,
+                        'database_user' => $database_user,
+                        'database_password' => $database_password,
+			'database_host' => $database_host,
+			'broker_host' => $broker_host,
+			'celery_cache_host' => $celery_cache_host,
+                        'mapservice_tile_cache_dir' => $mapservice_tile_cache_dir,
+                }),
+        }
+
+        file { '/var/lib/gnuboat/mapservice/docker_mapservice_celery/Dockerfile':
+                ensure => file,
+                content => epp('gnuboat_mapservice/mapservice_celery_dockerfile.epp',
+                {
+                        'mapservice_tile_cache_dir' => $mapservice_tile_cache_dir,
+                }),
+        }
+
+	file { '/var/lib/gnuboat/mapservice/docker_mapservice_celery/gnuboat-keyring.gpg':
+                ensure => file,
+                content => file('gnuboat_mapservice/gnuboat-keyring.gpg'),
+        }
+
+	file { '/var/lib/gnuboat/mapservice/docker_rabbitmq/Dockerfile':
+                ensure => file,
+                content => file('gnuboat_mapservice/mapservice_rabbitmq_dockerfile'),
+        }
+
+	file { '/var/lib/gnuboat/mapservice/docker_memcached/Dockerfile':
+                ensure => file,
+                content => file('gnuboat_mapservice/mapservice_memcached_dockerfile'),
+        }
+
+	file { '/var/lib/gnuboat/mapservice/gnuboat_mapservice_docker.yaml':
                 ensure => file,
                 content => epp('gnuboat_mapservice/gnuboat_mapservice.yaml.epp',
@@ -56,4 +138,9 @@
 				'database_user' => $database_user,
 				'database_password' => $database_password,
+				'database_host' => $database_host,
+				'broker_host' => $broker_host,
+				'celery_cache_host' => $celery_cache_host,
+				'mapservice_tile_cache_dir' => $mapservice_tile_cache_dir,
+				'osm_tileserver_enabled' => $osm_tileserver_enabled,
 			}
 		),
@@ -61,26 +148,13 @@
 
 	docker_compose{'gnuboat_mapservice_host':
-		require => File['/var/lib/gnuboat/mapservice/database'],
-		compose_files => ['/tmp/gnuboat_mapservice.yaml'],
+		compose_files => ['/var/lib/gnuboat/mapservice/gnuboat_mapservice_docker.yaml'],
 		ensure => present,
 		scale => {
-			'gnuboat_mapservice_database' => 1,
+			'gnuboat_mapservice_mapservice' => 1,
 		},
+		require => [
+			File['/var/lib/gnuboat/mapservice'],
+			File['/var/lib/gnuboat/mapservice/rabbitmq'],
+		],
 	}
-
-#	file { '/tmp/gnuboat_mapservice_database/database_setup.sql':
-#		ensure => file,
-#		content => epp('gnuboat_mapservice/mapservice_database.sql.epp',
-#                        {
-#				'database_name' => $database_name,
-#				'database_user' => $database_user,
-#				'database_password' => $database_password,
-#                       }
-#              ),
-#	}
-
-#	file { '/tmp/gnuboat_mapservice_database/database_run':
-#		ensure => file,
-#		content => file('gnuboat_mapservice/mapservice_database_run'),
-#	}
 }
Index: src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/manifests/init.pp
===================================================================
--- src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/manifests/init.pp	(revision 56d997983a4c8c1df518d22b75a7af00bf60eccc)
+++ src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/manifests/init.pp	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -6,16 +6,24 @@
 	String $database_name = 'gnuboat_mapservice',
         String $database_user = 'gnuboat_mapservice',
-        String $database_password = 'Sr7DeuA7Db9fdve3Ywbf',
+        String $database_password = extlib::random_password(42),
+	String $database_host = "localhost",
 	String $mapservice_version = 'latest',
 	Integer $mapservice_workers = 1,
 	Integer $mapservice_port = 8080,
 	Integer $mapservice_celery_nodes = 2,
+	String $broker_host = "localhost",
+	String $celery_cache_host = "localhost",
+	String $mapservice_tile_cache_dir = '/var/lib/gnuboat/tilescache',
 	Boolean $apache_enabled = false,
+	String $apache_vhost_name = "gnuboat_proxy",
+	String $apache_vhost_servername = "localhost",
+	String $apache_vhost_ssl_cert = '',
+	String $apache_vhost_ssl_key = '',
+	Boolean $apache_replace_default_host = false,
+	Boolean $osm_tileserver_enabled= false,
 )
 {
-#	contain gnuboat_mapservice::config
-#	contain gnuboat_mapservice::service
-
 	if $gnuboat_type == "mapservice_host" {
+		contain gnuboat_mapservice::apache_config
 		if $containerized {
 			contain gnuboat_mapservice::host_install
@@ -23,5 +31,5 @@
 
 			Class['gnuboat_mapservice::host_install'] ->
-		#	Class['gnuboat_mapservice::config']
+			Class['gnuboat_mapservice::apache_config'] ->
 			Class['gnuboat_mapservice::host_service']
 		}
@@ -33,4 +41,5 @@
 			Class['gnuboat_mapservice::mapservice_without_container_install'] ->
 			Class['gnuboat_mapservice::mapservice_without_container_config'] ->
+			Class['gnuboat_mapservice::apache_config'] ->
 			Class['gnuboat_mapservice::mapservice_without_container_service']
 		}
Index: src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/manifests/mapservice_without_container_config.pp
===================================================================
--- src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/manifests/mapservice_without_container_config.pp	(revision 56d997983a4c8c1df518d22b75a7af00bf60eccc)
+++ src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/manifests/mapservice_without_container_config.pp	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -39,12 +39,4 @@
         }
 
-
-	file { '/var/lib/gnuboat/tilescache':
-                ensure => 'directory',
-                owner => 'gnuboat',
-                group => 'gnuboat',
-                mode => '0750',
-        }
-
 	# Configure mapservice itself
         file { '/lib/systemd/system/gnuboat-mapservice.service':
@@ -64,4 +56,7 @@
                         'database_user' => $database_user,
 			'database_password' => $database_password,
+			'broker_host' => $broker_host,
+			'celery_cache_host' => $celery_cache_host,
+			'mapservice_tile_cache_dir' => $mapservice_tile_cache_dir,
                 }),
         }
@@ -102,19 +97,3 @@
                 content => file('gnuboat_mapservice/gnuboat_mapservice_celery_beat.service'),
         }
-
-	# Configure apache, if wanted
-	if($apache_enabled){
-		class {'apache':
-			default_vhost => false,
-		}
-
-		apache::vhost{'gnuboat_proxy':
-			port => '80',
-			docroot => '/var/www',
-			proxy_pass => [
-				{ path => '/', url => 'http://localhost:8080/' },
-			],
-			suphp_engine => off,
-		}
-	}
 }
Index: src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/manifests/osm_config.pp
===================================================================
--- src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/manifests/osm_config.pp	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/manifests/osm_config.pp	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,19 @@
+class gnuboat_mapservice::osm_config inherits gnuboat_mapservice
+{
+	if($osm_tileserver_enabled){
+		file{'/var/lib/gnuboat/osm':
+			ensure => directory,
+		}
+		file{'/var/lib/gnuboat/osm/database':
+			ensure => directory,
+		}
+		file{'var/libb/gnuboat/osm/tilecache':
+			ensure => directory,
+		}
+
+
+		file{'/var/lib/gnuboat/osm/data.osm.pbf':
+			source => 'https://download.geofabrik.de/europe-latest.osm.pbf',
+		}
+	}
+}
Index: src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/templates/gnuboat_mapservice.yaml.epp
===================================================================
--- src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/templates/gnuboat_mapservice.yaml.epp	(revision 56d997983a4c8c1df518d22b75a7af00bf60eccc)
+++ src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/templates/gnuboat_mapservice.yaml.epp	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -1,19 +1,74 @@
 <%- |   String $database_name,
         String $database_user,
-        String $database_password | -%>
-version: "3.0"
+        String $database_password,
+	String $database_host,
+	String $broker_host,
+	String $celery_cache_host,
+	String $mapservice_tile_cache_dir,
+	Boolean osm_tileserver_enabled,
+ | -%>
+version: "2.0"
 services:
-  gnuboat_mapservice_database:
+  <%= $database_host %>:
     environment:
       - POSTGRES_USER=<%= $database_name %>
       - POSTGRES_PASSWORD=<%= $database_password %>
       - POSTGRES_DB=<%= $database_name %>
-    build: gnuboat_mapservice_database/
+      - PGDATA=/var/lib/postgresql/database/data
+    build: docker_database/
     expose:
       - "5432"
     volumes:
-      - /var/lib/gnuboat/mapservice/database:/var/lib/postgresql
+      - /var/lib/gnuboat/mapservice:/var/lib/postgresql
+      - /var/log/gnuboat:/var/log/gnuboat
+    restart: always
   gnuboat_mapservice_mapservice:
-    build: gnuboat_mapservice_mapservice/
+    build: docker_mapservice/
     expose:
       - "8080"
+    ports:
+      - "8080:8080"
+    volumes:
+      - /var/log/gnuboat:/var/log/gnuboat
+      - <%= $mapservice_tile_cache_dir %>:<%= $mapservice_tile_cache_dir %>
+    depends_on:
+      - <%= $database_host %>
+      - <%= $broker_host %>
+      - <%= $celery_cache_host %>
+      - gnuboat_mapservice_celery
+    restart: always
+  gnuboat_mapservice_celery:
+    build: docker_mapservice_celery/
+    volumes:
+      - <%= $mapservice_tile_cache_dir %>:<%= $mapservice_tile_cache_dir %>
+      - /var/log/gnuboat:/var/log/gnuboat
+    depends_on:
+      - <%= $database_host %>
+      - <%= $broker_host %>
+      - <%= $celery_cache_host %>
+    restart: always
+  <%= $broker_host %>:
+    build: docker_rabbitmq/
+    hostname: 'gnuboat_mapservice_rabbitmq'
+    volumes:
+      - /var/lib/gnuboat/mapservice/rabbitmq:/var/lib/rabbitmq
+    expose:
+      - "5672"
+    restart: always
+  <%= $celery_cache_host %>:
+    build: docker_memcached/
+    expose:
+      - "12211"
+    restart: always
+<% if $osm_tileserver_enabled { %>
+  gnuboat_osm:
+    enviornment:
+      - UPDATES=enabled
+    build: docker_osm/
+    volumes:
+      - /var/lib/gnuboat/osm/database:/var/lib/postgresql
+      - /var/lib/gnuboat/osm/tilecache:/var/lib/mod_tile
+      - /var/lib/gnuboat/osm/data.osm.pbf:/data.osm.pbf
+    ports:
+      - "8080:8081"
+<% } %>
Index: src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/templates/mapservice.conf.epp
===================================================================
--- src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/templates/mapservice.conf.epp	(revision 56d997983a4c8c1df518d22b75a7af00bf60eccc)
+++ src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/templates/mapservice.conf.epp	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -1,5 +1,11 @@
 <%- |   String $database_name,
 	String $database_user,
-	String $database_password | -%>
-SQLALCHEMY_DATABASE_URI: 'postgresql://<%= $database_user %>:<%= $database_password %>@localhost/<%= $database_name %>'
-TILES_CACHE_PATH: '/var/lib/gnuboat/tilecache'
+	String $database_password,
+	String $database_host,
+	String $broker_host,
+	String $celery_cache_host,
+	String $mapservice_tile_cache_dir | -%>
+SQLALCHEMY_DATABASE_URI: 'postgresql://<%= $database_user %>:<%= $database_password %>@<%= $database_host %>/<%= $database_name %>'
+TILES_CACHE_PATH: '<%= $mapservice_tile_cache_dir %>'
+CELERY_BROKER_URL: 'pyamqp://guest:guest@<%= $broker_host %>//'
+CELERY_CACHE_BACKEND: 'memcached://<%= $celery_cache_host %>:11211'
Index: src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/templates/mapservice_celery_dockerfile.epp
===================================================================
--- src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/templates/mapservice_celery_dockerfile.epp	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/templates/mapservice_celery_dockerfile.epp	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,13 @@
+<%- |   String $mapservice_tile_cache_dir,
+ | -%>
+FROM debian:bullseye
+RUN mkdir -p /etc/gnuboat /var/log/gnuboat /var/lib/gnuboat <%= $mapservice_tile_cache_dir %>
+COPY mapservice.conf /etc/gnuboat/mapservice.conf
+COPY mapservice-celery.conf /etc/gnuboat/mapservice-celery.conf
+COPY gnuboat-keyring.gpg /etc/apt/trusted.gpg.d/
+COPY mapservice_celery_entrypoint.sh /usr/bin/mapservice_celery_entrypoint.sh
+VOLUME <%= $mapservice_tile_cache_dir %>
+VOLUME /var/log/gnuboat
+RUN echo "deb http://ftp.engsas.de/unstable/gnuboat/ bullseye main" > /etc/apt/sources.list.d/gnuboat.list
+RUN apt-get update && apt-get -y install --no-install-recommends gnuboat-mapservice celery
+ENTRYPOINT [ "/usr/bin/mapservice_celery_entrypoint.sh" ]
Index: src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/templates/mapservice_mapservice_dockerfile.epp
===================================================================
--- src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/templates/mapservice_mapservice_dockerfile.epp	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
+++ src/puppetcode/environments/gnuboat/modules/gnuboat_mapservice/templates/mapservice_mapservice_dockerfile.epp	(revision 4fa6152c11efe2518c41a3ea62b0bb85f1530c6d)
@@ -0,0 +1,13 @@
+<%- |   String $mapservice_tile_cache_dir,
+	Integer $mapservice_workers,
+ | -%>
+FROM debian:bullseye
+RUN mkdir -p /etc/gnuboat /var/log/gnuboat /var/lib/gnuboat <%= $mapservice_tile_cache_dir %>
+COPY mapservice.conf /etc/gnuboat/mapservice.conf
+COPY gnuboat-keyring.gpg /etc/apt/trusted.gpg.d/
+VOLUME <%= $mapservice_tile_cache_dir %>
+RUN echo "deb http://ftp.engsas.de/unstable/gnuboat/ bullseye main" > /etc/apt/sources.list.d/gnuboat.list
+RUN apt-get update && apt-get -y install --no-install-recommends gnuboat-mapservice gunicorn
+EXPOSE 8080
+ENTRYPOINT ["/usr/bin/gunicorn"]
+CMD ["--log-file=/var/log/gnuboat/mapservice.log", "-w", "<%= $mapservice_workers %>", "-b", ":8080", "gnuboat.mapservice_impl.demo.service_entry:gunicorn_app()"]
