If you cannot formulate a regex, that is unfortunate. If the test.com
domain is sufficient for your needs, you should use
node /.*\.test\.com$/ { ... }
instead of devnode
(which makes little sense anyway, because it is only matched by agents whose unqualified names is "devnode").
If your fqdn
s are that chaotic, you may benefit from an ENC such as Foreman or the web interface of Puppet Enterprise after all. Such a classifier allows you to link classes to nodes flexibly. The hiera_include
function will make Hiera a simplistic ENC even.
An option that forgos the ENC idea is of course to enumerate your fqdn
s in nodes.pp
, perhaps introducing another inheritance layer.
node fqdn1.test.com inherits devnode { ... }
node fqdn2.test.com inherits devnode { ... }
...