Puppet Class: puppet::server::bootstrap
- Defined in:
- manifests/server/bootstrap.pp
Summary
Puppet server bootstrapOverview
Puppet server bootstrap This is intended to be run via ‘puppet apply` command
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 82 83 84 85 86 87 88 89 90 |
# File 'manifests/server/bootstrap.pp', line 33
class puppet::server::bootstrap (
Puppet::Platform $platform_name = 'puppet8',
Optional[Stdlib::Unixpath] $path = undef,
String $agent_version = 'latest',
Optional[String] $node_environment = undef,
Boolean $use_ssh = true,
) {
class { 'puppet::globals':
platform_name => $platform_name,
}
class { 'puppet::agent::install':
agent_version => $agent_version,
}
class { 'puppet::config':
node_environment => $node_environment,
# to avoid "Server Error: Could not find terminus puppetdb for indirection facts"
# as PuppetDB is not installed yet
use_puppetdb => false,
}
class { 'puppet::setup':
server_name => 'puppet',
server_ipaddress => '127.0.0.1',
}
include puppet::r10k::install
include puppet::server::bootstrap::globals
include puppet::server::bootstrap::setup
include puppet::server::bootstrap::keys
include puppet::server::bootstrap::hiera
include puppet::server::bootstrap::ssh
$access_data = $puppet::server::bootstrap::globals::access_data
$bootstrap_path = $puppet::server::bootstrap::globals::bootstrap_path
$cwd = $puppet::server::bootstrap::globals::cwd
if ($use_ssh and $access_data[0]) or ! $use_ssh {
class { 'puppet::r10k::run':
setup_on_each_run => true,
cwd => $cwd,
require => Class['puppet::server::bootstrap::ssh'],
}
}
class { 'puppet::server::ca::import':
import_path => "${bootstrap_path}/ca",
require => File["${bootstrap_path}/ca"],
}
class { 'puppet::service':
server_service_ensure => 'running',
server_service_enable => true,
}
Class['puppet::server::ca::import'] -> Class['puppet::service']
}
|