diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2018-06-22 11:22:05 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2018-06-22 11:22:05 -0300 |
commit | 0cbb1a80e4463d8e54bbd50a11593fb179ac67a5 (patch) | |
tree | c6ca9d17fb0e021c150ac257b470533df7028880 /manifests/subsystem | |
parent | 4d278db5b1ddf06e31cfbcba92da9fe0ca872505 (diff) | |
download | puppet-nodo-0cbb1a80e4463d8e54bbd50a11593fb179ac67a5.tar.gz puppet-nodo-0cbb1a80e4463d8e54bbd50a11593fb179ac67a5.tar.bz2 |
Add nodo::subsystem::mail::msmtp
Diffstat (limited to 'manifests/subsystem')
-rw-r--r-- | manifests/subsystem/mail.pp | 3 | ||||
-rw-r--r-- | manifests/subsystem/mail/msmtp.pp | 15 |
2 files changed, 18 insertions, 0 deletions
diff --git a/manifests/subsystem/mail.pp b/manifests/subsystem/mail.pp index 23ad865..d0773e9 100644 --- a/manifests/subsystem/mail.pp +++ b/manifests/subsystem/mail.pp @@ -2,6 +2,9 @@ class nodo::subsystem::mail { # Email delivery configuration $mail_delivery = hiera('nodo::subsystem::mail::delivery', 'exim') + # A handy SMTP wrapper + include nodo::subsystem::mail::msmtp + if $mail_delivery != 'postfix' { #if !defined(Package['mailx']) { package { 'mailx': diff --git a/manifests/subsystem/mail/msmtp.pp b/manifests/subsystem/mail/msmtp.pp new file mode 100644 index 0000000..11e6e3f --- /dev/null +++ b/manifests/subsystem/mail/msmtp.pp @@ -0,0 +1,15 @@ +class nodo::subsystem::mail::msmtp { + if !defined(Package['msmtp']) { + package { 'msmtp': + ensure => present, + } + } + + file { '/etc/msmtprc': + ensure => present, + owner => root, + group => root, + mode => '0644', + content => template('nodo/msmtp/msmtprc.erb'), + } +} |