Issue #2408 has been updated by Sean Millichamp.
Nigel Kersten wrote:
> Although it's possible to put naked resources into site.pp at the top level,
> we've generally been moving away from that as a community towards
> classes/modules for everything, and this does modify that somewhat.
I'm aware of this direction, but I'm not convinced it reasonably covered all
use-cases. Maybe it does and I haven't been thinking about it the right way
but there are some cases where it feels like parameterized classes are awkward.
In our environment every server we deploy in Puppet has multiple network
interfaces (at least two, but variable in type and quantity) and we use Puppet
to deploy the network interfaces configurations. In this case, on RHEL so
/etc/sysconfig/network-scripts/ifcfg-ethX style files. In each node stanza we
use a definition to instantiate these network configs, something like:
intf::eth { 'eth0': ip => '192.168.1.10/24' }
intf::eth { 'eth1': ip => '10.2.2.2/24' }
In this case we could probably implement something via a hash, but sometimes
the definitions get quite a bit more complex, with entries for 802.1q tagged
VLAN interfaces, bonding interfaces, etc. Under the hood the defines make sure
the files get created from templates as needed and according to our best
practices.
We use similar definitions for iproute2 routes and rules.
Given that those resources are variable in type and quantity per-node it seems
like definitions at the node level is the most elegant way of handling it.
The lack of definition/resource support in ENCs are preventing our use of an
ENC and the changed scoping rules in 2.7 require us to use an ENC to implement
things we have working in 2.6. Right now we are stuck between these two
problems.
----------------------------------------
Feature #2408: It should be possible to assign a definition to a node in an
external nodes tool
https://projects.puppetlabs.com/issues/2408
Author: Pieter Barrezeele
Status: Needs More Information
Priority: High
Assignee:
Category:
Target version: Telly
Affected Puppet version: 0.24.8
Keywords:
Branch:
Until now, only classes/modules and parameters can be assigned to nodes in an
external nodes tool.
It would be very useful to be able to assign a definition, such as:
<pre>
node ws1 inherits webserver {
apache::vhost{"www.example.com"}
}
</pre>
to a node using yaml. The only other way to do now, seems to be writing wrapper
classes.
Thanks,
Pieter.
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.