Install the service, and make sure we set ENABLED=1 in /etc/default/haproxy
This commit is contained in:
parent
649483cb7d
commit
34221826fb
|
@ -0,0 +1 @@
|
|||
ENABLED=1
|
|
@ -6,4 +6,20 @@ class haproxy {
|
|||
'haproxy' :
|
||||
ensure => present;
|
||||
}
|
||||
|
||||
service {
|
||||
'haproxy' :
|
||||
enable => true,
|
||||
hasrestart => true,
|
||||
hasstatus => true,
|
||||
ensure => running;
|
||||
}
|
||||
|
||||
file {
|
||||
'/etc/default/haproxy' :
|
||||
ensure => present,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
source => 'puppet:///modules/haproxy/haproxy.default.etc';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,5 +16,23 @@ describe 'haproxy' do
|
|||
'ensure' => 'present'
|
||||
)
|
||||
end
|
||||
|
||||
it 'should install the haproxy service' do
|
||||
subject.should contain_service('haproxy').with(
|
||||
'ensure' => 'running',
|
||||
'enable' => 'true',
|
||||
'hasrestart' => 'true',
|
||||
'hasstatus' => 'true'
|
||||
)
|
||||
end
|
||||
|
||||
it 'should install a new /etc/default/haproxy' do
|
||||
subject.should contain_file('/etc/default/haproxy').with(
|
||||
'ensure' => 'present',
|
||||
'owner' => 'root',
|
||||
'group' => 'root',
|
||||
'source' => 'puppet:///modules/haproxy/haproxy.default.etc'
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue