diff --git a/CHANGELOG.md b/CHANGELOG.md
index aa2e00c..989a2d5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,379 +1,388 @@
# 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.3.0](https://github.com/voxpupuli/puppet-extlib/tree/v5.3.0) (2021-10-18)
+
+[Full Changelog](https://github.com/voxpupuli/puppet-extlib/compare/v5.2.1...v5.3.0)
+
+**Implemented enhancements:**
+
+- add netmask\_to\_cidr function [\#190](https://github.com/voxpupuli/puppet-extlib/pull/190) ([foxxx0](https://github.com/foxxx0))
+- Add support for Debian 11 [\#187](https://github.com/voxpupuli/puppet-extlib/pull/187) ([smortex](https://github.com/smortex))
+
## [v5.2.1](https://github.com/voxpupuli/puppet-extlib/tree/v5.2.1) (2021-08-25)
[Full Changelog](https://github.com/voxpupuli/puppet-extlib/compare/v5.2.0...v5.2.1)
**Merged pull requests:**
- Allow stdlib 8.0.0 [\#184](https://github.com/voxpupuli/puppet-extlib/pull/184) ([smortex](https://github.com/smortex))
## [v5.2.0](https://github.com/voxpupuli/puppet-extlib/tree/v5.2.0) (2021-08-18)
[Full Changelog](https://github.com/voxpupuli/puppet-extlib/compare/v5.1.0...v5.2.0)
**Implemented enhancements:**
- Add cidr\_to\_network function [\#167](https://github.com/voxpupuli/puppet-extlib/pull/167) ([bastelfreak](https://github.com/bastelfreak))
**Merged pull requests:**
- Remove namespaced `extlib.puppet_config` fact [\#182](https://github.com/voxpupuli/puppet-extlib/pull/182) ([alexjfisher](https://github.com/alexjfisher))
## [v5.1.0](https://github.com/voxpupuli/puppet-extlib/tree/v5.1.0) (2021-06-01)
[Full Changelog](https://github.com/voxpupuli/puppet-extlib/compare/v5.0.0...v5.1.0)
**Implemented enhancements:**
- Mark compatible with puppetlabs/stdlib 7.x [\#180](https://github.com/voxpupuli/puppet-extlib/pull/180) ([ekohl](https://github.com/ekohl))
- Support Puppet 7 [\#179](https://github.com/voxpupuli/puppet-extlib/pull/179) ([mattock](https://github.com/mattock))
- Use a shorter syntax to return [\#178](https://github.com/voxpupuli/puppet-extlib/pull/178) ([ekohl](https://github.com/ekohl))
- new function dir\_clean and refactor [\#176](https://github.com/voxpupuli/puppet-extlib/pull/176) ([b4ldr](https://github.com/b4ldr))
- Add ability to specify extra args to path functions [\#175](https://github.com/voxpupuli/puppet-extlib/pull/175) ([logicminds](https://github.com/logicminds))
- Add cidr\_to\_netmask function [\#166](https://github.com/voxpupuli/puppet-extlib/pull/166) ([bastelfreak](https://github.com/bastelfreak))
- Add last\_in\_cidr function [\#165](https://github.com/voxpupuli/puppet-extlib/pull/165) ([bastelfreak](https://github.com/bastelfreak))
- mark Ubuntu 20.04 as supported [\#161](https://github.com/voxpupuli/puppet-extlib/pull/161) ([mmoll](https://github.com/mmoll))
**Fixed bugs:**
- path\_join: fix examples [\#173](https://github.com/voxpupuli/puppet-extlib/pull/173) ([kenyon](https://github.com/kenyon))
**Closed issues:**
- import add sorted\_json function from solarkennedy/puppet-consul [\#174](https://github.com/voxpupuli/puppet-extlib/issues/174)
**Merged pull requests:**
- update REFERENCE.md [\#169](https://github.com/voxpupuli/puppet-extlib/pull/169) ([bastelfreak](https://github.com/bastelfreak))
- Remove cache\_data helper methods in tests [\#163](https://github.com/voxpupuli/puppet-extlib/pull/163) ([ekohl](https://github.com/ekohl))
- Fix several markdown lint issues [\#160](https://github.com/voxpupuli/puppet-extlib/pull/160) ([dhoppe](https://github.com/dhoppe))
## [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/v0.10.1...v0.10.2)
+[Full Changelog](https://github.com/voxpupuli/puppet-extlib/compare/0.10.1...v0.10.2)
-## [v0.10.1](https://github.com/voxpupuli/puppet-extlib/tree/v0.10.1) (2015-10-05)
+## [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/0.10.1...v0.10.1)
+[Full Changelog](https://github.com/voxpupuli/puppet-extlib/compare/v0.10.1...0.10.1)
-## [0.10.1](https://github.com/voxpupuli/puppet-extlib/tree/0.10.1) (2015-10-05)
+## [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...0.10.1)
+[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)*
diff --git a/REFERENCE.md b/REFERENCE.md
index 377a084..3975c0a 100644
--- a/REFERENCE.md
+++ b/REFERENCE.md
@@ -1,904 +1,941 @@
# Reference
## 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::cidr_to_netmask`](#extlibcidr_to_netmask): Converts an CIDR address of the form 192.168.0.1/24 into its netmask.
* [`extlib::cidr_to_network`](#extlibcidr_to_network): Converts a CIDR address of the form 2001:DB8::/32 or 192.0.2.0/24 into their network address (also known as net address)
* [`extlib::default_content`](#extlibdefault_content): Takes an optional content and an optional template name and returns the contents of a file.
* [`extlib::dir_clean`](#extlibdir_clean): Take a path and normalise it to its Unix form.
* [`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::last_in_cidr`](#extliblast_in_cidr): Converts an IPv4 or IPv6 CIDR address of the form 192.0.2.1/24 or 2001:db8::1/64 into the last address in the network
* [`extlib::mkdir_p`](#extlibmkdir_p): Like the unix command mkdir_p except with puppet code.
+* [`extlib::netmask_to_cidr`](#extlibnetmask_to_cidr): Converts an octet netmask address of the form 255.255.255.0 into its CIDR variant.
+Thus making it directly usable with the values from facter.
* [`extlib::path_join`](#extlibpath_join): Take one or more paths and join them together
* [`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::cidr_to_netmask`
Type: Ruby 4.x API
Imported by Tim 'bastelfreak' Meusel into voxpupuli/extlib because Yelp/netstdlib got abandoned
#### Examples
##### calling the function
```puppet
extlib::cidr_to_netmask('127.0.0.1/8')
```
#### `extlib::cidr_to_netmask(Variant[Stdlib::IP::Address::V4::CIDR,Stdlib::IP::Address::V6::CIDR] $ip)`
Imported by Tim 'bastelfreak' Meusel into voxpupuli/extlib because Yelp/netstdlib got abandoned
Returns: `Variant[Stdlib::IP::Address::V4::Nosubnet,Stdlib::IP::Address::V6::Nosubnet]` IPv6 or IPv4 netmask address
##### Examples
###### calling the function
```puppet
extlib::cidr_to_netmask('127.0.0.1/8')
```
##### `ip`
Data type: `Variant[Stdlib::IP::Address::V4::CIDR,Stdlib::IP::Address::V6::CIDR]`
IPv6 or IPv4 address in CIDR notation
### `extlib::cidr_to_network`
Type: Ruby 4.x API
Imported by Tim 'bastelfreak' Meusel into voxpupuli/extlib because Yelp/netstdlib got abandoned
#### Examples
##### calling the function
```puppet
extlib::cidr_to_network('2001:DB8::/32')
```
#### `extlib::cidr_to_network(Variant[Stdlib::IP::Address::V4::CIDR,Stdlib::IP::Address::V6::CIDR] $ip)`
Imported by Tim 'bastelfreak' Meusel into voxpupuli/extlib because Yelp/netstdlib got abandoned
Returns: `Variant[Stdlib::IP::Address::V4::Nosubnet,Stdlib::IP::Address::V6::Nosubnet]` IPv6 or IPv4 network/net address
##### Examples
###### calling the function
```puppet
extlib::cidr_to_network('2001:DB8::/32')
```
##### `ip`
Data type: `Variant[Stdlib::IP::Address::V4::CIDR,Stdlib::IP::Address::V6::CIDR]`
IPv6 or IPv4 address in CIDR notation
### `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_clean`
Type: Puppet Language
Instead of having to deal with the different separators between Unix and Windows this
function instead formats Windows paths a equivalent Unix like path.
$dir is defined as a Variant to support cleaning 'c:' which is not a valid
Stdlib::Absolutepath
#### Examples
##### clean Unix paths to return `/tmp/test/libs` (i.e. noop)
```puppet
extlib::dir_clean('/tmp/test/libs')
```
##### Clean Windows paths to return `/c/test/libs`
```puppet
extlib::dir_clean('c:\\'test\\libs')
```
#### `extlib::dir_clean(Variant[Stdlib::Absolutepath, Pattern[/\A[a-zA-Z]:\z/]] $dir)`
Instead of having to deal with the different separators between Unix and Windows this
function instead formats Windows paths a equivalent Unix like path.
$dir is defined as a Variant to support cleaning 'c:' which is not a valid
Stdlib::Absolutepath
Returns: `Stdlib::Unixpath` Stdlib::Unixpath The cleaned path
##### Examples
###### clean Unix paths to return `/tmp/test/libs` (i.e. noop)
```puppet
extlib::dir_clean('/tmp/test/libs')
```
###### Clean Windows paths to return `/c/test/libs`
```puppet
extlib::dir_clean('c:\\'test\\libs')
```
##### `dir`
Data type: `Variant[Stdlib::Absolutepath, Pattern[/\A[a-zA-Z]:\z/]]`
The path to clean
### `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::last_in_cidr`
Type: Ruby 4.x API
Imported by Tim 'bastelfreak' Meusel into voxpupuli/extlib because Yelp/netstdlib got abandoned
#### Examples
##### calling the function
```puppet
extlib::last_in_cidr('127.0.0.1/8')
```
#### `extlib::last_in_cidr(Variant[Stdlib::IP::Address::V4::CIDR,Stdlib::IP::Address::V6::CIDR] $ip)`
Imported by Tim 'bastelfreak' Meusel into voxpupuli/extlib because Yelp/netstdlib got abandoned
Returns: `Variant[Stdlib::IP::Address::V4::Nosubnet,Stdlib::IP::Address::V6::Nosubnet]` last address in the network
##### Examples
###### calling the function
```puppet
extlib::last_in_cidr('127.0.0.1/8')
```
##### `ip`
Data type: `Variant[Stdlib::IP::Address::V4::CIDR,Stdlib::IP::Address::V6::CIDR]`
IP address in CIDR notation
### `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::netmask_to_cidr`
+
+Type: Ruby 4.x API
+
+Converts an octet netmask address of the form 255.255.255.0 into its CIDR variant.
+Thus making it directly usable with the values from facter.
+
+#### Examples
+
+##### calling the function
+
+```puppet
+extlib::netmask_to_cidr('255.0.0.0')
+```
+
+#### `extlib::netmask_to_cidr(Stdlib::IP::Address::Nosubnet $netmask)`
+
+The extlib::netmask_to_cidr function.
+
+Returns: `Integer[0, 128]` CIDR / prefix length
+
+##### Examples
+
+###### calling the function
+
+```puppet
+extlib::netmask_to_cidr('255.0.0.0')
+```
+
+##### `netmask`
+
+Data type: `Stdlib::IP::Address::Nosubnet`
+
+IPv6 or IPv4 netmask in octet notation
+
### `extlib::path_join`
Type: Puppet Language
This function will format a windows paths into equivalent unix like paths.
This type of unix like path should 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(Variant[String, Array[String]] $dirs)`
This function will format a windows paths into equivalent unix like paths.
This type of unix like path should 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: `Variant[String, 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.
diff --git a/metadata.json b/metadata.json
index b321cf8..487b653 100644
--- a/metadata.json
+++ b/metadata.json
@@ -1,70 +1,70 @@
{
"name": "puppet-extlib",
- "version": "5.2.2-rc0",
+ "version": "5.3.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",
"author": "Vox Pupuli",
"license": "Apache-2.0",
"summary": "extlib provides functions out of scope puppetlabs/stdlib",
"description": "extlib provides functions out of scope puppetlabs/stdlib",
"tags": [
"voxpupuli",
"extlib",
"stdlib"
],
"requirements": [
{
"name": "puppet",
"version_requirement": ">= 5.5.8 < 8.0.0"
}
],
"dependencies": [
{
"name": "puppetlabs/stdlib",
"version_requirement": ">= 4.18.0 < 9.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",
"11"
]
},
{
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
"16.04",
"18.04",
"20.04"
]
}
]
}