Commit f7107a02 authored by Markus Frosch's avatar Markus Frosch
Browse files

For rubocop

parent 07d5b15d
...@@ -16,22 +16,22 @@ if domain == 'vagrant.icinga.org' ...@@ -16,22 +16,22 @@ if domain == 'vagrant.icinga.org'
end end
if hostname =~ /^icinga-test-(.+)$/ if hostname =~ /^icinga-test-(.+)$/
fragment = $1 fragment = Regexp.last_match(1)
if fragment =~ /^(\w+-\w+)-([a-z]+)(\d+)$/i if fragment =~ /^(\w+-\w+)-([a-z]+)(\d+)$/i
Facter.add(:icingatest_instance) do Facter.add(:icingatest_instance) do
setcode do setcode do
$1 Regexp.last_match(1)
end end
end end
Facter.add(:icingatest_role) do Facter.add(:icingatest_role) do
setcode do setcode do
$2 Regexp.last_match(2)
end end
end end
Facter.add(:icingatest_hostno) do Facter.add(:icingatest_hostno) do
setcode do setcode do
$3 Regexp.last_match(3)
end end
end 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