sunetdrive/functions/get_environment.pp
2024-10-09 14:26:06 +02:00

14 lines
328 B
ObjectPascal

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