On Mar 6, 11:39 am, Pablo Fernandez <pablo.fernan...@cscs.ch> wrote: > Dear all, > > I have observed a behavior that doesn't seem (to me) to match the > documentation. Specially, about tagging, the doc says: > > " > Automatic Tagging > All language statements enclosed in a node, define or class structure (read > more about puppet control structures [[Language Tutorial]] ) will > automatically be tagged with the name of that statement. These automatically- > applied tags will be inherited by any object enclosed in that class, > regardless of the depth of enclosure. > " > > But then I print the tags that are visible within each of the scopes: > > node 'ANY' {} > > node 'WN' inherits 'ANY' {} > > node 'wn01.domain' inherits 'WN' { > > } > > And inside each category I do: > $var = inline_template ("TAGS: <% tags.each do |tag| -%><%= tag %> <% end > -%>") > notify { "$var": } > To print the visible tags. > > And what I get is: > > notice: TAGS: node wn01.domain class > notice: TAGS: node wn class > notice: TAGS: node any class > > So, the tags are not inherited. Each node prints the tag that is declared in > its own node, but not those from the parent or the children. I have also tried > to do manual tags, and they are not inherited either. > > Am I doing something wrong, or is "tagging" not well documented?
Both, I think. The tagging documentation could be clearer, and probably it should avoid the word "inherited" because I think that may have misled you. On the other hand, I think your expectations are incorrect. It is "enclosed" objects that are documented to also get tagged, and I would not consider a node definition to be "enclosed by" another that inherits from it. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.