Skip to content
This repository was archived by the owner on Mar 28, 2019. It is now read-only.

Commit a69bb31

Browse files
committed
Add support for tagmail.conf
1 parent 8d2997d commit a69bb31

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

manifests/server.pp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
$storeconfigs = undef,
5757
$stringify_facts = false,
5858
$package = $puppet::params::master_package,
59+
$tagmail = {}
5960
) inherits puppet::params {
6061

6162
validate_bool($ca)
@@ -64,6 +65,7 @@
6465
if $dns_alt_names { validate_array($dns_alt_names) }
6566
if $reports { validate_array($reports) }
6667
if $parser { validate_re($parser, ['custom', 'future']) }
68+
if $tagmail { validate_hash($tagmail) }
6769

6870
$service = $servertype ? {
6971
'passenger' => 'httpd',
@@ -139,4 +141,13 @@
139141
include puppetdb::master::config
140142
}
141143

144+
if ! empty($tagmail) {
145+
file { "${puppet::confdir}/tagmail.conf":
146+
ensure => file,
147+
owner => $puppet::user,
148+
group => $puppet::group,
149+
mode => '0644',
150+
content => template('profile/tagmail.conf.erb'),
151+
}
152+
}
142153
}

templates/tagmail.conf.erb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<% @tagmail.each_pair do |tags,destinations| -%>
2+
<%= tags %>: <%= destinations %>
3+
<% end -%>

0 commit comments

Comments
 (0)