Skip to content
Snippets Groups Projects
init.pp 1.18 KiB
Newer Older
Adam Lewenberg's avatar
Adam Lewenberg committed
#
#
# Possible parameters:
#
#  - which flavor of OpenLDAP package to install
#  - install sync scripts
#  - authentication methods
#  - support whois
#  - hosting model
#  - where do we store the LDAP databases and log files
#  - do we enable bundle remctl service?

Adam Lewenberg's avatar
Adam Lewenberg committed
class ldap (
  $hosting_model = 'traditional',
  #
  $auth_gssapi    = true,
  $auth_simple    = true,
  #
  $install_archive = undef,
  $install_distro  = undef,
Adam Lewenberg's avatar
Adam Lewenberg committed
){

  ## ERROR CHECKING ##
  if !($hosting_model in [ 'traditional', 'container' ]) {
      fail("Unknown hosting model ${hosting_model}")
  }
  ## Install apt files/packages(?) so we load the correct version of OpenLDAP.
  class { 'ldap::openldap_install':
  }

  ## Basic configuration: /etc/ldap/ldap.conf, /etc/default/slapd, et al.
  class { 'ldap::config':
    hosting_model => $hosting_model,
  }

  ## Install sync scripts (call from parent class instead)
  # include ldap::sync_scripts

  ## Install certificate
  ## TO DO

  ## Authentication methods (simple bind and GSSAPI)
  class { 'ldap::authentication':
    auth_gssapi => $auth_gssapi,
    auth_simple => $auth_simple,
  }

  if ($hosting_model == 'traditional') {
    class { 'ldap::traditional':
    }
  }

Adam Lewenberg's avatar
Adam Lewenberg committed
}