Roots Discourse

Ansible installation is failing

Hi All,

I’m trying to set up a trellis project on my local Windows machine by following this documentation https://roots.io/docs/getting-started/windows/#working-with-trellis. As per the installation document, able to install Virtual box and Vagrant but Ansible installation is failing. When I’m trying to run the command vagrant up or vagrant reload --provision, it’s throwing the below Python supported version error. I have already check in my system and there is no python version 2.7 present on my system. Below is the entire stack trace of the error. Please help me as I’m completely stuck and not able to proceed.

==> default: Attempting graceful shutdown of VM…
==> default: Checking if box ‘bento/ubuntu-18.04’ version ‘202012.21.0’ is up to date…
==> default: Clearing any previously set forwarded ports…
==> default: Clearing any previously set network interfaces…
==> default: Preparing network interfaces based on configuration…
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports…
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running ‘pre-boot’ VM customizations…
==> default: Booting VM…
==> default: Waiting for machine to boot. This may take a few minutes…
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM…
default: The guest additions on this VM do not match the installed version of
default: VirtualBox! In most cases this is fine, but in rare cases it can
default: prevent things such as shared folders from working properly. If you see
default: shared folder errors, please make sure the guest additions within the
default: virtual machine match the version of VirtualBox you have installed on
default: your host and reload your VM.
default:
default: Guest Additions Version: 6.1.16
default: VirtualBox Version: 6.0
==> default: Setting hostname…
==> default: Configuring and enabling network interfaces…
==> default: Mounting shared folders…
default: /vagrant => C:/CommonSpiritHealth/Code/commonSpirt_WordPress/eleven-commonspirit/trellis
default: /home/vagrant/trellis => C:/CommonSpiritHealth/Code/commonSpirt_WordPress/eleven-commonspirit/trellis
default: /home/vagrant/trellis/bin => C:/CommonSpiritHealth/Code/commonSpirt_WordPress/eleven-commonspirit/trellis/bin
default: /srv/www/commonspirit.org/current => C:/CommonSpiritHealth/Code/commonSpirt_WordPress/eleven-commonspirit/site
==> default: Running provisioner: ansible_local…
default: Installing Ansible…
default: Installing pip… (for Ansible installation)
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

curl https://bootstrap.pypa.io/get-pip.py | sudo python

Stdout from the command:

ERROR: This script does not work on Python 2.7 The minimum supported Python version is 3.6. Please use https://bootstrap.pypa.io/pip/2.7/get-pip.py instead.

Stderr from the command:

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1882k 100 1882k 0 0 1560k 0 0:00:01 0:00:01 --:–:-- 1560k

It feels a bit like Ubuntu 18.x has issues while Ubuntu 20.x seems to fix this issue.
Unrelated project but related problem with solution:

Thanks for replying but I’m trying to do the set up on my Window machine.

No, I don’t mean the Hypervisor host/workstation you are using, but what is used for the actual Trellis system. As the workstation setup for Windows, I would recommend WSL 2 + Vagrant (Windows host + Debian client).

So it may help to apply the Trellis playbook on a Ubuntu 20.x LTS system (which Trellis officially and practically supports).

https://roots.io/docs/getting-started/windows/#working-with-trellis

If you are still having issues, try upgrading your Trellis environment using the solution posted in Best practices to update Trellis.

Your mileage may vary.

// Riley

This topic was automatically closed after 42 days. New replies are no longer allowed.