1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00
capistrano/documentation/getting-started/user-input/index.markdown
2015-01-19 10:07:58 +00:00

496 B

title layout
User Input default

{% highlight ruby %} desc "Ask about breakfast" task :breakfast do ask(:breakfast, "pancakes") on roles(:all) do |h| execute "echo "$(whoami) wants #{fetch(:breakfast)} for breakfast!"" end end {% endhighlight %}

Perfect, who needs telephones.

When using ask to get user input, you can pass echo: false to prevent the input from being displayed:

{% highlight ruby %} ask(:database_password, "default", echo: false) {% endhighlight %}