Puppet Class: psick::puppet::ci

Defined in:
manifests/puppet/ci.pp

Overview

Manages /etc/puppetlabs/ci.conf file, used by Puppet CI scripts under Psick’s control-repo bin directory This file contains the names of the node where to run specific Puppet CI steps.

Parameters:

  • ensure (String) (defaults to: 'present')
  • config_file_path (String) (defaults to: '/etc/puppetlabs/ci.conf')
  • template (Variant[Undef,String]) (defaults to: 'psick/puppet/ci/ci.conf.erb')
  • options (Hash) (defaults to: { })
  • default_nodes (Array) (defaults to: [])
  • always_nodes (Array) (defaults to: [])
  • manage (Boolean) (defaults to: $::psick::manage)
  • noop_manage (Boolean) (defaults to: $::psick::noop_manage)
  • noop_value (Boolean) (defaults to: $::psick::noop_value)


5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'manifests/puppet/ci.pp', line 5

class psick::puppet::ci (
  String                $ensure           = 'present',
  String                $config_file_path = '/etc/puppetlabs/ci.conf',
  Variant[Undef,String] $template         = 'psick/puppet/ci/ci.conf.erb',
  Hash                  $options          = { },
  Array                 $default_nodes    = [],
  Array                 $always_nodes     = [],
  Boolean $manage                  = $::psick::manage,
  Boolean $noop_manage             = $::psick::noop_manage,
  Boolean $noop_value              = $::psick::noop_value,
) {
  if $manage {
    if $noop_manage {
      noop($noop_value)
    }
    $options_default = {
      default_nodes => $default_nodes,
      always_nodes => $always_nodes,
    }
    $parameters = $options_default + $options
    file { $config_file_path:
      ensure  => $ensure ,
      content => template($template),
    }
  }
}