From cfb94ad4200889bc62ce7bf27b1d240a5e7ba9fe Mon Sep 17 00:00:00 2001 From: Yolanda Robla Date: Wed, 10 Feb 2016 14:36:38 +0100 Subject: [PATCH] Add class to deal with cacert on infra cloud Change-Id: Ic620bc03f49fe30e889767b63be3712a69901535 --- manifests/cacert.pp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 manifests/cacert.pp diff --git a/manifests/cacert.pp b/manifests/cacert.pp new file mode 100644 index 0000000..dc4c538 --- /dev/null +++ b/manifests/cacert.pp @@ -0,0 +1,21 @@ +# adds infra cloud chain to trusted certs +class infracloud::cacert ( + $cacert_content, +) { + file { '/usr/local/share/ca-certificates/openstack_infra_ca.crt': + ensure => present, + owner => 'root', + group => 'root', + mode => '0444', + content => $cacert_content, + replace => true, + } + + exec { 'update-ca-certificates': + command => '/usr/sbin/update-ca-certificates', + subscribe => [ + File['/usr/local/share/ca-certificates/openstack_infra_ca.crt'], + ], + refreshonly => true, + } +}