Puppet Class: puppet_agent::prepare
- Defined in:
-
manifests/prepare.pp
Summary
This class is called from puppet_agent to prepare for the upgrade.
Overview
4
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
31
32
33
34
35
36
37
38
39
40
|
# File 'manifests/prepare.pp', line 4
class puppet_agent::prepare (
Optional $package_version = undef
) {
include puppet_agent::params
$_windows_client = downcase($facts['os']['family']) == 'windows'
# Manage /opt/puppetlabs for platforms. This is done before both config and prepare because,
# on Windows, both can be in C:/ProgramData/Puppet Labs; doing it later creates a dependency
# cycle.
if !defined(File[$puppet_agent::params::local_puppet_dir]) {
file { $puppet_agent::params::local_puppet_dir:
ensure => directory,
}
}
$_osfamily_class = downcase("::puppet_agent::osfamily::${facts['os']['family']}")
# Manage deprecating configuration settings.
class { 'puppet_agent::prepare::puppet_config':
package_version => $package_version,
before => Class[$_osfamily_class],
}
contain puppet_agent::prepare::puppet_config
# PLATFORM SPECIFIC CONFIGURATION
# Break out the platform-specific configuration into subclasses, dependent on
# the osfamily of the client being configured.
case $facts['os']['family'] {
'redhat', 'debian', 'windows', 'solaris', 'aix', 'suse', 'darwin': {
contain $_osfamily_class
}
default: {
fail("puppet_agent not supported on ${facts['os']['family']}")
}
}
}
|