From 6bfcfb412bdee4ea413aeab4f8ce28fe775d9372 Mon Sep 17 00:00:00 2001 From: elijah Date: Sat, 2 Feb 2013 01:58:28 -0800 Subject: added --tags to deploy command. --- lib/leap_cli/commands/deploy.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'lib/leap_cli/commands') 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' -- cgit v1.2.3