Puppet Class: puppet::server::bootstrap::keys
- Inherits:
- puppet::params
- Defined in:
- manifests/server/bootstrap/keys.pp
Summary
Bootstrap eYAML keysOverview
Bootstrap eYAML keys from current directory into production environment This is intended to be run via ‘puppet apply` command
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 |
# File 'manifests/server/bootstrap/keys.pp', line 8
class puppet::server::bootstrap::keys inherits puppet::params {
require puppet::server::install
include puppet::server::keys
include puppet::server::bootstrap::globals
include puppet::server::bootstrap::setup
$eyaml_keys_path = $puppet::params::eyaml_keys_path
$eyaml_public_key = $puppet::params::eyaml_public_key
$eyaml_private_key = $puppet::params::eyaml_private_key
$cwd = $puppet::server::bootstrap::globals::cwd
exec {
default:
path => '/usr/bin:/bin',
require => [
File[$eyaml_keys_path],
Class['puppet::server::bootstrap::setup'],
],
cwd => $cwd,
;
"cp -a keys/public_key.pkcs7.pem ${eyaml_keys_path}/${eyaml_public_key}":
onlyif => 'test -f keys/public_key.pkcs7.pem',
creates => "${eyaml_keys_path}/${eyaml_public_key}",
before => File["${eyaml_keys_path}/${eyaml_public_key}"],
;
"cp -a keys/private_key.pkcs7.pem ${eyaml_keys_path}/${eyaml_private_key}":
onlyif => 'test -f keys/private_key.pkcs7.pem',
creates => "${eyaml_keys_path}/${eyaml_private_key}",
before => File["${eyaml_keys_path}/${eyaml_private_key}"],
;
}
Class['puppet::server::install'] -> Class['puppet::server::keys']
}
|