Rudder 3.2: Default group classes

If you've followed the latest Rudder's release note, you've noted in 3.2 changelog - amongst other nice stuff - this new feature:

  • Add CFEngine classes for each group of a node

Now in Rudder 3.2 you have this new display in the group page:
Display group classes

In this example you have two available CFengine classes that you can use in your mustache templates - Or actually anywhere you need to match them:

  • group_d57ff100_33c7_410f_82a5_a6098b6de321
  • group_test1

As the group name can change, you also have the possibility to use the group UUID.

I believe you've already read this nice post on Normation's blog about the usage of mustache templates with NCF.
Let's see an example with /etc/resolv.conf

{{vars.parameters.rudder_header}}
search domain.com
options timeout:1
options attempts:2
{{#classes.group_test1}}
nameserver 192.168.1.10
nameserver 192.168.1.11
{{/classes.group_test1}}
{{#classes.group_test2}}
nameserver 10.10.0.10
nameserver 10.10.0.11
{{/classes.group_test2}}

Group classes are already defined by Rudder now, it's just up to you to have them in your templates.

As usual, feel free to contact me if you have any question!