mirror of
https://github.com/smallstep/certificates.git
synced 2024-11-09 13:10:36 +00:00
25 lines
707 B
Puppet
25 lines
707 B
Puppet
# step package configuration
|
|
class tls_server(
|
|
$version = false,
|
|
) {
|
|
if !$version {
|
|
fail("class ${name}: version cannot be empty")
|
|
}
|
|
|
|
file {
|
|
'/usr/local/lib/step/.step/secrets/provisioner_pupppet_pass': # Get this from Hiera.
|
|
ensure => file,
|
|
mode => '0644',
|
|
owner => 'step';
|
|
}
|
|
|
|
$step = "/opt/smallstep/bin/step"
|
|
$step_path = "/usr/local/lib/step/.step"
|
|
$secrets = "${step_path}/usr/local/lib/step/.step"
|
|
service { $name:
|
|
ensure => running,
|
|
start => "/usr/local/bin/tls_server --token $(${step} token foo.com --ca-url=ca.smallstep.com --root=${secrets}/root_ca.crt --password-file=${secrets}/intermediate_pass)",
|
|
provider => 'systemd',
|
|
}
|
|
}
|