I don't think Capistrano will create local variables for you, but you can do so yourself:
domain = "mydomain"
home = "/home/myuser"
set :domain, domain
set :home, home
set :deploy_to, "#{home}/#{domain}"
Alternatively, you can use fetch
, the counterpart to set
:
set :domain, "mydomain"
set :home, "/home/myuser"
set :deploy_to, "#{fetch(:home)}/#{fetch(:domain)}"