Ansible version error on vagrant up


I have run into an error on latest trellis release (1.13).

When i vagrant up a project i get an error on ansible install. It requires ansible 2.10.7 but it installs 2.10.17.


==> default: [vagrant-hostmanager:guests] Updating hosts file on active guest virtual machines...
==> default: [vagrant-hostmanager:host] Updating hosts file on your workstation (password may be required)...
==> default: Running provisioner: ansible_local...
    default: Installing Ansible...
    default: Installing pip... (for Ansible installation)
The requested Ansible version (2.10.7) was not found on the guest.
Please check the Ansible installation on your Vagrant guest system (currently: 2.10.17),
or adapt the provisioner `version` option in your Vagrantfile.
for more information.

My vagrant version is 2.2.6
Running virtualbox version 5.2.44 on windows 10.

I don’t know from where it gets this asible version and how can i force the correct version. If i change the version in vagrant file than it’s ok. But i’m not sure if this is a good practice to always change the vagrant file.

Any idea?

Thank you

Howdy! Just checking — are you using trellis-cli?

No. I’m using vagrant command to start and provision virtual box and then i use ansible commands inside virtual enviroment to deploy site.

I’d suggest installing trellis-cli, then running trellis init in your project directory (from WSL) and then run trellis up (also from WSL)

1 Like

As @ben said, trellis-cli should provide better dependency management.

But you can also try changing the version defined here: trellis/vagrant.default.yml at 56582d408054f556e8d634a6308730ec17f75068 · roots/trellis · GitHub