Puppet Class: puppetmaster::ca_server

Defined in:
modules/puppetmaster/manifests/ca_server.pp

Overview

Parameters:

  • master (Any)
  • server_name (Any) (defaults to: 'puppet')
  • cert_secret_path (Any) (defaults to: 'puppetmaster')


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
# File 'modules/puppetmaster/manifests/ca_server.pp', line 16

class puppetmaster::ca_server(
    $master,
    $server_name = 'puppet',
    $cert_secret_path = 'puppetmaster',
){
    $ssldir = '/var/lib/puppet/server/ssl'

    file { "${ssldir}/certs/${server_name}.pem":
        content   => secret("${cert_secret_path}/${server_name}_pubkey.pem"),
        owner     => 'puppet',
        group     => 'puppet',
        mode      => '0640',
        before    => Httpd::Site[$server_name],
        show_diff => false,
    }

    file { "${ssldir}/private_keys/${server_name}.pem":
        content   => secret("${cert_secret_path}/${server_name}_privkey.pem"),
        owner     => 'puppet',
        group     => 'puppet',
        mode      => '0640',
        before    => Httpd::Site[$server_name],
        show_diff => false,
    }
}