On Tuesday, November 6, 2012 12:31:16 PM UTC-6, Vaidas Jablonskis wrote:
What I normally do is I create a virtual @package resource which installs
php5 for example within say "apache" class and then I realize the virtual
resource within the same "apache" class.

Please, if you intend to write generic and reusable modules so other
people can use, STOP putting hardcoded dependencies in your modules.

Either write in documentation that it depends on an abstract resource, for
instance a mysql database and make it configurable so you can pass db_name,
db_host, etc to your "apache" class. Or create virtual resources and
realize them within the same class - works great for packages and maybe
other resource types.
If only it were that easy. Cross-module dependencies are a particularly
tricky issue for all past and present Puppet versions. We have had some
interesting discussions on that topic here, with some possibly-useful ideas
arising from them, but none of that has made it into the codebase yet.

If you write all your own modules then you can probably keep the problem
under control, but if you rely on others' modules then you simply have to
be prepared to make local modifications to address compatibility problems.
Good module documentation is helpful for that, but there is no
documentation or coding practice that can solve the problem under the
current DSL.


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/-/FuNKiZK0t_kJ.
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.

Search Discussions

Discussion Posts


Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 2 | next ›
Discussion Overview
grouppuppet-users @
postedNov 6, '12 at 6:31p
activeNov 6, '12 at 8:41p

2 users in discussion

Vaidas Jablonskis: 1 post Jcbollinger: 1 post



site design / logo © 2022 Grokbase