stdlib

pdk
supported
Standard library of resources for Puppet modules.

120,104,876 downloads

37,186 latest version

4.7 quality score

Version information

  • 9.7.0 (latest)
  • 9.6.0
  • 9.5.0
  • 9.4.1
  • 9.4.0
  • 9.3.0
  • 9.2.0
  • 9.1.0
  • 9.0.0
  • 8.6.0
  • 8.5.0
  • 8.4.0
  • 8.3.0
  • 8.2.0
  • 8.1.0
  • 8.0.0
  • 7.1.0
  • 7.0.1
  • 7.0.0
  • 6.6.0
  • 6.5.0
  • 6.4.0
  • 6.3.0
  • 6.2.0
  • 6.1.0
  • 6.0.0
  • 5.2.0
  • 5.1.0
  • 5.0.0
  • 4.25.1
  • 4.25.0
  • 4.24.0
  • 4.23.0
  • 4.22.0
  • 4.21.0
  • 4.20.0
  • 4.19.0
  • 4.18.0
  • 4.17.1
  • 4.17.0
  • 4.16.0
  • 4.15.0
  • 4.14.0
  • 4.13.1
  • 4.13.0
  • 4.12.0
  • 4.11.0
  • 4.10.0
  • 4.9.1
  • 4.9.0
  • 4.8.0
  • 4.7.0
  • 4.6.0
  • 4.5.1
  • 4.5.0
  • 4.4.0
  • 4.3.2
  • 4.3.0
  • 4.2.2
  • 4.2.1
  • 4.2.0
  • 4.1.0
  • 3.2.2
  • 3.2.1
  • 3.2.0
  • 3.1.1
  • 3.1.0
  • 3.0.1
  • 3.0.0
  • 2.6.0
  • 2.5.1
  • 2.5.0
  • 2.4.0
  • 2.3.3
  • 2.3.2
  • 2.3.1
  • 2.3.0
  • 2.2.1
  • 2.2.0
  • 2.1.3
  • 2.0.0
  • 1.1.0
  • 1.0.0
  • 0.1.7
  • 0.1.6
  • 0.1.5
  • 0.1.4
  • 0.1.3
  • 0.1.2
  • 0.1.1
released May 30th 2023
This version is compatible with:
  • Puppet Enterprise 2025.3.x, 2025.2.x, 2025.1.x, 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x
  • Puppet >= 7.0.0 < 9.0.0
  • RedHat
    ,
    CentOS
    ,
    OracleLinux
    ,
    Scientific
    ,
    SLES
    ,
    Debian
    ,
    Ubuntu
    ,
    Solaris
    ,
    Windows
    ,
    AIX
    ,
    Rocky
    ,
    AlmaLinux

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'puppetlabs-stdlib', '9.0.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add puppetlabs-stdlib
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install puppetlabs-stdlib --version 9.0.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

puppetlabs/stdlib — version 9.0.0 May 30th 2023

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

v9.0.0 - 2023-05-30

Full Changelog

Added

Changed

Fixed

v8.6.0 - 2023-04-24

Full Changelog

Added

Fixed

v8.5.0 - 2022-10-13

Full Changelog

Added

Fixed

v8.4.0 - 2022-07-21

Full Changelog

Added

  • deferrable epp function simplifying deferred templates #1253 (binford2k)

v8.3.0 - 2022-07-11

Full Changelog

Added

Fixed

  • (MODULES-2892) Handle missing file in file_line #1251 (silug)
  • Simplify stdlib::manage #1250 (jcpunk)
  • Unbreak rake strings:generate:reference #1239 (smortex)
  • loadjson: do not send http_basic_authentication if not needed #1208 (chaen)

v8.2.0 - 2022-05-16

Full Changelog

Added

Fixed

v8.1.0 - 2021-10-04

Full Changelog

Added

Fixed

v8.0.0 - 2021-08-24

Full Changelog

Added

Changed

  • Flip installed and present in Function ensure_packages #1196 (cocker-cc)

Fixed

  • (MODULES-11099) Make merge parameter data types actually backwards compatible #1191 (SimonPe)

v7.1.0 - 2021-05-17

Full Changelog

Added

v7.0.1 - 2021-04-12

Full Changelog

Fixed

v7.0.0 - 2021-03-01

Full Changelog

Added

Changed

  • pdksync - Remove Puppet 5 from testing and bump minimal version to 6.0.0 #1164 (carabasdaniel)

Fixed

  • (bugfix) Setting stricter email validation #1163 (pmcmaw)
  • (IAC-1414) Throw error in range() function when step size invalid #1161 (sanfrancrisko)

