fixed calling out of scope variables
This commit is contained in:
parent
6ab27d00b1
commit
303efc634d
3 changed files with 19 additions and 5 deletions
|
@ -60,6 +60,9 @@ class nginx (
|
|||
include stdlib
|
||||
|
||||
class { 'nginx::package':
|
||||
package_name => $package_name,
|
||||
package_source => $package_source,
|
||||
package_ensure => $package_ensure,
|
||||
notify => Class['nginx::service'],
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,11 @@
|
|||
# Sample Usage:
|
||||
#
|
||||
# This class file is not called directly
|
||||
class nginx::package {
|
||||
class nginx::package(
|
||||
$package_name = 'nginx',
|
||||
$package_source = 'nginx',
|
||||
$package_ensure = 'present',
|
||||
) {
|
||||
anchor { 'nginx::package::begin': }
|
||||
anchor { 'nginx::package::end': }
|
||||
|
||||
|
@ -26,6 +30,9 @@ class nginx::package {
|
|||
}
|
||||
'debian': {
|
||||
class { 'nginx::package::debian':
|
||||
package_name => $package_name,
|
||||
package_source => $package_source,
|
||||
package_ensure => $package_ensure,
|
||||
require => Anchor['nginx::package::begin'],
|
||||
before => Anchor['nginx::package::end'],
|
||||
}
|
||||
|
|
|
@ -13,11 +13,15 @@
|
|||
# Sample Usage:
|
||||
#
|
||||
# This class file is not called directly
|
||||
class nginx::package::debian {
|
||||
class nginx::package::debian(
|
||||
$package_name = 'nginx',
|
||||
$package_source = 'nginx',
|
||||
$package_ensure = 'present'
|
||||
) {
|
||||
$distro = downcase($::operatingsystem)
|
||||
|
||||
package { $nginx::package_name:
|
||||
ensure => $nginx::package_ensure,
|
||||
package { $package_name:
|
||||
ensure => $package_ensure,
|
||||
require => Anchor['nginx::apt_repo'],
|
||||
}
|
||||
|
||||
|
@ -25,7 +29,7 @@ class nginx::package::debian {
|
|||
|
||||
include '::apt'
|
||||
|
||||
case $nginx::package_source {
|
||||
case $package_source {
|
||||
'nginx': {
|
||||
apt::source { 'nginx':
|
||||
location => "http://nginx.org/packages/${distro}",
|
||||
|
|
Loading…
Reference in a new issue