diff --git a/test/unit/plugins/provisioners/ansible/provisioner_test.rb b/test/unit/plugins/provisioners/ansible/provisioner_test.rb index db562201d..2c8c27fb4 100644 --- a/test/unit/plugins/provisioners/ansible/provisioner_test.rb +++ b/test/unit/plugins/provisioners/ansible/provisioner_test.rb @@ -292,11 +292,11 @@ VF it "adds host variables (given in Hash format) to the generated inventory" do config.host_vars = { - machine1: {"http_port" => 80, "maxRequestsPerChild" => 808} + machine1: {"http_port" => 80, "comments" => "'some text with spaces'"} } expect(Vagrant::Util::Subprocess).to receive(:execute).with { |*args| inventory_content = File.read(generated_inventory_file) - expect(inventory_content).to match("^" + Regexp.quote(machine.name) + ".+http_port=80 maxRequestsPerChild=808") + expect(inventory_content).to match("^" + Regexp.quote(machine.name) + ".+http_port=80 comments='some text with spaces'$") } end diff --git a/website/source/docs/provisioning/ansible_common.html.md b/website/source/docs/provisioning/ansible_common.html.md index 2ed3b4e72..d53639613 100644 --- a/website/source/docs/provisioning/ansible_common.html.md +++ b/website/source/docs/provisioning/ansible_common.html.md @@ -93,6 +93,7 @@ Some of these options are for advanced usage only and should not be used unless ansible.host_vars = { "host1" => {"http_port" => 80, "maxRequestsPerChild" => 808}, + "comments" => "'text with spaces'", "host2" => {"http_port" => 303, "maxRequestsPerChild" => 909} }