]> gitweb.fluxo.info Git - puppet-postfix.git/commitdiff
linted smtp_auth.pp
authorvarac <varacanero@zeromail.org>
Wed, 4 Mar 2015 08:24:55 +0000 (09:24 +0100)
committervarac <varacanero@zeromail.org>
Wed, 4 Mar 2015 08:24:55 +0000 (09:24 +0100)
manifests/smtp_auth.pp

index 191f234163402e26d723b14fd28de95d5112e4eb..ae6a9a5eaf49c553683f277a7804a7b84ee3f797 100644 (file)
@@ -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"],
-  }
-
 }