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 {
|
class rhizo_base::runit {
|
||||||
|
|
||||||
|
$osmo_stack = $rhizo_base::osmo_stack
|
||||||
|
|
||||||
file { '/lib/systemd/system/runit.service':
|
file { '/lib/systemd/system/runit.service':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
source => 'puppet:///modules/rhizo_base/systemd/runit.service',
|
source => 'puppet:///modules/rhizo_base/systemd/runit.service',
|
||||||
|
@ -26,11 +28,16 @@ class rhizo_base::runit {
|
||||||
require => Class['rhizo_base::packages'],
|
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':
|
file { '/etc/service/osmo-nitb':
|
||||||
ensure => link,
|
ensure => link,
|
||||||
target => '/etc/sv/osmo-nitb',
|
target => '/etc/sv/osmo-nitb',
|
||||||
require =>
|
require => $_req,
|
||||||
[ File['/etc/sv'], Class['rhizo_base::openbsc'] ],
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if $operatingsystem != 'Debian' {
|
if $operatingsystem != 'Debian' {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue