From 36bd52713ba0c379e52e97ed19dd75211df2f0f9 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 20 Sep 2013 21:16:50 -0700 Subject: [PATCH] provisioners/ansible: convert extra vars to strings [GH-2244] --- CHANGELOG.md | 1 + plugins/provisioners/ansible/config.rb | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bb5b3e57a..eb0bea9f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ BUG FIXES: - guests/linux: Don't raise exception right away if mounting fails, allow retries. [GH-2234] - hosts/arch: Vagrant won't crash on Arch anymore. [GH-2233] + - provisioners/ansibe: Extra vars are converted to strings. [GH-2244] - provisioners/puppet: Work with restrictive umask. [GH-2241] ## 1.3.3 (September 18, 2013) diff --git a/plugins/provisioners/ansible/config.rb b/plugins/provisioners/ansible/config.rb index fbf932a26..b206e224d 100644 --- a/plugins/provisioners/ansible/config.rb +++ b/plugins/provisioners/ansible/config.rb @@ -47,6 +47,12 @@ module VagrantPlugins @start_at_task = nil if @start_at_task == UNSET_VALUE @raw_arguments = nil if @raw_arguments == UNSET_VALUE @host_key_checking = nil if @host_key_checking == UNSET_VALUE + + if @extra_vars && @extra_vars.is_a?(Hash) + @extra_vars.each do |k, v| + @extra_vars[k] = v.to_s + end + end end def validate(machine)