Puppet Class: hiera::params

Inherited by:
hiera
Defined in:
manifests/params.pp

Overview

Class: hiera::params

This class handles OS-specific configuration of the hiera module. It looks for variables in top scope (probably from an ENC such as Dashboard). If the variable doesn’t exist in top scope, it falls back to a hard coded default value.

Authors:

Mike Arnold <mike@razorsedge.org>

Copyright © 2013 Mike Arnold, unless otherwise noted.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'manifests/params.pp', line 16

class hiera::params {
  $confdir          = $settings::confdir
  $hiera_version    = '3'
  $hiera5_defaults  = { 'datadir' => 'data', 'data_hash' => 'yaml_data' }
  $package_ensure   = 'present'
  $package_name     = 'hiera'
  $hierarchy        = []
  $mode             = '0644'
  # Configure for AIO packaging.
  if $facts['pe_server_version'] {
    $master_service = 'pe-puppetserver'
    $provider       = 'puppetserver_gem'
    $owner          = 'root'
    $group          = 'root'
    $eyaml_owner    = 'pe-puppet'
    $eyaml_group    = 'pe-puppet'
  }
  else {
    # It would probably be better to assume this is puppetserver, but that
    # would be a backwards-incompatible change.
    $master_service = 'puppetmaster'
    $provider       = 'puppet_gem'
    $owner          = 'puppet'
    $group          = 'puppet'
    $eyaml_owner    = 'puppet'
    $eyaml_group    = 'puppet'
  }
  $cmdpath        = ['/opt/puppetlabs/puppet/bin', '/usr/bin', '/usr/local/bin']
  $datadir        = '/etc/puppetlabs/code/environments/%{environment}/hieradata'
  $manage_package = false
  $hiera_yaml = "${confdir}/hiera.yaml"
}