Defined Type: sslcert::ca

Defined in:
modules/sslcert/manifests/ca.pp

Overview

Parameters:

  • ensure (Any) (defaults to: present)
  • source (Any) (defaults to: undef)
  • content (Any) (defaults to: undef)


32
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
# File 'modules/sslcert/manifests/ca.pp', line 32

define sslcert::ca(
  $ensure=present,
  $source=undef,
  $content=undef,
) {
    include sslcert

    file { "/usr/local/share/ca-certificates/${title}.crt":
        ensure  => $ensure,
        owner   => 'root',
        group   => 'root',
        mode    => '0444',
        require => Package['ca-certificates'],
        notify  => Exec['update-ca-certificates'],
        source  => $source,
        content => $content,
    }

    if $ensure == 'absent' {
        # clean up manually -- update-ca-certificates leaves stale symlinks
        file { "/etc/ssl/certs/${title}.pem":
            ensure => $ensure,
            before => File["/usr/local/share/ca-certificates/${title}.crt"],
        }
    }
}