Skip to content
Snippets Groups Projects
Select Git revision
  • 2d1906b391362c507a842f36c78f3763e3245c71
  • master default protected
  • cleanup_fixtures
  • add-openvox
  • freebsd-14
  • remove-legacy-top-scope-syntax
  • rel430
  • tests
  • revert-363-augeas-module-cleanup
  • release-4.1.0
  • puppet8
  • relax-dependencies
  • rel400
  • mode
  • puppet7
  • release-3.1.0
  • freebsd13
  • freebsd11
  • stdlib
  • centos
  • fedora
  • v5.1.0
  • v5.0.0
  • v4.5.0
  • v4.4.0
  • v4.3.0
  • v4.2.1
  • v4.2.0
  • v4.1.0
  • v4.0.0
  • v3.1.0
  • v3.0.0
  • v2.0.0
  • 1.12.0
  • 1.11.0
  • 1.10.0
  • 1.9.0
  • 1.8.0
  • 1.7.0
  • 1.6.0
  • 1.5.0
41 results

ldap.pp

Blame
  • user avatar
    Romain Tartière authored and GitHub committed
    * Do not hardcode /etc/postfix
    
    In order to bring support for FreeBSD, do not use the hardcoded
    /etc/postfix path for the directory containing Postfix configuration:
    FreeBSD ports are installed with a /usr/local/ prefix (by default) so
    the configuration files on FreeBSD are stored in the
    /usr/local/etc/postfix directory.
    
    * Add support for FreeBSD
    
    * Make it possible to tune the "root" group
    
    FreeBSD does not have a "root" group.  The corresponding group is named
    "wheel".
    
    Allow to setup a custom "root_group", and adjust FreeBSD configuration
    to set it to "wheel".
    
    * Adjust the test suite so that it pass on FreeBSD
    
    * Do not depend on $postfix::* before including postfix
    
    Some resources parameters depend on the value of variable from the
    postfix class.  Ensure these values are substitued only after including
    postfix.
    
    * Move default values from hiera to init.pp
    
    These values are system-dependent, but this helps seeing the usual
    default value when genering references.
    
    * Move $manage_mailname parameter
    
    * Explicitely mark internal classes as private
    
    * Remove redundant postfix::params inclusion
    
    Co-authored-by: default avatarRaphaël Pinson <github+aem1eeshi1@raphink.net>
    
    Co-authored-by: default avatarRaphaël Pinson <github+aem1eeshi1@raphink.net>
    2d1906b3
    History
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    ldap.pp 993 B
    # == Class: postfix::ldap
    #
    # Configures postfix for use with LDAP.
    #
    # === Parameters
    #
    # === Requires
    #
    # - Class["postfix"]
    #
    # === Examples
    #
    # include postfix
    # include postfix::ldap
    #
    class postfix::ldap {
    
      assert_type(String, $postfix::ldap_base)
      assert_type(String, $postfix::ldap_host)
      assert_type(String, $postfix::ldap_options)
    
      if $::osfamily == 'Debian' {
        package {'postfix-ldap':
          before  => File["${postfix::confdir}/ldap-aliases.cf"],
        }
      }
    
      if ! $postfix::ldap_base {
        fail 'Missing $postfix::ldap_base !'
      }
    
      $ldap_host = $postfix::ldap_host ? {
        undef   => 'localhost',
        default => $postfix::ldap_host,
      }
      $ldap_base = $postfix::ldap_base
      $ldap_options = $postfix::ldap_options ? {
        undef   => '',
        default => $postfix::ldap_options,
      }
    
      file {"${postfix::confdir}/ldap-aliases.cf":
        ensure  => 'file',
        owner   => 'root',
        group   => 'postfix',
        content => template('postfix/postfix-ldap-aliases.cf.erb'),
      }
    }