Add support for FreeBSD package installation

This commit is contained in:
Zach Leslie 2014-07-11 22:36:25 -07:00
parent 622c3906e2
commit f2a36f7a2f
3 changed files with 20 additions and 1 deletions

View file

@ -65,6 +65,14 @@ class nginx::package(
before => Anchor['nginx::package::end'],
}
}
'FreeBSD': {
class { 'nginx::package::freebsd':
package_name => $package_name,
package_ensure => $package_ensure,
require => Anchor['nginx::package::begin'],
before => Anchor['nginx::package::end'],
}
}
default: {
case $::operatingsystem {
'amazon': {

View file

@ -0,0 +1,12 @@
# Class: nginx::package::freebsd
#
# Manage the nginx package on FreeBSD
class nginx::package::freebsd (
$package_name = 'nginx',
$package_ensure = 'present'
) {
package { $package_name:
ensure => $package_ensure,
}
}

View file

@ -140,7 +140,6 @@ class nginx::params {
$nx_http_access_log = "${nx_logdir}/access.log"
# package name depends on distribution, e.g. for Debian nginx-full | nginx-light
$package_name = 'nginx'
$package_ensure = 'present'
$package_source = 'nginx'