Skip to content

Commit

Permalink
Merge pull request #145 from t0mmyt/namespace_cleanup
Browse files Browse the repository at this point in the history
Corrected namespaces on variables
  • Loading branch information
Morgan Haskel committed Jan 23, 2015
2 parents efc48ec + e90c5fc commit 3b2ca7f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion manifests/balancermember.pp
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@

# Template uses $ipaddresses, $server_name, $ports, $option
concat::fragment { "${listening_service}_balancermember_${name}":
order => "20-${listening_service}-01-${name}",
ensure => $ensure,
order => "20-${listening_service}-01-${name}",
target => '/etc/haproxy/haproxy.cfg',
content => template('haproxy/haproxy_balancermember.erb'),
}
Expand Down
8 changes: 4 additions & 4 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
content => template('haproxy/haproxy-base.cfg.erb'),
}

if $global_options['chroot'] {
file { $global_options['chroot']:
if $haproxy::global_options['chroot'] {
file { $haproxy::global_options['chroot']:
ensure => directory,
owner => $global_options['user'],
group => $global_options['group'],
owner => $haproxy::global_options['user'],
group => $haproxy::global_options['group'],
}
}
}
4 changes: 2 additions & 2 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
fail("Use of private class ${name} by ${caller_module_name}")
}

package { $package_name:
ensure => $_package_ensure,
package { $haproxy::package_name:
ensure => $haproxy::_package_ensure,
alias => 'haproxy',
}
}
12 changes: 6 additions & 6 deletions manifests/service.pp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Private class
class haproxy::service inherits haproxy {
if $caller_module_name != $module_name {
if $::caller_module_name != $::module_name {
fail("Use of private class ${name} by ${caller_module_name}")
}

if $_service_manage {
if $haproxy::_service_manage {
if ($::osfamily == 'Debian') {
file { '/etc/default/haproxy':
content => 'ENABLED=1',
Expand All @@ -13,16 +13,16 @@
}

service { 'haproxy':
ensure => $_service_ensure,
enable => $_service_ensure ? {
ensure => $haproxy::_service_ensure,
enable => $haproxy::_service_ensure ? {
'running' => true,
'stopped' => false,
default => $_service_ensure,
default => $haproxy::_service_ensure,
},
name => 'haproxy',
hasrestart => true,
hasstatus => true,
restart => $restart_command,
restart => $haproxy::restart_command,
}
}
}

0 comments on commit 3b2ca7f

Please sign in to comment.