sunetdrive/functions/get_node_number.pp

5 lines
190 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_node_number() >> Integer {
2024-10-09 12:25:34 +00:00
Integer(regsubst($facts['networking']['fqdn'], /^[a-zA-Z\-]+(\d).*$/, '\\1'))
2023-02-13 09:44:56 +00:00
}