[Puppet Users] Re: Assigning a dynamic role to be used by hiera

2014-03-24 Thread JuanBrein
Today looking for a solution to this I came up with a nice solution. I know this is old but I'm posting it just in case is useful for somebody: on hiera.yaml: :hierarchy: - 'host/%{::domain}/%{::hostname}' - 'domain/%{::domain}' - 'role/%{system_role}' - 'common' on site.pp node defaul

[Puppet Users] Re: Assigning a dynamic role to be used by hiera

2013-08-21 Thread Ellison Marks
you might want to explicitly top-scope role, ie. $::role = 'nameserver' Not sure if that will matter in this case, but I don't think it can hurt. As an aside, we set our role variable with facter.d on the nodes themselves, as we don't have hostnames that easily work out to roles. On Wednesday,