v6.6.0 - 2021-02-02

Full Changelog

Added

Fixed

  • (IAC-1375) fix unit tests for pe_version fact, when using later facte… #1155 (tphoney)
  • seeded_rand: update funtion to ensure it returns an int not String #1139 (b4ldr)

v6.5.0 - 2020-09-30

Full Changelog

Added

  • Add parsehocon() function #1130 (reidmv)
  • Add new types for Stdlib::Ensure::File #1129 (b4ldr)
  • Add additional types Stdlib::Port::Dynamic,Ephemeral,Registered,User} #1128 (b4ldr)
  • Stdlib::Datasize: This CR adds a new data size type alias #1126 (b4ldr)

v6.4.0 - 2020-08-21

Full Changelog

Added

Fixed

v6.3.0 - 2020-04-16

Full Changelog

Added

Fixed

  • (MODULES-10623) explicitly top-scope calls to JSON methods #1101 (tkishel)
  • [IAC-547] Remove strftime from stdlib as it has already been replaced by the puppet agent since 4.8.0 #1097 (carabasdaniel)
  • Add correct namespace for start_with function #1095 (baurmatt)
  • intersection: show types in exception due to invalid arguments #1077 (runejuhl)
  • Make type aliases stricter #1066 (pegasd)

v6.2.0 - 2019-12-10

Full Changelog

Added

Fixed

v6.1.0 - 2019-09-20

Full Changelog

Added

Fixed

  • fix lib/puppet/parser/functions/fqdn_rand_string.rb:21: syntax error #1029 (pulecp)
  • Limit the maximum array size produced by range(). #1023 (mbaynton)

v6.0.0 - 2019-05-22

Full Changelog

Added

  • (MODULES-8760) Add iterative feature to merge() function #1008 (hlindberg)
  • Add a stdlib::ip_in_range() function #1003 (iglov)

Changed

Other

  • (MODULES-8992)- Supported Release (puppetlabs-stdlib) #1015 (lionce)

5.2.0 - 2019-01-18

Full Changelog

Added

Fixed

  • pdksync - (FM-7655) Fix rubygems-update for ruby < 2.3 #979 (tphoney)
  • fix ensure_packages duplicate checking #969 (netzvieh)

5.1.0 - 2018-10-01

Full Changelog

Added

  • pdksync - (MODULES-6805) metadata.json shows support for puppet 6 #958 (tphoney)
  • (maint) Convert from mocking with mocha to rspec-mocks #948 (rodjek)

Fixed

5.0.0 - 2018-08-22

Full Changelog

Added

Fixed

  • Make any2array return empty array on empty string #930 (jbro)
  • Revert "Allow pick() to work with strict variables" #927 (mwhahaha)
  • (docs) update documentation wrt functions moved to puppet #922 (hlindberg)

Other

4.25.1 - 2018-04-04

Full Changelog

Other

  • (MODULES-6951) Updating translations for readmes/README_ja_JP.md #900 (ehom)
  • Remove unneeded execute permission #880 (smortex)

4.25.0 - 2018-03-13

Full Changelog

Added

Fixed

  • Handle join_keys_to_values() with undef values. #874 (BobVanB)

Other

4.24.0 - 2017-12-08

Full Changelog

Other

  • Release Prep 4.24.0 #864 (pmcmaw)
  • (FM-6634) - Addressing rubocop errors #863 (pmcmaw)
  • (MODULES-6216) - Fix type3x function in stdlib #861 (pmcmaw)
  • MODULES-6201 .rubocop.yml not managed by msync #859 (tphoney)
  • MODULES-6139 Revert to old ruby 1.X style of hash #858 (tphoney)
  • Lint style/syntax #857 (AlexanderSalmin)
  • Updated type alias tests and dropped superfluous wrapper classes #856 (pegasd)
  • Ability to skip undef values in to_json_pretty() #855 (pegasd)
  • MODULES-6106: Fix broken .sync.yml #854 ()
  • Release mergeback 4.23.0 #853 (tphoney)

4.23.0 - 2017-11-24

Full Changelog

Other

4.22.0 - 2017-11-15

Full Changelog

Other

4.21.0 - 2017-11-03

Full Changelog

Added

  • Add a type for ensure on service resources #750 (npwalker)

Fixed

Other

4.20.0 - 2017-09-11

Full Changelog

Added

Other

4.19.0 - 2017-08-21

Full Changelog

Other

4.18.0 - 2017-08-11

Full Changelog

