Get list of given variables in Capistrano 3
1 answer
I was looking for the same and found Capistrano::Configuration.env
.
namespace :dump do
task :env do
pp Capistrano::Configuration.env
end
end
This will allow you to view all the variables :set
by calling cap dump:env
.
Use fetch
to get values.
Retrieve Mention in Getting Started Guide
Quick edit: To get exactly what you're looking for, follow these steps:
all_variables = Capistrano::Configuration.env.instance_eval{ @config }
+3
source to share