Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit 77d0d044 authored by Christophe TREMBLAY-GUILLOUX's avatar Christophe TREMBLAY-GUILLOUX
Browse files

-

parent 3df97673
Branches main
No related tags found
No related merge requests found
# Module CGX SYS, branche mars18_production
# Module Puppet SYS
......@@ -3,20 +3,20 @@ require 'facter'
# nom hote de la forme abc123def -> récupère abc
Facter.add(:groupname) do
setcode do
Facter.value(:hostname)[/^([^\d]*)(\d*)(.*)$/,1]
Facter.value(:hostname)[/^([^\d-]*)(\d|-)*(.*)$/,1]
end
end
# nom hote de la forme abc123def -> récupère 123
Facter.add(:groupversion) do
setcode do
Facter.value(:hostname)[/^([^\d]*)(\d*)(.*)$/,2]
Facter.value(:hostname)[/^([^\d-]*)(\d|-)*(.*)$/,2]
end
end
# nom hote de la forme abc123def -> récupère def
Facter.add(:clientid) do
setcode do
Facter.value(:hostname)[/^([^\d]*)(\d*)(.*)$/,3]
Facter.value(:hostname)[/^([^\d-]*)(\d|-)*(.*)$/,3]
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment