Support different verbosity levels with 'ansible.verbose'

This commit is contained in:
Gilles Cornu 2013-05-06 23:01:27 +02:00
parent 66715de2ae
commit 96fb28dcf9
1 changed files with 9 additions and 1 deletions

View File

@ -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