As I'm in over my head, let's supply you with (part of) the manifests in question:
The define:
define sugar::definitions_sug_wp (
$template = 'sugar/etc/httpd/conf.d/sugar6x.conf.erb',
$client_domain = "$title",
$mysql_rootpwd = "$mysql_password",
$mysql_dbname,
$mysql_pwd,
$sugar_admin,
$sugar_pwd,
) {
# This is for example to create the httpd.conf and the sugar-folder. So this has to be in both. As you can see, I parametrized the httpd-conf, so I can specify it in my class. Also, the ${client_domain}-variable is used throughout this define.
file {
"/etc/httpd/conf.d/sug-${client_domain}.conf":
content => template($template),
owner => 'root',
group => 'root',
mode => '0644',
notify => Service['httpd'];
"/var/log/sugar/${client_domain}":
ensure => 'directory';
}
# The following is specific to the WordPress-installation and doesn't need to be applied to every machine. So this part isn't in the define 'define sugar::definitions_sug'.
file {
# Configuratie van publieke html
"/var/www/html/${client_domain}":
owner => 'apache',
group => 'apache',
mode => '0744',
ensure => 'directory';
# Configuratiefile WordPress
"/var/www/html/${client_domain}/wp-config.php":
owner => 'apache',
group => 'apache',
mode => '0744',
require => File["/var/www/html/${client_domain}"],
content => template('sugar/wordpress/wp-config.php.erb');
I call both defines ('sugar::definitions_sug_wp' and 'define sugar::definitions_sug') in the following class:
class sugar::instances {
sugar::definitions_sug {
# SugarCRM - ECM2
'node1':
mysql_dbname => 'dbname1',
mysql_pwd => 'password1';
sugar::definitions_sug_wp {
'node2':
sugar_admin => 'text1',
sugar_pwd => 'password2',
mysql_dbname => 'dbname2',
mysql_pwd => 'password3';
I include this class on one node to get several sugar-only vhosts and several sugar+wordpress-nodes on that node.
Hope this helps you explain things to me!