sunetdrive/functions/get_node_number.pp
2024-10-21 16:27:04 +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'))
}