Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

2.x DSL Configuration Roles Server

josegonzalez edited this page · 2 revisions


server(host, *roles, attributes={}) 



Like the role method, this is another way to associate a server with role. However, where as the role method takes a single role and associates (potentially) many servers with it, the server helper takes a single server and associates (potentially) many roles with it.

This is particularly handy if you are working in an environment with very few servers, and the servers fulfill multiple roles. (For example: deploying a web application to a single host, where the single host is both the web server, application server, and database server.)



This is the name of the host, and has the same syntax and semantics as an individual element of the *servers parameter to role.


This should be a list of symbols identifying the names of the roles to associate the server with. Typical role names are things like :app, :web, :db, or :mail; choose a name that makes sense for your configuration. If you use the same name in a subsequent server or role invocation, the second invocation will add to the prior one.


This has the same syntax and semantics as the attributes parameter of the role method. The same attributes will apply this server in every role referenced in this declaration. (Different servers, or the same server in a different declaration, will not reuse these attributes.)


server "", :web, :app, :db
Something went wrong with that request. Please try again.