Just pulled a fresh clone of Trellis and Bedrock. Updated YMLs, run Vagrant up and immediately get this:
PLAY [WordPress Server: Install LEMP Stack with PHP 7.2 and MariaDB MySQL] *****
[WARNING]: Failure using method (v2_playbook_on_play_start) in callback plugin
(<ansible.plugins.callback.vars.CallbackModule object at 0x104b216d0>): Ansible
= 2.4.0.0 is required when using Python 3. Either downgrade to Python 2 or
update your Ansible version to 2.5.3.
ERROR! Ansible >= 2.4.0.0 is required when using Python 3.
Either downgrade to Python 2 or update your Ansible version to 2.5.3.
Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
I Run the following and it shows that I am using 2.4.0.0:
Mind adding these two lines to output the versions?
--- a/lib/trellis/plugins/vars/version.py
+++ b/lib/trellis/plugins/vars/version.py
@@ -18,6 +18,9 @@ version_requirement = '2.4.0.0'
version_tested_max = '2.5.3'
python3_required_version = '2.5.3'
+display.warning(str(version_info[0]))
+display.warning(__version__)
+
if version_info[0] == 2 and not ge(LooseVersion(__version__), LooseVersion(python3_required_version)):
raise AnsibleError(('Ansible >= {} is required when using Python 3.\n'
'Either downgrade to Python 2 or update your Ansible version to {}.').format(__version__, python3_required_version))
If you re-run you’ll see something like:
PLAY [Set ansible_python_interpreter] ******************************************
[WARNING]: 3
[WARNING]: 2.5.3
You can just ctrl+c after that.
Also for the time being, feel free to comment out that version in the file above to skip it.
PLAY [WordPress Server: Install LEMP Stack with PHP 7.2 and MariaDB MySQL] *****
[WARNING]: 2
[WARNING]: 2.4.0.0
[WARNING]: Failure using method (v2_playbook_on_play_start) in callback plugin
(<ansible.plugins.callback.vars.CallbackModule object at 0x111a446d0>): Ansible
>= 2.4.0.0 is required when using Python 3. Either downgrade to Python 2 or
update your Ansible version to 2.5.3.
ERROR! Ansible >= 2.4.0.0 is required when using Python 3.
Either downgrade to Python 2 or update your Ansible version to 2.5.3.
Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
--- a/lib/trellis/plugins/vars/version.py
+++ b/lib/trellis/plugins/vars/version.py
@@ -18,9 +18,9 @@ version_requirement = '2.4.0.0'
version_tested_max = '2.5.3'
python3_required_version = '2.5.3'
-if version_info[0] == 2 and not ge(LooseVersion(__version__), LooseVersion(python3_required_version)):
- raise AnsibleError(('Ansible >= {} is required when using Python 3.\n'
- 'Either downgrade to Python 2 or update your Ansible version to {}.').format(python3_required_version, python3_required_version))
+# if version_info[0] == 2 and not ge(LooseVersion(__version__), LooseVersion(python3_required_version)):
+# raise AnsibleError(('Ansible >= {} is required when using Python 3.\n'
+# 'Either downgrade to Python 2 or update your Ansible version to {}.').format(python3_required_version, python3_required_version))
if not ge(LooseVersion(__version__), LooseVersion(version_requirement)):
raise AnsibleError(('Trellis no longer supports Ansible {}.\n'
You did at least identify that error message was wrong. I just updated it but that won’t fix your actual issue.