Puppet Class: psick::puppet::postrun

Defined in:
manifests/puppet/postrun.pp

Overview

class psick::puppet::postrun This class manages the puppet.conf’s postrun_command configuration entry, end the content (or source) of the command itself

Parameters:

  • puppet_conf_path (String)
  • ensure (Psick::Ensure) (defaults to: present)
  • command (Optional[String]) (defaults to: undef)
  • source (Optional[String]) (defaults to: undef)
  • content (Optional[String]) (defaults to: undef)
  • template (Optional[String]) (defaults to: undef)
  • epp (Optional[String]) (defaults to: undef)
  • path (Optional[String]) (defaults to: undef)


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
31
32
33
34
35
36
37
38
39
40
41
42
# File 'manifests/puppet/postrun.pp', line 6

class psick::puppet::postrun (
  String $puppet_conf_path,
  Psick::Ensure $ensure      = present,
  Optional[String] $command  = undef,
  Optional[String] $source   = undef,
  Optional[String] $content  = undef,
  Optional[String] $template = undef,
  Optional[String] $epp      = undef,
  Optional[String] $path     = undef,
){

  $manage_content = tp_content($content, $template, $epp)

  File {
    owner => 'root',
    group => 'root',
    mode  => '0644',
  }
  Ini_setting {
    ensure  => $ensure,
    path    => $puppet_conf_path,
    section => 'agent',
    setting => 'postrun_command',
  }
  if $command {
    ini_setting { 'puppet_postrun_command':
      value  => $command,
    }
  }
  if $path {
    file { $path:
      content => $manage_content,
      source  => $source,
      mode    => '0755',
    }
  }
}