From 96fb28dcf9f616d226f9bb25fe52a1a4f17368f9 Mon Sep 17 00:00:00 2001 From: Gilles Cornu Date: Mon, 6 May 2013 23:01:27 +0200 Subject: [PATCH] Support different verbosity levels with 'ansible.verbose' --- plugins/provisioners/ansible/provisioner.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/plugins/provisioners/ansible/provisioner.rb b/plugins/provisioners/ansible/provisioner.rb index 1f51d5323..c0388121b 100644 --- a/plugins/provisioners/ansible/provisioner.rb +++ b/plugins/provisioners/ansible/provisioner.rb @@ -18,7 +18,15 @@ module VagrantPlugins options << "--limit=#{as_list_argument(config.limit)}" if config.limit options << "--sudo" if config.sudo options << "--sudo-user=#{config.sudo_user}" if config.sudo_user - options << "--verbose" if config.verbose + if config.verbose + if config.verbose.is_a? String + if config.verbose =~ /v+$/ + options << "--#{config.verbose}" + end + else + options << "--verbose" + end + end # Assemble the full ansible-playbook command command = (%w(ansible-playbook) << options << config.playbook).flatten