install.pp 1.2 KB
Newer Older
1 2 3 4 5
#
# @summary Installs the packages needed for servers and clients
#
# @example
#   include freeipa::install
6
#
7
class freeipa::install {
8

9
  if ($facts['os']['family'] == 'RedHat') and ($freeipa::install_epel) {
10
    include epel
11 12
  }

13 14 15
  if $freeipa::manage_host_entry {
    host { $freeipa::ipa_server_fqdn:
      ip => $freeipa::ip_address,
16 17 18 19
    }
  }

  # Note: sssd.conf handled by ipa-server-install.
20 21
  if $freeipa::install_sssd {
    contain 'freeipa::install::sssd'
22 23
  }

24 25
  if $freeipa::install_autofs {
    contain 'freeipa::install::autofs'
26 27
  }

28 29
  if $freeipa::install_sssdtools {
    package { $freeipa::sssdtools_package_name:
30 31 32 33
      ensure => present,
    }
  }

34 35
  case $freeipa::ipa_role {
    'client': {
36 37 38
      if $freeipa::install_ipa_client {
        contain 'freeipa::install::client'
      }
39
    }
Scott Barthelemy's avatar
Scott Barthelemy committed
40
    'master', 'replica': {
41 42 43 44 45 46 47 48 49
      if $freeipa::final_configure_dns_server {
        $dns_packages = [
          'ipa-server-dns',
          'bind-dyndb-ldap',
        ]
        package{$dns_packages:
          ensure => present,
        }
      }
50

51 52
      if $freeipa::install_ipa_server {
        contain 'freeipa::install::server'
53
      }
54
    }
Scott Barthelemy's avatar
Scott Barthelemy committed
55 56 57
    default: {
      fail ("unexpected role ${freeipa::ipa_role}")
    }
58 59
  }

60
}