Commit f7107a02 authored by Markus Frosch's avatar Markus Frosch 📣

For rubocop

parent 07d5b15d
......@@ -16,22 +16,22 @@ if domain == 'vagrant.icinga.org'
end
if hostname =~ /^icinga-test-(.+)$/
fragment = $1
fragment = Regexp.last_match(1)
if fragment =~ /^(\w+-\w+)-([a-z]+)(\d+)$/i
Facter.add(:icingatest_instance) do
setcode do
$1
Regexp.last_match(1)
end
end
Facter.add(:icingatest_role) do
setcode do
$2
Regexp.last_match(2)
end
end
Facter.add(:icingatest_hostno) do
setcode do
$3
Regexp.last_match(3)
end
end
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment