sunetdrive/functions/get_environment.pp

14 lines
314 B
ObjectPascal
Raw Permalink Normal View History

2023-02-13 09:44:56 +00:00
# Lets determin where we are by looking at the hostname
function sunetdrive::get_environment() >> String {
$hostname = $facts['fqdn']
if $hostname =~ /^.*\.drive\.sunet\.se$/ {
if $hostname =~ /^.*\.pilot\.drive\.sunet\.se$/ {
return 'pilot'
}
else {
return 'prod'
}
}
'test'
}