puppet-infracloud/manifests/cacert.pp
Yolanda Robla Mota 93a562cb39 Parameterize certificates in infracloud
SSL cert path and command are different from Debian/Redhat.
So parameterize it to be able to reuse on different components.

Change-Id: I8c1332e36f9b6a288a5736bee2a7171476aab739
2016-08-25 10:00:36 +02:00

32 lines
775 B
Puppet

# adds infra cloud chain to trusted certs
class infracloud::cacert (
$cacert_content,
) {
include ::infracloud::params
file { $::infracloud::params::cert_path:
ensure => 'directory',
owner => 'root',
group => 'root',
mode => '0755',
}
file { "${::infracloud::params::cert_path}/openstack_infra_ca.crt":
ensure => present,
owner => 'root',
group => 'root',
mode => '0444',
content => $cacert_content,
replace => true,
require => File[$::infracloud::params::cert_path],
}
exec { 'update-ca-certificates':
command => $::infracloud::params::cert_command,
subscribe => [
File["${::infracloud::params::cert_path}/openstack_infra_ca.crt"],
],
refreshonly => true,
}
}