Hi,
I'm defining a class whose responsibility is to setup an application
folder, virtual host, init script and so forth for a rails
application. The class is defined as follows:
class rails($name, $environment)
## Include General Software
require nginx
require mysql
## Setup application directories
File { ["/home/$app", "/home/$app/app", "/home/$app/app/log", "/home/
$app/app/tmp"]:
ensure => directory
owner => "root"
group => "dev"
mode => 4755
}
## etc
}
Now, on our production servers, we have one application running, so we
do:
node "production.domain.com" {
class { rails: name => "application1", env => "production" }
}
This works fine, and sets up all the requirements for the application.
However, our staging server runs multiple applications, so I want to
do the following:
node "staging.domain.com" {
class { rails: name => "application1", env => "production" }
class { rails: name => "application2", env => "production" }
class { rails: name => "application3", env => "production" }
}
Obviously this complains about duplicate definitions of the rails
class, but the variables are different. How can I work around this? Or
what is a better way to implement what I'm trying to do? without
having to duplicate everything
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" 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-users?hl=en.