runit: conditionally require class based on osmo_stack hiera
This commit is contained in:
parent
2ac7e16908
commit
63888df023
1 changed files with 9 additions and 2 deletions
|
@ -12,6 +12,8 @@
|
|||
#
|
||||
class rhizo_base::runit {
|
||||
|
||||
$osmo_stack = $rhizo_base::osmo_stack
|
||||
|
||||
file { '/lib/systemd/system/runit.service':
|
||||
ensure => present,
|
||||
source => 'puppet:///modules/rhizo_base/systemd/runit.service',
|
||||
|
@ -26,11 +28,16 @@ class rhizo_base::runit {
|
|||
require => Class['rhizo_base::packages'],
|
||||
}
|
||||
|
||||
$_req = $osmo_stack ? {
|
||||
'split' => File['/etc/sv'],
|
||||
'nitb' => [ File['/etc/sv'], Class['rhizo_base::openbsc'] ],
|
||||
default => [ File['/etc/sv'], Class['rhizo_base::openbsc'] ],
|
||||
}
|
||||
|
||||
file { '/etc/service/osmo-nitb':
|
||||
ensure => link,
|
||||
target => '/etc/sv/osmo-nitb',
|
||||
require =>
|
||||
[ File['/etc/sv'], Class['rhizo_base::openbsc'] ],
|
||||
require => $_req,
|
||||
}
|
||||
|
||||
if $operatingsystem != 'Debian' {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue