-
Notifications
You must be signed in to change notification settings - Fork 269
/
install.pp
72 lines (64 loc) · 1.95 KB
/
install.pp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Install the needed packages for foreman
class foreman::install {
if ! $::foreman::custom_repo {
foreman::install::repos { 'foreman':
repo => $::foreman::repo,
gpgcheck => $::foreman::gpgcheck,
}
}
class { '::foreman::install::repos::extra': }
$repo = $::foreman::custom_repo ? {
true => Class['foreman::install::repos::extra'],
default => [Class['foreman::install::repos::extra'], Foreman::Install::Repos['foreman']],
}
case $::foreman::db_type {
'sqlite': {
case $::operatingsystem {
'Debian','Ubuntu': { $package = 'foreman-sqlite3' }
default: { $package = 'foreman-sqlite' }
}
}
'postgresql': {
$package = 'foreman-postgresql'
}
'mysql': {
$package = 'foreman-mysql2'
}
}
package { $package:
ensure => $::foreman::version,
require => $repo,
}
if $::foreman::selinux or (str2bool($::selinux) and $::foreman::selinux != false) {
package { 'foreman-selinux':
ensure => $::foreman::version,
require => $repo,
}
}
if $::foreman::passenger and $::foreman::passenger_ruby_package {
package { $::foreman::passenger_ruby_package:
ensure => installed,
require => Class['apache'],
before => Class['apache::service'],
}
}
if $::foreman::ipa_authentication {
case $::osfamily {
'RedHat': {
# The apache::mod's need to be in install to break circular dependencies
::apache::mod { 'authnz_pam': package => 'mod_authnz_pam' }
::apache::mod { 'intercept_form_submit': package => 'mod_intercept_form_submit' }
::apache::mod { 'lookup_identity': package => 'mod_lookup_identity' }
include ::apache::mod::auth_kerb
}
default: {
fail("${::hostname}: ipa_authentication is not supported on osfamily ${::osfamily}")
}
}
if $::foreman::ipa_manage_sssd {
package { 'sssd-dbus':
ensure => installed,
}
}
}
}