-
-
Notifications
You must be signed in to change notification settings - Fork 881
/
Copy pathpackage.pp
45 lines (42 loc) · 1.16 KB
/
package.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
# @summary Manage NGINX package installation
# @api private
class nginx::package {
$package_name = $nginx::package_name
$package_source = $nginx::package_source
$package_ensure = $nginx::package_ensure
$package_flavor = $nginx::package_flavor
$passenger_package_ensure = $nginx::passenger_package_ensure
$manage_repo = $nginx::manage_repo
assert_private()
case $facts['os']['family'] {
'redhat': {
contain nginx::package::redhat
}
'debian': {
contain nginx::package::debian
}
'Solaris': {
# $package_name needs to be specified. SFEnginx,CSWnginx depending on
# where you get it.
if $package_name == undef {
fail('You must supply a value for $package_name on Solaris')
}
package { 'nginx':
ensure => $package_ensure,
name => $package_name,
source => $package_source,
}
}
'OpenBSD': {
package { $package_name:
ensure => $package_ensure,
flavor => $package_flavor,
}
}
default: {
package { $package_name:
ensure => $package_ensure,
}
}
}
}