Hi all! I've been trying to work with classes in my templates, it seems like a really useful feature. I'm running on puppet .25.5 from EPEL and really wanted to start making use of the ability to pivot on classes that have been included in the catalog. It *seems* as though the templates are only cognecent of defined classes that precede the included module in the site.pp file. Is that the expected behavior? For my testing I used the example code on the wiki, and is included in the site_syslog module
<% classes.each do |klass| -%> # The class <%= klass %> is defined <% end -%> My node class as defined in site.pp the module. # Class for puppet development class site_dev { include ntp include sudo include dnsclient include site_ssh include site_ldap include site_krb5 include site_access include site_snmp include site_common include site_common::passwd include site_puppet::client include site_iptables::netmgt include site_tcpwrapper include site_nsr *include site_syslog* } With site_syslog module at the *end* of the class definition, it produced the output I expected: # The class site_dev is defined # The class site_dev is defined # The class ntp is defined # The class sudo is defined # The class dnsclient is defined # The class site_ssh is defined # The class site_ldap is defined # The class site_krb5 is defined # The class site_access is defined # The class site_snmp is defined # The class site_common is defined # The class site_common::passwd is defined # The class site_puppet is defined # The class site_puppet::client is defined # The class site_iptables is defined # The class site_iptables::netmgt is defined # The class site_tcpwrapper is defined # The class site_nsr is defined # The class site_syslog is defined *however* with the site_syslog module included higher in the list, I only get classes defined before the site_syslog module. class site_dev { include ntp include sudo include dnsclient *include site_syslog* include site_ssh include site_ldap include site_krb5 include site_access include site_snmp include site_common include site_common::passwd include site_puppet::client include site_iptables::netmgt include site_tcpwrapper include site_nsr } # The class site_dev is defined # The class site_dev is defined # The class ntp is defined # The class sudo is defined # The class dnsclient is defined # The class site_syslog is defined This may be my misunderstanding but from the docs, it seems as though I should see the first example regardless of where I include the template code... Thanks for all the help! -Confused in template land -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@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.