Puppet Class: puppet_enterprise::profile::agent
- Inherits:
- puppet_enterprise
- Defined in:
- manifests/profile/agent.pp
Overview
This class sets up the agent. For more information, see the [README.md](./README.md)
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 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'manifests/profile/agent.pp', line 4
class puppet_enterprise::profile::agent(
Boolean $manage_symlinks = $puppet_enterprise::manage_symlinks,
Boolean $pxp_enabled = true,
String $pcp_broker_host = $puppet_enterprise::pcp_broker_host,
Integer $pcp_broker_port = $puppet_enterprise::pcp_broker_port,
) inherits puppet_enterprise {
$platform_symlink_target = '/usr/local/bin'
$pe_bin_location = '/opt/puppetlabs/bin'
File {
owner => undef,
group => undef,
mode => undef,
}
if $manage_symlinks {
File <| tag == 'pe-agent-symlinks' |>
}
# contents of puppet_enterprise/manifests/symlinks.pp
#
# since the real agent.pp file just includes puppet_enterprise::symlinks
# instead of declaring it, it will get a default value for the
# manage_symlinks variable from the base puppet_enterprise class instead of
# the one passed in to *this* class - urgh/LOL
if $::platform_symlink_writable and $puppet_enterprise::manage_symlinks {
@file { [ '/usr/local', $platform_symlink_target ]:
ensure => 'directory',
replace => false,
tag => ['pe-agent-symlinks', 'pe-mco-symlinks', 'pe-master-symlinks'],
}
@file { "${platform_symlink_target}/facter":
ensure => 'link',
target => "${pe_bin_location}/facter",
tag => 'pe-agent-symlinks',
require => File[$platform_symlink_target],
}
@file { "${platform_symlink_target}/puppet":
ensure => 'link',
target => "${pe_bin_location}/puppet",
tag => 'pe-agent-symlinks',
require => File[$platform_symlink_target],
}
@file { "${platform_symlink_target}/pe-man":
ensure => 'link',
target => "${pe_bin_location}/pe-man",
tag => 'pe-agent-symlinks',
require => File[$platform_symlink_target],
}
@file { "${platform_symlink_target}/hiera":
ensure => 'link',
target => "${pe_bin_location}/hiera",
tag => 'pe-agent-symlinks',
require => File[$platform_symlink_target],
}
@file { "${platform_symlink_target}/mco":
ensure => 'link',
target => "${pe_bin_location}/mco",
tag => 'pe-mco-symlinks',
require => File[$platform_symlink_target],
}
@file { "${platform_symlink_target}/r10k":
ensure => 'link',
target => "${pe_bin_location}/r10k",
tag => 'pe-master-symlinks',
require => File[$platform_symlink_target],
}
}
}
|