Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,18 @@ Integer. Port on `relayhost` emails should be sent to

Default: 25

##### `mail_encryption`

String. Encryption to be used.

Default: not defined (backup currently defaults to `:starttls`.

##### `mail_domain`

String. Your host name for the HELO command.

Default: none.

##### `enable_hc`

Boolean. Whether backup job noticies should be sent to HipChat
Expand Down
6 changes: 4 additions & 2 deletions manifests/job.pp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@
$email_to = undef,
$relay_host = 'localhost',
$relay_port = '25',
$mail_domain = undef,
$mail_encryption = undef,
# Hipchat
$enable_hc = false,
$hc_success = false,
Expand Down Expand Up @@ -228,8 +230,6 @@

if !$email_to {
fail("[Backup::Job::${name}]: A destination email address is required for email notifications")
} else {
validate_re($email_to, '^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$', "[Backup::Job::${name}]: ${email_to} is not a valid email address")
}

if $relay_port and !is_integer($relay_port) {
Expand Down Expand Up @@ -415,6 +415,8 @@
# - $email_to
# - $relay_host
# - $relay_port
# - $mail_domain
# - $mail_encryption
concat::fragment { "${_name}_email":
target => "/etc/backup/models/${_name}.rb",
content => template('backup/job/email.erb'),
Expand Down
2 changes: 1 addition & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
}
'Debian': {
$package_dependencies = ['ruby-dev', 'libxslt1-dev', 'libxml2-dev', 'g++', 'patch']
$package_dependencies = ['ruby-dev', 'libxslt1-dev', 'libxml2-dev', 'g++', 'patch', 'zlib1g-dev']
if $::lsbmajordistrelease {
$releaseversion = $::lsbmajordistrelease
}
Expand Down
6 changes: 6 additions & 0 deletions templates/job/email.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,11 @@
<% end -%>
<% if @relay_host -%>
mail.port = <%= @relay_port %>
<% end -%>
<% if @mail_domain -%>
mail.domain = "<%= @mail_domain %>"
<% end -%>
<% if @mail_encryption -%>
mail.encryption = <%= @mail_encryption %>
<% end -%>
end