added smtp_auth.pp
This commit is contained in:
parent
a9ec67ca02
commit
49f1024e16
1 changed files with 41 additions and 0 deletions
41
manifests/smtp_auth.pp
Normal file
41
manifests/smtp_auth.pp
Normal file
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
== 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 ($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"],
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue