summaryrefslogtreecommitdiff
path: root/puppet/modules/x509/manifests/base.pp
diff options
context:
space:
mode:
authorMicah <micah@leap.se>2016-07-12 16:46:04 -0400
committerMicah <micah@leap.se>2016-07-12 16:46:04 -0400
commit95d95925e53ec98f3f5868479328a69449de3ca7 (patch)
tree008a31bbdd1967be862e502bdf77c0956d8733b1 /puppet/modules/x509/manifests/base.pp
parentd8ecd5d2f933c40f2413a58e6324558d0e689b6a (diff)
git subrepo clone https://leap.se/git/puppet_x509 puppet/modules/x509
subrepo: subdir: "puppet/modules/x509" merged: "19254a3" upstream: origin: "https://leap.se/git/puppet_x509" branch: "master" commit: "19254a3" git-subrepo: version: "0.3.0" origin: "https://github.com/ingydotnet/git-subrepo" commit: "1e79595" Change-Id: Ia024613b147d34a7b4c888818da08152a2fa63dc
Diffstat (limited to 'puppet/modules/x509/manifests/base.pp')
-rw-r--r--puppet/modules/x509/manifests/base.pp45
1 files changed, 45 insertions, 0 deletions
diff --git a/puppet/modules/x509/manifests/base.pp b/puppet/modules/x509/manifests/base.pp
new file mode 100644
index 00000000..b88cce64
--- /dev/null
+++ b/puppet/modules/x509/manifests/base.pp
@@ -0,0 +1,45 @@
+class x509::base {
+ include x509::variables
+
+ package { [ 'ssl-cert', 'ca-certificates' ]:
+ ensure => installed;
+ }
+
+ group { 'ssl-cert':
+ ensure => present,
+ system => true,
+ require => Package['ssl-cert'];
+ }
+
+ file {
+ $x509::variables::root:
+ ensure => directory,
+ mode => '0755',
+ owner => root,
+ group => root;
+
+ $x509::variables::keys:
+ ensure => directory,
+ mode => '0750',
+ owner => root,
+ group => ssl-cert;
+
+ $x509::variables::certs:
+ ensure => directory,
+ mode => '0755',
+ owner => root,
+ group => root;
+
+ $x509::variables::local_CAs:
+ ensure => directory,
+ mode => '2775',
+ owner => root,
+ group => root;
+ }
+
+ exec { 'update-ca-certificates':
+ command => '/usr/sbin/update-ca-certificates',
+ refreshonly => true,
+ subscribe => File[$x509::variables::local_CAs]
+ }
+}