-
Notifications
You must be signed in to change notification settings - Fork 183
/
preinstall.pp
33 lines (32 loc) · 1.06 KB
/
preinstall.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
# @summary Provides anything required by the install class, such as package
# repositories.
# @api private
class redis::preinstall {
if $redis::manage_repo {
if $facts['os']['family'] == 'RedHat' and versioncmp($facts['os']['release']['major'], '7') <= 0 {
if $redis::scl {
if $facts['os']['name'] == 'CentOS' {
ensure_packages(['centos-release-scl-rh'])
Package['centos-release-scl-rh'] -> Package[$redis::package_name]
}
} else {
require 'epel'
}
} elsif $facts['os']['name'] == 'Ubuntu' and $redis::ppa_repo {
contain 'apt'
apt::ppa { $redis::ppa_repo: }
} elsif $facts['os']['family'] == 'Debian' and $redis::redis_apt_repo {
include 'apt'
apt::source { 'redis':
location => $redis::apt_location,
release => $redis::apt_release,
repos => $redis::apt_repos,
key => {
id => $redis::apt_key_id,
server => $redis::apt_key_server,
key_options => $redis::apt_key_options,
},
}
}
}
}