diff options
author | varac <varacanero@zeromail.org> | 2015-03-04 09:24:55 +0100 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2015-03-04 09:24:55 +0100 |
commit | 316dedeb142e05f75200f32636c11659f060626e (patch) | |
tree | 31710a37efdd9e02ccbe2c43517e95a2c31611cf | |
parent | 49f1024e1673c50c728d51a542c82b7a7cc4505b (diff) | |
download | puppet-postfix-316dedeb142e05f75200f32636c11659f060626e.tar.gz puppet-postfix-316dedeb142e05f75200f32636c11659f060626e.tar.bz2 |
linted smtp_auth.pp
-rw-r--r-- | manifests/smtp_auth.pp | 74 |
1 files changed, 35 insertions, 39 deletions
diff --git a/manifests/smtp_auth.pp b/manifests/smtp_auth.pp index 191f234..ae6a9a5 100644 --- a/manifests/smtp_auth.pp +++ b/manifests/smtp_auth.pp @@ -1,41 +1,37 @@ -/* -== Definition: postfix::smtp_auth - -Manages content of the /etc/postfix/smtp_auth map. - -Requires: -- Class["postfix"] -- Postfix::Hash["/etc/postfix/smtp_auth"] -- common::line (from module common) - -Example usage: - - node "toto.example.com" { - - include postfix - - postfix::hash { "/etc/postfix/smtp_auth": - ensure => present, - } - postfix::config { "smpt_auth_maps": - value => "hash:/etc/postfix/smtp_auth" - } - postfix::smtp_auth { "gmail.com": - ensure => present, - user => "USER", - password => "PW", - } +# == Definition: postfix::smtp_auth +# +# Manages content of the /etc/postfix/smtp_auth map. +# +# Requires: +# - Class["postfix"] +# - Postfix::Hash["/etc/postfix/smtp_auth"] +# - common::line (from module common) +# +# Example usage: +# +# node 'toto.example.com' { +# +# include postfix +# +# postfix::hash { '/etc/postfix/smtp_auth': +# ensure => present, +# } +# postfix::config { 'smpt_auth_maps': +# value => 'hash:/etc/postfix/smtp_auth' +# } +# postfix::smtp_auth { 'gmail.com': +# ensure => present, +# user => 'USER', +# password => 'PW', +# } +# } + +define postfix::smtp_auth ($user, $password, $ensure=present) { + line { $name: + ensure => $ensure, + file => '/etc/postfix/smtp_auth', + line => "${name} ${user}:${password}", + notify => Exec['generate /etc/postfix/smtp_auth.db'], + require => Package['postfix'], } -*/ - - -define postfix::smtp_auth ($ensure="present", $user, $password) { - line {"${name}": - ensure => $ensure, - file => "/etc/postfix/smtp_auth", - line => "${name} ${user}:${password}", - notify => Exec["generate /etc/postfix/smtp_auth.db"], - require => Package["postfix"], - } - } |