running:
ansible -m setup <hostname>
(hostname being an ubuntu 20.04 desktop)
returns the warning:
[WARNING]: Module invocation had junk after the JSON data: AttributeError("module 'platform' has no attribute 'dist'")
and the output does not show any field "ansible_distribution_release".
As expected, tasks using this variable fail:
'ansible_distribution_release' is undefined
anything I may be missing ?
edit: the issue occurred with ansible 2.5.1, and was solved by running a newer version of ansible, see accepted answer.