Confusing wording in error message (netaddr)
nxg opened this issue · 1 comments
SUMMARY
(This is a fairly trivial fix; reported in the main issue list, but I was redirected here)
When using a playbook which uses eg ansible.utils.ipv4('public'), I see an error message:
The ipv4 filter requires python's netaddr be installed on the ansible controller
Trying to parse this, I ended up perplexed – ‘in what sense does “python” have a network address; WTF?!’ – and it took a web search to realise that it's referring to a Python netaddr
package. Fairly obvious in retrospect, of course (and I have in fact used that package before), but it took me a good 10 minutes to work out what the error message was reporting, rather than giving an immediate 'aha!’.
I suggest changing the wording to
The ipv4 filter requires that the Python netaddr package be installed on the ansible controller
(One for the intern...?)
ISSUE TYPE
- Bug Report
COMPONENT NAME
ansible-playbook
ANSIBLE VERSION
ansible [core 2.14.3]
config file = /Users/Shared/common/checkouts/itm/ansible/ansible.cfg
configured module search path = ['/Users/norman/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /Users/Shared/common/checkouts/itm/ansible/ansible-venv/lib/python3.9/site-packages/ansible
ansible collection location = /Users/norman/.ansible/collections:/usr/share/ansible/collections
executable location = /Users/Shared/common/checkouts/itm/ansible/ansible-venv/bin/ansible
python version = 3.9.6 (default, Oct 18 2022, 12:41:40) [Clang 14.0.0 (clang-1400.0.29.202)] (/Users/Shared/common/checkouts/itm/ansible/ansible-venv/bin/python)
jinja version = 3.1.2
libyaml = True
COLLECTION VERSION
# /Users/Shared/common/checkouts/itm/ansible/ansible-venv/lib/python3.9/site-packages/ansible_collections
Collection Version
------------- -------
ansible.utils 2.9.0
CONFIGURATION
CONFIG_FILE() = /Users/Shared/common/checkouts/itm/ansible/ansible.cfg
DEFAULT_HOST_LIST(/Users/Shared/common/checkouts/itm/ansible/ansible.cfg) = ['/Users/Shared/common/checkouts/itm/ansible/inventory/hosts']
DEFAULT_MANAGED_STR(/Users/Shared/common/checkouts/itm/ansible/ansible.cfg) = Ansible managed: modified on %Y-%m-%d %H:%M:%S
DEFAULT_ROLES_PATH(/Users/Shared/common/checkouts/itm/ansible/ansible.cfg) = ['/Users/Shared/common/checkouts/itm/ansible/roles']
DEFAULT_VAULT_PASSWORD_FILE(/Users/Shared/common/checkouts/itm/ansible/ansible.cfg) = /Users/Shared/common/checkouts/itm/ansible/.vault_pass
RETRY_FILES_ENABLED(/Users/Shared/common/checkouts/itm/ansible/ansible.cfg) = False
OS / ENVIRONMENT
macOS 13.2.1
STEPS TO REPRODUCE
Run any playbook which exploits features of the Python netaddr
package, while that package isn't installed on the controller node
EXPECTED RESULTS
I expected an easy-to-parse/non-confusing error message
ACTUAL RESULTS
I got a confusing (clear only in retrospect) error message
closing this as #244 fixed it