wiki:ansible_troubleshooting
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| wiki:ansible_troubleshooting [2023/12/18 14:34] – created antisa | wiki:ansible_troubleshooting [2025/10/23 09:48] (current) – add couldn't resolve module/action antisa | ||
|---|---|---|---|
| Line 11: | Line 11: | ||
| Check the names in group_vars! They need to match the name of the group in the inventory file. | Check the names in group_vars! They need to match the name of the group in the inventory file. | ||
| - | ====== | + | ===== AttributeError: |
| - | * | + | |
| + | Check versions of ansible and dependencies. This was caused by the upgraded cryptography package (and using the old ansible version - 2.9.27) which was being source from ''/ | ||
| + | |||
| + | sudo pip uninstall cryptography | ||
| + | |||
| + | to uninstall from system directory and then run this (notice no sudo) to install it in user's directory ''/ | ||
| + | |||
| + | pip install cryptography==2.6.1 | ||
| + | |||
| + | Or just use a newer version of ansible which can use newer version of cryptography package. | ||
| + | |||
| + | ===== .local/ | ||
| + | Happened when pip installing 9.3.0 version over 2.9.27. | ||
| + | |||
| + | Uninstall old version first | ||
| + | | ||
| + | |||
| + | Make sure no ansible dirs are leftover: | ||
| + | |||
| + | ~$ ls / | ||
| + | ls: cannot access '/ | ||
| + | |||
| + | Now install via pip | ||
| + | pip install ansible | ||
| + | |||
| + | ===== unsupported locale setting ===== | ||
| + | |||
| + | ERROR: Ansible could not initialize the preferred locale: unsupported locale setting | ||
| + | |||
| + | This might happen when you ssh into a server which doesn' | ||
| + | |||
| + | Fix is to simply generate the locale: | ||
| + | vi / | ||
| + | uncomment your locale e.g. | ||
| + | hr_HR.UTF-8 | ||
| + | |||
| + | Then run | ||
| + | locale-gen | ||
| + | |||
| + | |||
| + | ===== an unexpected keyword argument ' | ||
| + | < | ||
| + | [WARNING]: Skipping Galaxy server https:// | ||
| + | collection community.docker: | ||
| + | HTTPSConnection.__init__() got an unexpected keyword argument ' | ||
| + | argument ' | ||
| + | ERROR! Unknown error when attempting to call Galaxy at ' | ||
| + | </ | ||
| + | |||
| + | Try a different (newer) ansible version. | ||
| + | |||
| + | ===== " | ||
| + | |||
| + | This is also possibly a mismatch with ansible versions and older python on target hosts. Try a different, older ansible version if running against older OS-es. | ||
| + | |||
| + | ===== couldn' | ||
| + | You have the module installed but it still returns a similar error might be because of an older version of plugin. Run this to update it: | ||
| + | |||
| + | ansible-galaxy collection install community.libvirt -U | ||
| + | |||
| + | Now 2 versions are shown, ansible should use the newest one. | ||
| + | ansible-galaxy collection list |grep virt | ||
| + | community.libvirt | ||
| + | community.libvirt | ||
| + | |||
| + | Check also if the ansible version itself is compatible with plugin, on plugin document page. | ||
| ====== See also ====== | ====== See also ====== | ||
| Line 20: | Line 85: | ||
| ====== References ====== | ====== References ====== | ||
| + | * https:// | ||
wiki/ansible_troubleshooting.1702910085.txt.gz · Last modified: by antisa
