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

5 lines
190 B
ObjectPascal

# Lets determin where we are by looking at the hostname
function sunetdrive::get_node_number() >> Integer {
Integer(regsubst($facts['networking']['fqdn'], /^[a-zA-Z\-]+(\d).*$/, '\\1'))
}