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?
Thanks in advance.
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/puppet-users/-/ttXYQDP16QIJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.
jcbollinger
2012-Aug-27 21:07 UTC
[Puppet Users] Re: Node definition against list in an array?
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 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/lsRGmq5AHmgJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.