Added

Other

  • (MODULES-5436) release prep for 4.18.0 #804 (eputnam)
  • MODULES-5440 fix upper bound for puppet #803 (tphoney)
  • (MODULES-5436) release prep for 4.17.2 #802 (eputnam)
  • (maint) revert puppet version requirement #801 (eputnam)
  • MODULES-5382 Add documentation for email functions #800 (tphoney)
  • (maint) modulesync 915cde70e20 #799 (glennsarti)
  • (maint) move/rewrite round() as ruby function #798 (eputnam)
  • Update README for fact() function #797 (reidmv)
  • (MODULES-5003) file_line does not change multiple lines when one matches #794 (tkishel)
  • (FM-6239) rewrite of test following std patterns #793 (tphoney)
  • (MODULES-4908) adds support for sensitive data type to pw_hash #791 (eputnam)
  • (MODULES-5187) mysnc puppet 5 and ruby 2.4 #790 (eputnam)
  • (MODULES-5186) - do not run file_line unit tests on windows. #789 (tphoney)
  • (MODULES-5003) file_line fix all broken lines #788 (tphoney)
  • (FACT-932) Add new function, fact() #787 (reidmv)
  • (MODULES-5113) Make line support Sensitive #786 (reidmv)
  • (MODULES-5144) Prep for puppet 5 #784 (hunner)
  • Fix headers in CHANGELOG.md so that headers render correctly #783 (davewongillies)
  • 4.17.1 Release Mergeback #782 (HelenCampbell)
  • (maint) Stdlib::Compat::Integer accepts numbers with newlines apparently #756 (hunner)
  • Add validate_domain_name function #753 (frapex)
  • Add a round function to complement ceiling and floor #748 (npwalker)
  • Add new file_line option append_on_no_match #717 (ripclawffb)
  • (Modules 4377) Causes ensure_packages to accept concurrent declarations with ensure => 'present' and 'installed' #716 (EmersonPrado)

4.17.1 - 2017-06-16

Full Changelog

Other

4.17.0 - 2017-05-10

Full Changelog

Other

4.16.0 - 2017-03-21

Full Changelog

