I have a hiera configuration that specifies the following hierarchy: :hierarchy: - "nodes/%{::fqdn}" - common In this example, let''s say I''m using the puppetlabs ntp module, which has a parameter called "servers". I have a list of NTP servers that I want to be used by all but one node. On one of my nodes (let''s call that node "agent1"), I want to use the default value for that servers parameter. If I specify that list of servers in common.yaml, it will be applied to all of the hosts (including on agent1). Is there something that I can put in nodes/agent1.yaml that will force it to use the default parameter value, while the other hosts use the servers that I specify in common.yaml? Is there a way to tell hiera "stop looking for this value", and prevent it from continuing through the hierarchy? Even better would be a way to tell it "stop looking for any value under ntp". Thanks, Marc -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Sounds to me that your hierarchy needs some rethinking. "What makes this node special?" "Is it common to other nodes now or in the future?" "Does an existing fact exist that can be used in the Hiera hierarchy?" If the serverlist is moved from common.yaml up the hierarchy, you''d be able to solve your issue. -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
On Tuesday, October 22, 2013 4:36:35 PM UTC-5, Marc Huffnagle wrote:> > I have a hiera configuration that specifies the following hierarchy: > > :hierarchy: > - "nodes/%{::fqdn}" > - common > > In this example, let''s say I''m using the puppetlabs ntp module, which has > a parameter called "servers". I have a list of NTP servers that I want to > be used by all but one node. On one of my nodes (let''s call that node > "agent1"), I want to use the default value for that servers parameter. > > If I specify that list of servers in common.yaml, it will be applied to > all of the hosts (including on agent1). Is there something that I can put > in nodes/agent1.yaml that will force it to use the default parameter value, > while the other hosts use the servers that I specify in common.yaml? Is > there a way to tell hiera "stop looking for this value", and prevent it > from continuing through the hierarchy? Even better would be a way to tell > it "stop looking for any value under ntp". > >No, there is no such feature at this time. I''m with William in finding your objective rather unintuitive. If you have an exceptional node, then the Hiera approach is to provide that node''s exceptional data in a per-node hierarchy level. I fail to see why it would be better to embed an "abort lookup" marker in place of the data than it would be to put the actual desired data in that same place. Alternatively, if you don''t want to provide any data at all for a given (node, tag) pair, then structure your hierarchy and data so that no data file that applies to the node in question associates any value with the given tag. John -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.