/[adm]/puppet/modules/postfix/manifests/init.pp
ViewVC logotype

Diff of /puppet/modules/postfix/manifests/init.pp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2673 by misc, Sun Jan 22 23:57:57 2012 UTC revision 2674 by misc, Thu Mar 22 15:18:24 2012 UTC
# Line 1  Line 1 
1  class postfix {  class postfix {
2      class base {      package { ['postfix', 'nail']: }
         package { [postfix,nail]: }  
3    
4          service { postfix:      service { 'postfix':
5              subscribe => Package['postfix'],          subscribe => Package['postfix'],
         }  
   
         file { '/etc/postfix/main.cf':  
             require => Package["postfix"],  
             content => "",  
             notify => Service['postfix'],  
         }  
     }  
   
   
     class simple_relay inherits base {  
         File['/etc/postfix/main.cf'] {  
             content => template("postfix/simple_relay_main.cf"),  
         }  
     }  
   
     class smtp_server inherits base {  
         include postgrey  
         include amavis  
         include spamassassin  
   
         File['/etc/postfix/main.cf'] {  
             content => template("postfix/main.cf"),  
         }  
   
         file { '/etc/postfix/transport_regexp':  
             content => template("postfix/transport_regexp"),  
         }  
   
     }  
   
     class primary_smtp inherits smtp_server {  
   
         package { "postfix-ldap": }  
   
         # council is here until we fully decide who has aliases in com team,  
         # see https://bugs.mageia.org/show_bug.cgi?id=1345  
         # alumini is a special group for tracking previous members of  
         # the project, so they keep their aliases for a time  
         $aliases_group = ['mga-founders','mga-packagers',  
                           'mga-sysadmin','mga-council',  
                           'mga-alumni','mga-i18n-committers',  
                          ]          
         $ldap_password = extlookup("postfix_ldap",'x')  
         $ldap_servers = get_ldap_servers()  
   
         file {  
             '/etc/postfix/master.cf': content => template("postfix/primary_master.cf");  
             '/etc/postfix/ldap_aliases.conf': content => template("postfix/ldap_aliases.conf");  
             # TODO merge the file with the previous one, for common part (ldap, etc)  
             '/etc/postfix/group_aliases.conf': content => template("postfix/group_aliases.conf");  
             # TODO make it conditional to the presence of sympa  
             '/etc/postfix/sympa_aliases': content => template("postfix/sympa_aliases");  
             '/etc/postfix/virtual_aliases': content => template("postfix/virtual_aliases");  
         }  
   
         exec { "postmap /etc/postfix/virtual_aliases":  
             refreshonly => true,  
             subscribe => File['/etc/postfix/virtual_aliases'],  
         }  
6      }      }
7    
8      class secondary_smtp inherits smtp_server {      file { '/etc/postfix/main.cf':
9            require => Package['postfix'],
10            content => '',
11            notify  => Service['postfix'],
12      }      }
13  }  }

Legend:
Removed from v.2673  
changed lines
  Added in v.2674

  ViewVC Help
Powered by ViewVC 1.1.30