- add vault module to puppetfile - define class to manage the install and config of vault - manage the datavol and raft storage - manage the unzip and other compression tools - define custom unseal script and service - add documentation on initial setup of vault
43 lines
1.2 KiB
Puppet
43 lines
1.2 KiB
Puppet
# profiles::pki::puppetcerts
|
|
class profiles::pki::puppetcerts {
|
|
|
|
# Define the directory
|
|
file { '/etc/pki/tls/puppet':
|
|
ensure => 'directory',
|
|
owner => 'root',
|
|
group => 'root',
|
|
mode => '0755',
|
|
}
|
|
|
|
# Copy the CA certificate
|
|
file { '/etc/pki/tls/puppet/ca.pem':
|
|
ensure => 'file',
|
|
owner => 'root',
|
|
group => 'root',
|
|
mode => '0644',
|
|
source => '/etc/puppetlabs/puppet/ssl/certs/ca.pem',
|
|
require => File['/etc/pki/tls/puppet'],
|
|
}
|
|
|
|
# Copy the private key
|
|
file { "/etc/pki/tls/puppet/${facts['networking']['fqdn']}.key":
|
|
ensure => 'file',
|
|
owner => 'root',
|
|
group => 'root',
|
|
mode => '0644',
|
|
source => "/etc/puppetlabs/puppet/ssl/private_keys/${facts['networking']['fqdn']}.pem",
|
|
require => File['/etc/pki/tls/puppet'],
|
|
}
|
|
|
|
# Copy the certificate
|
|
$cert = "/etc/puppetlabs/puppet/ssl/certs/${facts['networking']['fqdn']}.pem"
|
|
file { "/etc/pki/tls/puppet/${facts['networking']['fqdn']}.crt":
|
|
ensure => 'file',
|
|
owner => 'root',
|
|
group => 'root',
|
|
mode => '0644',
|
|
source => "/etc/puppetlabs/puppet/ssl/certs/${facts['networking']['fqdn']}.pem",
|
|
require => File['/etc/pki/tls/puppet'],
|
|
}
|
|
}
|