-
Notifications
You must be signed in to change notification settings - Fork 37
/
params.pp
37 lines (37 loc) · 1.13 KB
/
params.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
# @summary
# Class that contains OS specific parameters for other classes
class wireguard::params {
$config_dir_mode = '0700'
$config_dir_purge = false
$manage_package = true
$config_dir = '/etc/wireguard'
case $facts['os']['name'] {
'RedHat', 'CentOS', 'VirtuozzoLinux': {
$manage_repo = true
$package_name = ['wireguard-dkms', 'wireguard-tools']
$repo_url = 'https://copr.fedorainfracloud.org/coprs/jdoss/wireguard/repo/epel-7/jdoss-wireguard-epel-7.repo'
}
'Ubuntu': {
$manage_repo = false
$package_name = ['wireguard']
$repo_url = ''
}
'Debian': {
case $facts['os']['release']['major'] {
'11': {
$manage_repo = false
$package_name = ['wireguard']
$repo_url = ''
}
default: {
$manage_repo = true
$package_name = ['wireguard', 'wireguard-dkms', 'wireguard-tools']
$repo_url = 'http://deb.debian.org/debian/'
}
}
}
default: {
warning("Unsupported OS family, couldn't configure package automatically")
}
}
}