summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Dittberner <jandd@cacert.org>2018-04-15 11:32:06 +0200
committerJan Dittberner <jandd@cacert.org>2018-04-15 11:32:06 +0200
commitf33b8fad50ba7cf24a71cdf4ca95fe22e528eb93 (patch)
treecfee4919d36d4e7f17e5396fdeaca89ba59142d7
parente43cad375255ca98f36e9f24ee7b5afaa46ae0be (diff)
downloadcacert-puppet-f33b8fad50ba7cf24a71cdf4ca95fe22e528eb93.tar.gz
cacert-puppet-f33b8fad50ba7cf24a71cdf4ca95fe22e528eb93.tar.xz
cacert-puppet-f33b8fad50ba7cf24a71cdf4ca95fe22e528eb93.zip
Manage mail alias for root
-rw-r--r--sitemodules/profiles/manifests/base.pp26
1 files changed, 17 insertions, 9 deletions
diff --git a/sitemodules/profiles/manifests/base.pp b/sitemodules/profiles/manifests/base.pp
index b4b3864..90c7470 100644
--- a/sitemodules/profiles/manifests/base.pp
+++ b/sitemodules/profiles/manifests/base.pp
@@ -12,6 +12,8 @@
#
# @param users a hash containing user information
#
+# @param rootalias alias that gets emails for root
+#
# Examples
# --------
#
@@ -31,8 +33,9 @@
# Copyright 2016-2018 Jan Dittberner
#
class profiles::base (
- Array[String] $admins = [],
+ Array[String] $admins = [],
Hash[String, Data] $users = {},
+ String $rootalias = "${certname}-admin@cacert.org",
) {
# ensure admin users for this container
$admins.each |String $username| {
@@ -54,7 +57,7 @@ class profiles::base (
managehome => true,
}
$user['ssh_keys'].each |Hash[String, Data] $keydata| {
- $keyname = $keydata['name']
+ $keyname = $keydata['name']
ssh_authorized_key { "${osusername}@${keyname}":
ensure => present,
user => $user['username'],
@@ -121,7 +124,7 @@ class profiles::base (
group => 'root',
mode => '0640',
content => epp('profiles/base/zshrc.epp',
- {'prompttemplate' => 'fire'}),
+ { 'prompttemplate' => 'fire' }),
}
file { '/etc/apt/sources.list':
@@ -131,20 +134,20 @@ class profiles::base (
mode => '0644',
content => epp(
'profiles/base/apt_sources.list.epp',
- {'oscodename' => $facts['os']['distro']['codename']}),
+ { 'oscodename' => $facts['os']['distro']['codename'] }),
require => Package['lsb-release'],
}
file { '/etc/apt/sources.list.d/puppetlabs-pc1.list':
ensure => absent,
}
file { '/etc/apt/sources.list.d/puppet5.list':
- ensure => file,
- owner => 'root',
- group => 'root',
- mode => '0644',
+ ensure => file,
+ owner => 'root',
+ group => 'root',
+ mode => '0644',
content => epp(
'profiles/base/apt_sources_puppet5.list.epp',
- {'oscodename' => $facts['os']['distro']['codename']}),
+ { 'oscodename' => $facts['os']['distro']['codename'] }),
require => Package['lsb-release'],
}
@@ -171,4 +174,9 @@ class profiles::base (
mode => '0755',
source => 'puppet:///modules/profiles/base/motd-puppet.sh',
}
+
+ mailalias { 'root':
+ ensure => present,
+ recipient => $rootalias,
+ }
}