My question is similar to How do I invoke one Capistrano task from another?
The extra thing I want is being able to pass parameters to bar when calling it from foo:
task :foo do
# this calls bar, I would like to pass params (i.e n = 10)
# as if I were calling cap bar -s n=10
# bar does not take arguments
bar
end
task :bar do
if exists?(:n)
puts "n is: #{n}"
end
end