]> gitweb.fluxo.info Git - leap/leap_cli.git/commitdiff
pass through verbosity to puppet
authorelijah <elijah@riseup.net>
Wed, 27 Feb 2013 04:42:01 +0000 (20:42 -0800)
committerelijah <elijah@riseup.net>
Wed, 27 Feb 2013 04:42:01 +0000 (20:42 -0800)
lib/leap_cli/commands/deploy.rb

index 5b1e4d5f544fafc95ad8761e658718b5e43ecbd3..4cfefd7b4c461562d790636527586017ea82f3cb 100644 (file)
@@ -52,7 +52,15 @@ module LeapCli
           end
           tags << 'leap_slow' unless options[:fast]
 
-          ssh.set :puppet_command, "/usr/bin/puppet apply --color=false --tags=#{tags.join(',')}"
+          # set verbosity
+          verbosity = case LeapCli.log_level
+            when 3 then '--verbose'
+            when 4 then '--verbose --debug'
+            when 5 then '--verbose --debug --trace'
+            else ''
+          end
+
+          ssh.set :puppet_command, "/usr/bin/puppet apply --color=false --tags=#{tags.join(',')} #{verbosity}"
           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