Don't create unusable osmo-bsc config with bts-type unknown

This commit is contained in:
Keith Whyte 2023-07-27 18:36:05 +02:00
parent 055a522b12
commit c7529d826b

View file

@ -109,7 +109,15 @@ class rhizo_base::osmocom::common {
}
unless hiera('rhizo::local_osmobsc_cfg') == "1" {
file { '/etc/osmocom/osmo-bsc.cfg':
if ($bts[0]['type'] == "unknown") {
file { '/etc/osmocom/osmo-bsc.cfg':
ensure => file,
content => template(
'rhizo_base/osmo-bsc-head.erb',
'rhizo_base/osmo-bsc-tail.erb'),
}
} else {
file { '/etc/osmocom/osmo-bsc.cfg':
ensure => file,
content => template(
'rhizo_base/osmo-bsc-head.erb',
@ -117,6 +125,7 @@ class rhizo_base::osmocom::common {
'rhizo_base/osmo-bsc-tail.erb'),
notify => Exec['notify-osmo-restart'],
}
}
}
file { '/etc/osmocom/stack':