aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2013-02-02 01:58:28 -0800
committerelijah <elijah@riseup.net>2013-02-02 01:58:28 -0800
commit6bfcfb412bdee4ea413aeab4f8ce28fe775d9372 (patch)
tree000251df16bae70ded9ed231a5aeff8625ce8307
parent05494b7861e7883d273d42c30a7bc799c5384873 (diff)
downloadleap_cli-6bfcfb412bdee4ea413aeab4f8ce28fe775d9372.tar.gz
leap_cli-6bfcfb412bdee4ea413aeab4f8ce28fe775d9372.tar.bz2
added --tags to deploy command.
-rw-r--r--lib/leap_cli/commands/deploy.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/leap_cli/commands/deploy.rb b/lib/leap_cli/commands/deploy.rb
index 07b338a..c2f98b8 100644
--- a/lib/leap_cli/commands/deploy.rb
+++ b/lib/leap_cli/commands/deploy.rb
@@ -6,7 +6,15 @@ 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|
+
+ # --fast
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
+
+ # --tags
+ c.desc 'Specify tags to pass through to puppet'
+ c.arg_name 'TAG[,TAG]'
+ c.flag :tags
+
c.action do |global_options,options,args|
init_submodules
@@ -35,6 +43,11 @@ module LeapCli
ssh.set :puppet_destination, '/srv/leap'
tags = ['leap_base,leap_service']
tags << 'leap_slow' unless options[:fast]
+ if options[:tags]
+ options[:tags].split(',').each do |tag|
+ tags << tag
+ end
+ end
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'