Hi,
I’ve been having trouble getting my site back to normal after updating trellis. It seems like one thing leads to another…
Right now, I’m having trouble deploying changes to the site. When I run ./bin/deploy.sh staging mysitename.com
I get an error (the error message changes depending on which version of ansible I have - I’ve tried 2.9, 2.10, 2. 5, 4. 3, 2.3, and a few others). The deployment doesn’t run at all. I’ve tried installing different versions of ansible using pip, as well as apt (one thing to note - running ansible --version
with version greater than 2.7 returns the error below, even though pip installs successfully).
I can deploy my other sites, with old versions of trellis, without an issue.
Linux mint cinnamon 3.8.8
Wordpress 5.8
Thanks for reading!
Jill
PS Here’s a list of a errors received using various versions of ansible:
ansible 4.3
./bin/deploy.sh: line 45: ansible-playbook: command not found
ansible 2.10
./bin/deploy.sh: line 45: ansible-playbook: command not found
ansible 2.9
ERROR! Unexpected Exception, this is probably a bug: cannot import name AnsibleCollectionLoader
the full traceback was:
Traceback (most recent call last):
File "/usr/local/bin/ansible-playbook", line 92, in <module>
mycli = getattr(__import__("ansible.cli.%s" % sub, fromlist=[myclass]), myclass)
File "/usr/local/lib/python2.7/dist-packages/ansible/cli/__init__.py", line 22, in <module>
from ansible.inventory.manager import InventoryManager
File "/usr/local/lib/python2.7/dist-packages/ansible/inventory/manager.py", line 38, in <module>
from ansible.plugins.loader import inventory_loader
File "/usr/local/lib/python2.7/dist-packages/ansible/plugins/loader.py", line 25, in <module>
from ansible.utils.collection_loader import AnsibleCollectionLoader, AnsibleFlatMapLoader, AnsibleCollectionRef
ImportError: cannot import name AnsibleCollectionLoader
ansible 2.4
ERROR! Unexpected Exception, this is probably a bug: cannot import name context
And this is the error I’m seeing after running ansible --version
when using ansible versions 2.8 or greater:
ERROR! Unexpected Exception, this is probably a bug: cannot import name AnsibleCollectionLoader
the full traceback was:
Traceback (most recent call last):
File "/usr/local/bin/ansible", line 90, in <module>
mycli = getattr(__import__("ansible.cli.%s" % sub, fromlist=[myclass]), myclass)
File "/usr/local/lib/python2.7/dist-packages/ansible/cli/__init__.py", line 22, in <module>
from ansible.inventory.manager import InventoryManager
File "/usr/local/lib/python2.7/dist-packages/ansible/inventory/manager.py", line 38, in <module>
from ansible.plugins.loader import inventory_loader
File "/usr/local/lib/python2.7/dist-packages/ansible/plugins/loader.py", line 27, in <module>
from ansible.utils.collection_loader import AnsibleCollectionLoader, AnsibleFlatMapLoader, is_collection_ref
ImportError: cannot import name AnsibleCollectionLoader