]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
Switching postfix module to parametrized classes
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 25 Jan 2013 16:04:31 +0000 (14:04 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 25 Jan 2013 16:04:31 +0000 (14:04 -0200)
manifests/mail.pp
manifests/subsystems/monkeysphere.pp
manifests/subsystems/tunnel.pp

index dd9f670501af08cc7c78eeb7229d47b48447b29f..9a124c92e3de7016de8040c4c387b1eb9dccfcdc 100644 (file)
@@ -1,6 +1,3 @@
 class nodo::mail {
-  # Class inclusion
-  $root_mail_recipient = hiera('nodo::root_mail_recipient', 'nobody')
-  include nodo::vserver
-  include mail::system
+  class { [ 'nodo::vserver', 'mail::system' ]: }
 }
index 76530ca290d9a646b4490bc89a5c8642bf1bd471..b4b21e006dbeb06a66b360f70d4fb52955098848 100644 (file)
@@ -1,6 +1,6 @@
 define monkeysphere_host(
   $port           = hiera('nodo::monkeysphere_host::ssh_port', ''),
-  $mail_recipient = hiera('nodo::root_mail_recipient', 'nobody')
+  $mail_recipient = hiera('mail::root_mail_recipient', 'nobody')
 ) {
   include monkeysphere
 
index e7e0fe41a7ef8dcc54b7d86d76fa9fad8ea1273d..47384dfb81eceacf462f772150da6025edb0dbda 100644 (file)
@@ -21,7 +21,7 @@ class tunnel {
   # collect all resources from hosted tunnels
   Tunnel_server_realize <<| tag == "${::fqdn}" |>>
 
-  define setup($ensure = present, $user = $hostname, $host, $localport, $hostport, $sshport = '22', $keytype = 'rsa', $root_mail_recipient = hiera('nodo::root_mail_recipient', 'nobody')) {
+  define setup($ensure = present, $user = $hostname, $host, $localport, $hostport, $sshport = '22', $keytype = 'rsa', $root_mail_recipient = hiera('mail::root_mail_recipient', 'nobody')) {
     $dir     = "/var/backups/remote/${user}.${::domain}"
     $tag     = "backupninja-${::fqdn}"
     $ssh_dir = "${dir}/.ssh"