summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2013-12-10 11:08:39 -0800
committerelijah <elijah@riseup.net>2013-12-10 11:08:39 -0800
commit11c182aeee2b0ef83ee8b3986583a2c657a9b6f8 (patch)
treecdb5514bf0a0ca0743471fc5df629170f35c820a
parent050dcdb8e1b8a5a82d9e65e5950b281834035298 (diff)
added `--sync` to deploy.
-rw-r--r--lib/leap_cli/commands/deploy.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/leap_cli/commands/deploy.rb b/lib/leap_cli/commands/deploy.rb
index 61323c9..310fcca 100644
--- a/lib/leap_cli/commands/deploy.rb
+++ b/lib/leap_cli/commands/deploy.rb
@@ -11,6 +11,9 @@ module LeapCli
c.switch :fast, :desc => 'Makes the deploy command faster by skipping some slow steps. A "fast" deploy can be used safely if you recently completed a normal deploy.',
:negatable => false
+ # --sync
+ c.switch :sync, :desc => "Sync files, but don't actually apply recipes."
+
# --force
c.switch :force, :desc => 'Deploy even if there is a lockfile.', :negatable => false
@@ -49,8 +52,10 @@ module LeapCli
ssh.leap.log :synching, "puppet manifests" do
sync_puppet_files(ssh)
end
- ssh.leap.log :applying, "puppet" do
- ssh.puppet.apply(:verbosity => LeapCli.log_level, :tags => tags(options), :force => options[:force])
+ unless options[:sync]
+ ssh.leap.log :applying, "puppet" do
+ ssh.puppet.apply(:verbosity => LeapCli.log_level, :tags => tags(options), :force => options[:force])
+ end
end
end
end