diff options
Diffstat (limited to 'puppet/modules/x509/manifests/ca.pp')
m--------- | puppet/modules/x509 | 0 | ||||
-rw-r--r-- | puppet/modules/x509/manifests/ca.pp | 34 |
2 files changed, 34 insertions, 0 deletions
diff --git a/puppet/modules/x509 b/puppet/modules/x509 deleted file mode 160000 -Subproject 19254a38c1c372ae7912ea9f15500b9b1cbffe8 diff --git a/puppet/modules/x509/manifests/ca.pp b/puppet/modules/x509/manifests/ca.pp new file mode 100644 index 00000000..0e068cd3 --- /dev/null +++ b/puppet/modules/x509/manifests/ca.pp @@ -0,0 +1,34 @@ +define x509::ca ( + $content = 'absent', + $source = 'absent' +) { + include x509::variables + include x509::base + + file { "${x509::variables::local_CAs}/${name}.crt" : + ensure => file, + mode => '0444', + group => 'ssl-cert', + require => Package['ca-certificates'], + notify => Exec['update-ca-certificates'], + } + case $content { + 'absent': { + $real_source = $source ? { + 'absent' => [ + "puppet:///modules/site_x509/CAs/${::fqdn}/${name}.crt", + "puppet:///modules/site_x509/CAs/${name}.crt" + ], + default => "puppet:///$source", + } + File["${x509::variables::local_CAs}/${name}.crt"] { + source => $real_source + } + } + default: { + File["${x509::variables::local_CAs}/${name}.crt"] { + content => $content + } + } + } +} |