diff --git a/molecule/driver/vagrant.py b/molecule/driver/vagrant.py index a16fcf821..f4a77cb4e 100644 --- a/molecule/driver/vagrant.py +++ b/molecule/driver/vagrant.py @@ -105,10 +105,10 @@ def ansible_connection_options(self, instance_name): d = self._get_instance_config(instance_name) return { - 'ansible_ssh_user': d['User'], - 'ansible_ssh_host': d['HostName'], - 'ansible_ssh_port': d['Port'], - 'ansible_ssh_private_key_file': d['IdentityFile'], + 'ansible_user': d['User'], + 'ansible_host': d['HostName'], + 'ansible_port': d['Port'], + 'ansible_private_key_file': d['IdentityFile'], 'connection': 'ssh', 'ansible_ssh_extra_args': ' '.join(ssh_options), } diff --git a/test/unit/driver/test_vagrant.py b/test/unit/driver/test_vagrant.py index 0ce89966e..af5947a13 100644 --- a/test/unit/driver/test_vagrant.py +++ b/test/unit/driver/test_vagrant.py @@ -119,10 +119,10 @@ def test_ansible_connection_options(mocker, vagrant_instance): }] } x = { - 'ansible_ssh_host': '127.0.0.1', - 'ansible_ssh_port': 2222, - 'ansible_ssh_user': 'vagrant', - 'ansible_ssh_private_key_file': '/foo/bar', + 'ansible_host': '127.0.0.1', + 'ansible_port': 2222, + 'ansible_user': 'vagrant', + 'ansible_private_key_file': '/foo/bar', 'connection': 'ssh', 'ansible_ssh_extra_args': ('-o UserKnownHostsFile=/dev/null ' '-o ControlMaster=auto '