Thanks again for you reply, but it seems like you don't fully understand what I'm having problems with. So I'll try to clarify it a little more: 1. The current way of using two defines is working flawlessly. So I (at least partly) understand the concepts surrounding those. 2. Because I have two types of machines: some with just sugar and some with sugar and wordpress, I now use two defines that overlap in part (define1 contains all kinds of info about creating sugar db + unpacking tar, etc, while define2 contains all the sugar info of define1 + stuff about creating a wordpress db + unpacking wp tar, etc), this means editing two files when I change something in the sugar define. As this can lead to differing configurations because of editing errors (and always twice the work), I would like to be able to split the defines up, so I can call define1 (sugar) on all machines and define1 (sugar) and sefine 2 (wordpress) on the other machines. 3. Some of the variables are shared, for example the mysqld_pwd is used twice, and I add a different suffix for sugar and wordpress to get two databases. For the httpd-configuration, I specify a different template, which is easy to to with defines. So all instances have unique resources, hence the choice for defines, not classes.
Does this help you help me? On Thursday, November 1, 2012 3:27:10 PM UTC+1, Erwin Bogaard wrote: > > I'm having trouble getting the following scenario to work: > - I have two defines, for example 'sugar' and 'wordpress'. > - Some nodes need to have both applied, others only sugar. > - Because you can't use the same resource twice (not that I want to), I > can't figure out how to apply two separate defines to one resource > > At the moment I use the following workaround: I have two defines, one > with only sugar and one with both sugar and wordpress. As I have to change > both files if I change something for Sugar, this really isn't optimal. > Anyone a suggestion? > > -- 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/-/rPV6a-6SduwJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.