On Monday, August 27, 2012 2:29:10 PM UTC-5, Bruce wrote:
Hi,
I have several large lists of nodes which have very dissimilar (almost random) hostnames, but the exact same puppet definitions. Is it possible to define them in arrays, and then do something like
node $array_of_nodes {
include foo
include bar
}
node $array_of_nodes2 {
include woz
}
Is this sort of thing possible? If not, what's the best method to do this?
As far as I know, node declarations cannot take node names from variables. You can do this, however, which is much better than duplicating the node definition:
node 'node1',
'node2',
'node3' {
include foo
include bar
}
Alternatively, perhaps it would be useful to pull the lists out into an ENC.
John