]> gitweb.fluxo.info Git - leap/leap_cli.git/commitdiff
added 'leap deploy --fast'
authorelijah <elijah@riseup.net>
Thu, 31 Jan 2013 06:26:07 +0000 (22:26 -0800)
committerelijah <elijah@riseup.net>
Thu, 31 Jan 2013 06:26:07 +0000 (22:26 -0800)
lib/leap_cli/commands/deploy.rb

index 1071208eec863b5b971e8cf6c77180999bb1bf5b..818e08e8ac053a553bc00ee00eddd834bdd7701c 100644 (file)
@@ -6,6 +6,7 @@ module LeapCli
     long_desc 'The node-filter can be the name of a node, service, or tag.'
     arg_name 'node-filter'
     command :deploy do |c|
+      c.switch :fast, :desc => 'Makes the deploy command faster by skipping some slow steps. A "fast" deploy can be used safely if you have done a normal deploy to the node recently.', :negatable => false
       c.action do |global_options,options,args|
         init_submodules
 
@@ -32,7 +33,9 @@ module LeapCli
           # sync puppet manifests and apply them
           ssh.set :puppet_source, [Path.platform, 'puppet'].join('/')
           ssh.set :puppet_destination, '/srv/leap'
-          ssh.set :puppet_command, '/usr/bin/puppet apply --color=false'
+          tags = ['default']
+          tags << 'slow' unless options[:fast]
+          ssh.set :puppet_command, "/usr/bin/puppet apply --color=false --tags=#{tags.join(', ')}"
           ssh.set :puppet_lib, "puppet/modules"
           ssh.set :puppet_parameters, '--libdir puppet/lib --confdir puppet puppet/manifests/site.pp'
           ssh.set :puppet_stream_output, true