Closed Raffaello closed 6 years ago
it seems related to not finding the ssh key anymore... the output of vagrant ssh-config
:
Host xenial64
HostName 127.0.0.1
User ubuntu
Port 2203
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
PasswordAuthentication no
IdentitiesOnly yes
LogLevel FATAL
and it is missing IdentityFile
. Any reason why it is happening?
Do you have something in ~/.vagrant.d/Vagrantfile
?
Nope. I do not have neither that file.
Does the problem go away if you try a different version of Molecule? Could you try pip install molecule==2.8.2
. I'm wondering if #1147, somehow causes this issue.
with version 2.8.2
is working properly.
and with 2.9.0
is getting me the error.
@Raffaello can you add the following provider_options
to your Molecule 2.9.0 create.yml.
molecule_vagrant:
provider_options:
ssh_insert_key: true
i have this error
failed: [localhost] (item={'box': u'ubuntu/xenial64', 'name': u'xenial64'}) => {
"changed": false,
"item": {
"box": "ubuntu/xenial64",
"name": "xenial64"
},
"module_stderr": "There are errors in the configuration of this machine. Please fix\nthe following errors and try again:\n\nVirtualBox Provider:\n* The following settings shouldn't exist: ssh_insert_key\n\nTraceback (most recent call last):\n File \"/tmp/ansible_Y1PPqN/ansible_module_molecule_vagrant.py\", line 463, in <module>\n main()\n File \"/tmp/ansible_Y1PPqN/ansible_module_molecule_vagrant.py\", line 456, in main\n v.up()\n File \"/tmp/ansible_Y1PPqN/ansible_module_molecule_vagrant.py\", line 342, in up\n for line in self._vagrant.up(provision=provision, stream_output=True):\n File \"venv_molecule/lib/python2.7/site-packages/vagrant/__init__.py\", line 1005, in _stream_vagrant_command\n raise subprocess.CalledProcessError(p.returncode, command) subprocess.CalledProcessError: Command '['/usr/bin/vagrant', 'up', '--no-provision']' returned non-zero exit status 1\n",
"module_stdout": "<vagrant_output> Bringing machine 'xenial64' up with 'virtualbox' provider...\n\n",
"msg": "MODULE FAILURE",
the generated vagrant.yml
file seems correct to me:
provider:
name: virtualbox
options:
cpus: 2
memory: 512
ssh_insert_key: true
basically, seems the error on vagrant itself:
Bringing machine 'xenial64' up with 'virtualbox' provider...
There are errors in the configuration of this machine. Please fix
the following errors and try again:
VirtualBox Provider:
* The following settings shouldn't exist: ssh_insert_key
vagrant version: 2.0.2
and it is strictly related to the line in the vagarnt.yml
file. if i comment it out. vagrant up
is not complaining anymore
it fails for this point in the Vagrant
file template:
https://github.com/metacloud/molecule/blob/master/molecule/provisioner/ansible/plugins/libraries/molecule_vagrant.py#L192-L199
excluding also ssh_insert_key
and run vagrant validate
doesn't reproduce anymore the error output.
if key != 'memory' and key != 'cpus' and key != 'linked_clone' and key != 'ssh_insert_key'
i created a PR
@Raffaello does your fix in #1168 fix the reported issue?
v2.10 was cut to fix this issue.
yes. I tested only with virtualbox, i saw in the template there are other providers (eg: vmware), but i am not able to test them.
Issue Type
Molecule and Ansible details
Actual Behaviour (Bug report only)