Other

  • Release prep for 4.16.0 #742 (HelenCampbell)
  • (FM-6051) Adds comments to warn for UTF8 incompatibility #741 (HelenCampbell)
  • Permit double slash in absolute/Unix path types #740 (domcleal)
  • Release mergeback for 4.15.0 #739 (HelenCampbell)
  • (MODULES-4528) Use versioncmp to check Puppet version for 4.10.x compat #737 (domcleal)
  • Addition of new length function #736 (HelenCampbell)
  • Should only try to apply the resource if it not defined #735 (elmobp)
  • (FM-6086) - Unit tests for Resource Types #734 (pmcmaw)
  • (FM-6085) - Unit tests for Data Types #733 (pmcmaw)
  • (FM-6063) - Unit tests for high effort functions #732 (pmcmaw)
  • (MODULES-4485) Improve ipv6 support for type #731 (petems)
  • (MODULES-4473) join strings for i18n parser #729 (eputnam)
  • loosen the regex for tuple checking #728 (tphoney)
  • (FM-6058) - Unit tests for med effort functions #727 (pmcmaw)
  • (#FM-6068) allow file encoding to be specified #726 (GeoffWilliams)
  • (FM-6054) - Unit tests for low effort functions #725 (pmcmaw)
  • Modules 4429 unit tests #724 (pmcmaw)
  • remove unsupported platforms and future parser #723 (tphoney)
  • Fix acceptance test failure "Hiera is not a class" #720 (DavidS)
  • Allow test module metadata.json to be read #719 (domcleal)
  • Fix unsupported data type error with rspec-puppet master #715 (domcleal)
  • (FM-6019) - i18N tests for Spike #714 (pmcmaw)
  • (MODULES-4098) Sync the rest of the files #712 (hunner)

4.15.0 - 2017-01-20

Full Changelog

Added

  • (MODULES-4188) Add UUID generation function #700 (petems)

Other

4.14.0 - 2016-12-12

Full Changelog

Other

4.13.1 - 2016-10-13

Full Changelog

Other

  • (MODULES-3969) Update getvar to work on ruby 1.8.7 #674 (DavidS)
  • (MODULES-3962) Rework v4 function shims to work on puppet 3.7 and 4.0.0 #673 (DavidS)
  • (MODULES-3961) emit more deprecation warnings #672 (DavidS)
  • Mergeback #671 (DavidS)

4.13.0 - 2016-10-11

Full Changelog

Other

4.12.0 - 2016-05-03

Full Changelog

Other

4.11.0 - 2016-01-11

Full Changelog

Added

Other

4.10.0 - 2015-12-15

Full Changelog

Other

4.9.1 - 2015-12-04

Full Changelog

Other

4.9.0 - 2015-09-08

Full Changelog

Other

  • [MAINT] Improve 'try_get_value' readme #519 (dmitryilyin)
  • (MAINT) fix up try_get_value acceptance test #517 (DavidS)
  • Ticket/MODULES-2478 Make root_home fact work on AIX using native lsuser command #515 (jfautley)
  • Adds a convert_base function, which can convert numbers between bases #514 (DavidS)
  • Add a new function "try_get_value" #513 (dmitryilyin)
  • Consistent Readme #512 (Jetroid)
  • (MAINT) improve base64 unit tests #510 (DavidS)
  • (MODULES-2456) Modify union to accept more than two arrays #507 (Jetroid)
  • (MODULES-2410) Add new functions dos2unix and unix2dos #505 (gibbsoft)
  • Mergeback 4.8.x #503 (hunner)
  • [MODULES-2370] allow match parameter to influence ensure => absent behavior. #499 ()

4.8.0 - 2015-08-12

Full Changelog

Added

Other

4.7.0 - 2015-07-23

Full Changelog

Fixed

  • Check if file exists before loading with loadyaml. If not, return nil #314 (amateo)

Other

  • disable pw_hash test on sles, as it only supports md5 #490 (hunner)
  • adding support for hash in the size function #489 (gcmalloc)
  • (maint) Fix test to not assume is_pe fact on > 4.0.0 puppet #488 (cyberious)
  • Fix documentation error in upcase #487 (liv3d)
  • Clarify that third argument to ensure_resource() is a hash #485 (ghoneycutt)
  • Use puppet_install_helper #484 (underscorgan)
  • Add validate_slength's optional 3rd arg to README #482 (DavidS)
  • prep work for 4.7.0 #481 (tphoney)
  • catch and rescue from looking up non-existent facts #479 (mklette)
  • Add support for Solaris 12 #478 (drewfisher314)
  • AIO uses puppet 4 so should return true for is_future_parser_enabled #477 (underscorgan)
  • Document puppet 4 compatability in 4.6 #475 (DavidS)
  • (maint) getvar: update spec to match implementation #474 (DavidS)
  • (maint) update PUPPET_VERSION default to be 3.8.1 #472 (justinstoller)
  • Updated travisci file to remove allow_failures on Puppet4 #471 (jonnytdevops)
  • Also catch :undefined_variable as thrown by future parser #470 (bobtfish)
  • Fix time() on 1.8.7 #469 (hunner)
  • Fix spelling of camelcase #468 (kylog)
  • Gemfile: specify minimum rspec-puppet version #467 (DavidS)
  • Improve fqdn_rotate/fqdn_rand_string acceptance tests #466 (elyscape)
  • simplify mac address regex #465 (igalic)
  • (MODULES-1882) convert function tests to rspec-puppet #464 (DavidS)
  • (MODULES-2071) Patch file_line provider to use multiple with after #463 (rmaika)
  • fqdn_rotate: Don't use the value itself as part of the random seed #462 (elyscape)
  • validate_integer, validate_numeric: explicitely reject hashes in arrays #461 (DavidS)
  • fqdn_rotate: reset srand seed correctly on old ruby versions #460 (DavidS)
  • Update CHANGELOG.md #458 (ghoneycutt)
  • DOC-1504: Readme edits #456 (jtappa)
  • Remove all the pops stuff #455 (hunner)
  • (FM-2130) Document new location of facts.d cache #454 (elyscape)
  • sync via modulesync #449 (underscorgan)
  • range(): fix TypeError(can't convert nil into Integer) when using range ... #448 (DavidS)
  • Restore removed functionality to range() #447 (elyscape)
  • Fix pw_hash() on JRuby < 1.7.17 #446 (elyscape)
  • Prep work for new specs #443 (DavidS)
  • uses include type class declaration #441 (mrzarquon)
  • fqdn_rand_string: fix argument error message #440 (DavidS)
  • 4.6.x #439 (hunner)

4.6.0 - 2015-04-15

Full Changelog

Added

Fixed

  • (MODULES-1670) Do not match dotted-quad IP address as domain name #404 (roderickm)

Other

4.5.1 - 2015-01-14

Full Changelog

Other

4.5.0 - 2014-12-16

Full Changelog

Other