Am 29.01.2016 um 13:03 schrieb Gareth Humphries: > Any ideas?
Can you derive the role from the hostname? I do something similar to determine the location of a machine based on IP address range. So I have lib/facter/location.rb in one of my modules, with the following content: # Set location of a host by examining its IP address Facter.add(:location) do setcode do address = Facter.value(:ipaddress) case address when /^10\.11\.\d+\.\d+$/ 'Here' when /^10\.12\.\d+\.\d+$/ 'There' when /^10\.13\.\d+\.\d+$/ 'Somewhere Else' else 'Unknown Location' end end end You could derive the role fact from the hostname, if you name your machines after their purpose. HTH... Dirk -- *Dirk Heinrichs*, Senior Systems Engineer, Engineering Solutions *Recommind GmbH*, Von-Liebig-Straße 1, 53359 Rheinbach *Tel*: +49 2226 1596666 (Ansage) 1149 *Email*: d...@recommind.com <mailto:d...@recommind.com> *Skype*: dirk.heinrichs.recommind www.recommind.com <http://www.recommind.com> -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/56AB5A77.3020803%40recommind.com. For more options, visit https://groups.google.com/d/optout.