Closed lousyd closed 3 years ago
This does not look like an error related to the DO collection. Are you only having problems with this collection?
Good lead. I am having problems with other collections. This must be a problem with...... I don't know. ansible-galaxy itself?
This sounds like a problem with ansible itself (https://github.com/ansible/ansible), so may want to file an issue there. Also, you should visit the #ansible channel on libera IRC network where you can get some real-time help from other community members (https://web.libera.chat/).
Thank you.
@lousyd Did you discover a solution? Just ran into this same issue this morning. Latest Ansible installed via pip on ubuntu 20.04.
Just found the issue for any other folks that stumble upon this thread. Latest Ansible requires a specific version of resolvelib
(<0.6.0 to be exact). Fix with this command:
sudo -H pip install -Iv 'resolvelib<0.6.0'
Details here:
Ansible devs did properly bound the resolvelib version in https://github.com/ansible/ansible/blob/devel/requirements.txt, which should make sure the right version of the resolvelib is installed. @codeguy Did you install it into a fresh venv or did you install it globally (which is probably a bad idea)?
I don't recall exactly what it was I did to resolve the issue, but I do see a python3 -m pip install --upgrade ansible
in my bash history, just before my last attempt at installing the collection. And it is successfully installed now. So... maybe that did it? I don't recall for sure. Sorry.
@codeguy solution worked for me, definitely seems to be more of an issue with ansible-galaxy, was trying to use the community.docker
extension.
My OS:
Distributor ID: Ubuntu
Description: Ubuntu 22.04 LTS
Release: 22.04
Codename: jammy
Python: 3.10.4
Ansible: 2.12.5
@codeguy solved this for me too. It does require the resolvlib to be downgraded to 0.5.4. I had 0.8 installed, which caused this bug.
This is still a problem with a fresh install of Ubuntu 22.10. The below includes the manual downgrade of resolvelib & works (without the manual downgrade, this issue is reproduced):
sudo apt install -y pip
pip install ansible-core
pip install -Iv 'resolvelib<0.6.0'
ansible-galaxy collection install community.general
I opened an issue with ansible.
@DanVanAtta, if you could be so kind as to share a link to the issue you opened with Ansible? Thanks!
I fixed it with the below commands.
sudo apt install -y pip;
pip install -Iv 'resolvelib<0.6.0';
ansible-galaxy collection install community.windows;
Same thing in my case to install checkmk.general.
root@nfs1-server:~# ansible-galaxy collection install checkmk.general
Starting galaxy collection install process
Process install dependency map
ERROR! Unexpected Exception, this is probably a bug: CollectionDependencyProvider.find_matches() got an unexpected keyword argument 'identifier'
Installing resolvelib solved the problem!
pip install -Iv 'resolvelib<0.6.0';
OS/Environment
Ubuntu 22.04.3 LTS
ansible [core 2.12.9]
python version = 3.10.12
jinja version = 3.0.3
Encountered the same problem when trying to install checkmk.general, just like @MaxiReglisse.
ansible-galaxy collection install checkmk.general
, which failed because of for example: TypeError: CollectionDependencyProvider.find_matches() got an unexpected keyword argument 'identifier'
.
I first used apt install ansible-core
, however, after removing it and installing apt install ansible
, the installation of checkmk.general succeded.
Thanks !
SUMMARY
Cannot install collection. find_matches() got an unexpected keyword argument 'identifier'.
ISSUE TYPE
COMPONENT NAME
community.digitalocean
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Fedora Linux 34
STEPS TO REPRODUCE
EXPECTED RESULTS
Expected success.
ACTUAL RESULTS