Puppet Class: pe_status_check::agent_status_enable

Defined in:
manifests/agent_status_enable.pp

Summary

Enables the execution of agent_status_check fact

Overview

Adding this class will enable the execution of the agent_status_check fact, This allows the fact to be targeted to a specific agent or group of agents

Examples:

include pe_status_check::agent_status_enable

Parameters:

  • agent_status_enabled (Boolean) (defaults to: true)

    Flag to enable or disable agent_status_check fact



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'manifests/agent_status_enable.pp', line 10

class pe_status_check::agent_status_enable (
Boolean $agent_status_enabled = true,
){
  $agent_status_enabled_file = $facts['os']['family'] ? {
    'windows' => "${facts['common_appdata']}/PuppetLabs/puppet/cache/state/status_check_enable",
    default   => '/opt/puppetlabs/puppet/cache/state/status_check_enable',
  }
$agent_status_enabled_file_ensure = $agent_status_enabled ? {
  true     => 'file',
  default => 'absent',
}
file { $agent_status_enabled_file:
  ensure => $agent_status_enabled_file_ensure,
  mode   => '0664',
}
}