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