You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ngcpcfg/lib/get_mgmt_name

18 lines
452 B

[%
# vi: ft=tt2
# Returns the name of the management node calling this function.
#
# @return out The mgmt name (e.g. 'web01' or 'db01').
-%]
[% PERL -%]
my $filename = '/etc/ngcp_mgmt_node';
open my $hh, '<', $filename or die "Error opening $filename";
my $mgmt_name = <$hh>;
close $hh;
chomp $mgmt_name;
die "Fatal error retrieving mgmt_name [$mgmt_name]" unless length $mgmt_name;
$stash->set(out => $mgmt_name);
[% END -%]