Don't start riak if not needed
This commit is contained in:
parent
32b49e6c51
commit
3f68dc32dc
1 changed files with 17 additions and 9 deletions
|
@ -13,6 +13,7 @@
|
||||||
class rhizo_base::riak {
|
class rhizo_base::riak {
|
||||||
|
|
||||||
$vpn_ip_address = $rhizo_base::vpn_ip_address
|
$vpn_ip_address = $rhizo_base::vpn_ip_address
|
||||||
|
$riak_ip_address = $rhizo_base::riak_ip_address
|
||||||
|
|
||||||
include packagecloud
|
include packagecloud
|
||||||
|
|
||||||
|
@ -69,6 +70,8 @@ class rhizo_base::riak {
|
||||||
'storage_backend' => 'leveldb',
|
'storage_backend' => 'leveldb',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if $vpn_ip_address == $riak_ip_address {
|
||||||
file { '/etc/init.d/riak':
|
file { '/etc/init.d/riak':
|
||||||
ensure => file,
|
ensure => file,
|
||||||
owner => 'root',
|
owner => 'root',
|
||||||
|
@ -78,6 +81,11 @@ class rhizo_base::riak {
|
||||||
require => Class['::riak'],
|
require => Class['::riak'],
|
||||||
notify => Exec['insserv'],
|
notify => Exec['insserv'],
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
file { '/etc/init.d/riak':
|
||||||
|
ensure => absent,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
exec { 'insserv':
|
exec { 'insserv':
|
||||||
command => '/usr/lib/insserv/insserv',
|
command => '/usr/lib/insserv/insserv',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue