For example in:
task :restart, :roles => :app, :except => { :no_release => true } do end
Looking at the handbook, it appears that you can pass the :no_release
attribute to the role
definition (commonly done for the web role). This indicates that the code should not be checked out on servers in that role.
So, I'm guessing that when a task specifies :except => { :no_release => true }
- it's saying "Skip this task on the servers (roles) that have :no_release
defined as true
."
role :app, "your app-server here" role :web, "your web-server here", :no_release => true role :db, "your db-server here", :primary => true
...
desc "restart passenger" task :restart, :except => { :no_release => true } do run "touch #{current_path}/tmp/restart.txt" end
In the above example, the restart operation should not run on the web server. Again, this is not tested... just going by my observations.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With