The requested Ansible version (2.4.0) was not found on the guest

After updating Vagrant to 2.0.0 I can no longer install Trellis.

I get the following message:

Vagrant has automatically selected the compatibility mode '2.0'
according to the Ansible version installed (2.4.0.0).

The requested Ansible version (2.4.0) was not found on the guest.
Please check the Ansible installation on your Vagrant guest system (currently: 2.4.0.0),
or adapt the provisioner `version` option in your Vagrantfile.
See https://docs.vagrantup.com/v2/provisioning/ansible_common.html#version
for more information.

Is there a solution?

Is your Trellis up to date?

We just started requiring 2.4: https://github.com/roots/trellis/pull/895

Thanks for the quick reply.

I installed this morning using git clone --depth=1 git@github.com:roots/trellis.git && rm -rf trellis/.git

I presume this command clones the latest version?

Oh, yeah if you got it this morning it should be fine :thinking:

Can you try Vagrant 1.9.x?

1 Like

Thanks, that's done the job. Went back to 1.9.8.

If this gets fixed on Vagrant 2.0.0 please let me know.

2 Likes

I’m having the same issue but not sure how to regress to version 1.9x?

All roots installations have failed with the latest MacOs upgrade with this same error.

    The requested Ansible version (2.4.0) was not found on the guest.

Please check the Ansible installation on your Vagrant guest system (currently: 2.4.0.0),
or adapt the provisioner version option in your Vagrantfile.

Uninstall Vagrant, reinstall Vagrant

Inspirational!

For anyone bowled over here is the link for the older versions!

https://releases.hashicorp.com/vagrant/?_ga=2.163443132.1678068094.1507817614-482052280.1507817614

Has this been fixed on the latest Vagrant version yet?

Change ansible version from 2.4.0 to 2.4.0.0 in your VagrantFile:
ansible.version = “2.4.0.0”

4 Likes

Thanks @oleg2106! That fix added to Trellis in https://github.com/roots/trellis/pull/911

The actual line is in the vagrant.default.yml and it currently states on the latest pull,

vagrant_ansible_version: '2.4.1.0'

So I’m assuming this is fixed but still having issues unless I’m using vagrant 1.9.8 which causes issues on the lates VirtualBox update to 5.2 so resorting to 5.1.3

As of this morning everything works as intended on the latest pull on Vagrant 1.9.8 and VirtualBox 5.1.3, where the ansible version requested is as above on 2.4.1.0.

1 Like

This solved the issue for me without rolling back my Vagrant version.

This solved the issue for me without rolling back my Vagrant version nor updating Trellis. Thanks!