El viernes, 26 de septiembre de 2014 15:21:19 UTC-4, Christopher Wood escribió: > > In your place I'd add a level to my hiera setup and template the bird > config. > > There's a number of different options you could use to classify which node > is in which site, from the node yaml in hiera to an ENC to a fact > provisioned when the host is built. > > Trying the hiera route, I defined my configuration like this:
[root@admin ~]# cat /etc/hiera.yaml --- :backends: - yaml :hierarchy: - defaults - "%{clientcert}" - "nodes/%{::fqdn}" - "sites/%{site}" - global :yaml: :datadir: [root@admin ~]# cat /var/lib/hiera/nodes/testhost.domain.com.yaml --- site: 'citya' [root@admin ~]# cat /var/lib/hiera/sites/citya.yaml --- snmplocation: 'That City' ospf_area: '2000' And trying to query for ospf_area I get null/not defined answers. Shall this work?: [root@admin ~]# hiera -d site ::fqdn=testhost.domain.com citya [root@admin ~]# hiera -d ::site ::fqdn=testhost.domain.com nil [root@admin ~]# hiera snmplocation ::fqdn=testhost.domain.com nil [root@admin ~]# hiera ::snmplocation ::fqdn=testhost.domain.com nil Regards, Ciro -- 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/72270b95-4ae7-40bd-9c4b-9f2e002b2e03%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.