I'm writing a puppet module for ocfs2
and making use of exported resources to populate the definitions of all the cluster nodes in the config file on each cluster. This all works well. The cluster class is simply ocfs::cluster
and the member class is ocfs::clustermember
However, in the cluster definition in the config file, I need to list the number of nodes that are in the cluster. However, I can't figure out a way of adding the size of the exported resource array into the template.
Essentially, I'd like to be able to do something like this in the template:
cluster:
name = <%= clustername %>
nodecount = <%= clustername %>
node_count = <%= @ocfs::cluster.length %>
Obviously this doesn't work, because ocfs::cluster
isn't an array.
Is this possible?