Revision 1b552f0e
Added by Michael Moll about 8 years ago
manifests/install.pp | ||
---|---|---|
# 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' }
|
||
case $::osfamily {
|
||
'Debian': { $package = 'foreman-sqlite3' }
|
||
default: { $package = 'foreman-sqlite' }
|
||
}
|
||
}
|
||
'postgresql': {
|
||
... | ... | |
|
||
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,
|
||
ensure => $::foreman::version,
|
||
}
|
||
}
|
||
|
Also available in: Unified diff
refactor out a top repo class
Closes GH-404