Forge Home

hardening_stdlib

Shared functions for hardening modules

Hardening Framework

hardening

52,442 downloads

52,170 latest version

4.1 quality score

Version information

  • 0.1.2 (latest)
  • 0.1.1
  • 0.1.0
released May 16th 2014

Start using this module

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

Add this module to your Puppetfile:

mod 'hardening-hardening_stdlib', '0.1.2'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add hardening-hardening_stdlib
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install hardening-hardening_stdlib --version 0.1.2

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

hardening/hardening_stdlib — version 0.1.2 May 16th 2014

Hardening Stdlib (puppet)

Description

Shared functions for hardening modules.

Requirements

  • Puppet; nothing else

Usage

merge_hardening

Try to set a hardening parameter. The user still has the option to override it, which will result in a warning.

Parameters

merge_hardening( $original, $hardening, [ $name_of_parameter ] )

The $name_of_parameter is optional, but highly recommended to know which parameter results in a Warning.

For simple values:

# Only defined by hardening:
# $original_option = undef
# $hardening_option = "off"
# $merged_option = "off"
$merged_option = merge_hardening( $original_option, $hardening_option, "param <name>" )

# User override:
# $original_option = "on"
# $hardening_option = "off"
# $merged_option = "on" (emits a warning)
$merged_option = merge_hardening( $original_option, $hardening_option, "param <name>" )

For maps:

# Only defined by hardening:
# $original_option = { a: "on" }
# $hardening_option = { b: "off" }
# $merged_option = { a: "on", b: "off" }
$merged_option = merge_hardening( $original_option, $hardening_option, "map <name>" )

# User override:
# $original_option = { a: "on", b: "on" }
# $hardening_option = { b: "off" }
# $merged_option = { a: "on", b: "on" } (emits a warning)
$merged_option = merge_hardening( $original_option, $hardening_option, "map <name>" )

getparam

Taken from stdlib 4.2. You don't need to require this version of stdlib, but still get access to this function. See: stdlib v4.2 getparam description

Contributors + Kudos

...

License and Author

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.