Puppet Function: mcollective::hash2config

Defined in:
functions/hash2config.pp
Function type:
Puppet Language

Overview

mcollective::hash2config(Hash $confighash)String

Generates configuration files for mcollective. Keys are sorted alphabetically: key = value

Parameters:

  • confighash (Hash)

Returns:

  • (String)


3
4
5
6
7
8
# File 'functions/hash2config.pp', line 3

function mcollective::hash2config(Hash $confighash) >> String {
  $result = $confighash.keys.sort.map |$key| {
    sprintf("%s = %s", $key, $confighash[$key])
  }
  ($result << []).join("\n")
}