From c7529d826bee422abff222ffe4c2f48fe1039e92 Mon Sep 17 00:00:00 2001 From: Keith Whyte Date: Thu, 27 Jul 2023 18:36:05 +0200 Subject: [PATCH] Don't create unusable osmo-bsc config with bts-type unknown --- modules/rhizo_base/manifests/osmocom.pp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/rhizo_base/manifests/osmocom.pp b/modules/rhizo_base/manifests/osmocom.pp index e224460..2f51e5f 100644 --- a/modules/rhizo_base/manifests/osmocom.pp +++ b/modules/rhizo_base/manifests/osmocom.pp @@ -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':