El jueves, 2 de octubre de 2014 10:51:58 UTC-4, Christopher Wood escribió: > > On Thu, Oct 02, 2014 at 07:18:24AM -0700, Ciro Iriarte wrote: > > 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 > > I've never used the '::' construct on the command line so I couldn't say > what the behaviour is supposed to be. I keep my version of 'site' in an ENC > besides; I've also not tried looking up the next hiera level in a higher > one. > > > That doesn't give much info, I have only one backend. Should the "site" parameter/variable "glue" the node to the snmplocation parameter/variable?
[root@admin ]# hiera -d snmplocation ::fqdn=testhost.domain.com DEBUG: Thu Oct 02 13:08:35 -0400 2014: Hiera YAML backend starting DEBUG: Thu Oct 02 13:08:35 -0400 2014: Looking up snmplocation in YAML backend DEBUG: Thu Oct 02 13:08:35 -0400 2014: Looking for data source defaults DEBUG: Thu Oct 02 13:08:35 -0400 2014: Looking for data source nodes/ testhost.domain.com DEBUG: Thu Oct 02 13:08:35 -0400 2014: Looking for data source global nil -- 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/8fb78dad-711a-44fe-a1cb-ebb62f905e72%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.