Forge Home

bodgitlib

Additional library of resources for Puppet modules.

108,080 downloads

6,334 latest version

4.3 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 3.0.3 (latest)
  • 3.0.2
  • 3.0.1
  • 3.0.0
  • 2.0.1
  • 2.0.0
  • 1.8.1
  • 1.8.0
  • 1.7.0
  • 1.6.0
  • 1.5.1
  • 1.5.0
  • 1.4.0
  • 1.3.1
  • 1.3.0
  • 1.2.0
  • 1.1.0
  • 1.0.0
released Jan 21st 2017
This version is compatible with:
  • Puppet Enterprise >=3.7.0 <2015.4.0
  • Puppet >=3.0.0 <5.0.0
  • , , , , , ,

Start using this module

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

Add this module to your Puppetfile:

mod 'bodgit-bodgitlib', '1.5.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add bodgit-bodgitlib
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install bodgit-bodgitlib --version 1.5.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

bodgit/bodgitlib — version 1.5.0 Jan 21st 2017

bodgitlib

Tested with Travis CI

Build Status Coverage Status Puppet Forge Dependency Status

Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with bodgitlib
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Limitations - OS compatibility, etc.
  7. Development - Guide for contributing to the module

Overview

This module is in a similar vein to the stdlib module, a library of resources for Puppet modules.

Module Description

This module provides a standard library of resources for the development of Puppet modules.

Setup

If you're still using Ruby 1.8.7 then you need to install the Oniguruma gem to get improved Regexp support. This only needs to be on the Puppetmaster or any standalone nodes. This could be as simple as gem install oniguruma or installing a package provided by your Operating System.

Usage

After you've installed bodgitlib, all of its functions are available for module use or development.

Reference

Functions

validate_base64

Validate a string or array of strings are correctly Base64 encoded.

validate_base64('Zm9v')
validate_base64(['YmFy', 'YmF6'])

validate_domain_name

Validate a string or array of strings are all valid domain names using is_domain_name.

validate_domain_name('example.com')
validate_domain_name(['example.com', 'example.org'])

validate_ip_address_array

Validate an array of IP addresses using validate_ip_address to do the heavy lifting.

validate_ip_address_array(['1.2.3.4', 'dead::beef'])

validate_ipv4_address_array

Validate an array of IPv4 addresses using validate_ipv4_address to do the heavy lifting.

validate_ipv4_address_array(['1.2.3.4', '5.6.7.8'])

validate_ipv6_address_array

Validate an array of IPv6 addresses using validate_ipv6_address to do the heavy lifting.

validate_ipv6_address_array(['dead::beef', 'feed::beef'])

validate_ldap_dn

Validate a string or array of strings are valid LDAP distinguished names.

validate_ldap_dn('dc=example,dc=com')
validate_ldap_dn(['dc=example, dc=com'])

validate_ldap_filter

Validate a string or array of strings are valid LDAP search filters.

validate_ldap_filter('(!(cn=Tim Howes))')
validate_ldap_filter(['(&(objectClass=Person)(|(sn=Jensen)(cn=Babs J*)))'])

validate_ldap_sub_dn

Validate a string or array of strings are valid LDAP distinguished names and that they are all either an exact match or a subtree of another given distinguished name.

validate_ldap_sub_dn('dc=example,dc=com', 'ou=groups,dc=example,dc=com')
validate_ldap_sub_dn('dc=example,dc=com', ['ou=people,dc=example,dc=com'])

validate_ldap_uri

Validate a string or array of strings are valid LDAP URI's. If there is a DN or filter passed then these are validated with validate_ldap_dn and validate_ldap_filter respectively.

validate_ldap_uri('ldap://example.com')
validate_ldap_uri(['ldapi://%2fsome%2fpath'])
validate_ldap_uri('ldap:///dc=example,dc=com?uidNumber?sub?(sn=e*)')

Limitations

This module has been built on and tested against Puppet 3.0 and higher.

The module should work pretty much anywhere as the custom functions are all pure Ruby.

Development

Please log issues or pull requests at github.