Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove @ensured_* cache variables.

When running different run lists per role, @ensured_* variables are not refreshed, and for example, roundsman thinks it already created /tmp/roundsman, but that's not the case, since we're contacting a different host now. Since the ensure operations are quick and idempotent, no need to go extra mile just to skip them.
  • Loading branch information...
commit f8c8de1b9e3c9bef2def493da1bbe9c9a352a162 1 parent fe5eb08
@maxim authored
Showing with 4 additions and 10 deletions.
  1. +4 −10 lib/roundsman/capistrano.rb
View
14 lib/roundsman/capistrano.rb
@@ -75,11 +75,8 @@ def run(*args)
end
def ensure_roundsman_working_dir
- unless @ensured_roundsman_working_dir
- run "mkdir -p #{fetch(:roundsman_working_dir)}"
- sudo "chown -R #{fetch(:roundsman_user)} #{fetch(:roundsman_working_dir)}"
- @ensured_roundsman_working_dir = true
- end
+ run "mkdir -p #{fetch(:roundsman_working_dir)}"
+ sudo "chown -R #{fetch(:roundsman_user)} #{fetch(:roundsman_working_dir)}"
end
@@ -138,11 +135,8 @@ def distribution
end
def ensure_supported_distro
- unless @ensured_supported_distro
- logger.info "Using Linux distribution #{distribution}"
- abort "This distribution is not (yet) supported." unless distribution.include?("Ubuntu")
- @ensured_supported_distro = true
- end
+ logger.info "Using Linux distribution #{distribution}"
+ abort "This distribution is not (yet) supported." unless distribution.include?("Ubuntu")
end
def install_ruby?
Please sign in to comment.
Something went wrong with that request. Please try again.