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

Commit 231486b

Browse files
committed
Merge pull request #216 from tampakrap/tagmail
Add support for tagmail.conf
2 parents f96cc6e + a69bb31 commit 231486b

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',
@@ -132,4 +134,13 @@
132134
include puppetdb::master::config
133135
}
134136

137+
if ! empty($tagmail) {
138+
file { "${puppet::confdir}/tagmail.conf":
139+
ensure => file,
140+
owner => $puppet::user,
141+
group => $puppet::group,
142+
mode => '0644',
143+
content => template('profile/tagmail.conf.erb'),
144+
}
145+
}
135146
}

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)