1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/lib/ansible
Michael Scherer 2734895c48 Do switch to apt if aptitude is not installed (#30738)
Trying to use the apt module on a freshly install 16.04 Ubuntu VM with
"ansible -m apt -a 'name=* state=latest' all" fail with this backtrace:

  Traceback (most recent call last):
    File \"/tmp/ansible_2inxygge/ansible_module_apt.py\", line 1055, in <module>
      main()
    File \"/tmp/ansible_2inxygge/ansible_module_apt.py\", line 998, in main
      upgrade(module, 'yes', force_yes, p['default_release'], use_apt_get, dpkg_options)
    File \"/tmp/ansible_2inxygge/ansible_module_apt.py\", line 759, in upgrade
      apt_cmd_path = m.get_bin_path(apt_cmd, required=True)
    File \"/tmp/ansible_2inxygge/ansible_modlib.zip/ansible/module_utils/basic.py\", line 2182, in get_bin_path
    File \"/usr/lib/python3.5/posixpath.py\", line 89, in join
      genericpath._check_arg_types('join', a, *p)
    File \"/usr/lib/python3.5/genericpath.py\", line 143, in _check_arg_types
      (funcname, s.__class__.__name__)) from None
    TypeError: join() argument must be str or bytes, not 'NoneType'

It seems that since aptitude is not installed on Xenial, so APTITUDE_CMD is None
and we later hit the bug in the upgrade function since it assume APTITUDE_CMD
is set.
2018-12-18 12:48:11 -05:00
..
cli Remove dead code in ansible-inventory 2018-12-18 08:58:38 -08:00
compat Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
config Misc typo fixes (#49816) 2018-12-14 15:12:58 +05:30
errors Add better error when k=v syntax is used with YAML in tasks (#41754) 2018-12-04 12:32:02 -05:00
executor Update bare exceptions to specify Exception. 2018-12-16 15:03:19 -08:00
galaxy Update bare exceptions to specify Exception. 2018-12-16 15:03:19 -08:00
inventory Fix reverse_inventory order to work on python3 (#49895) 2018-12-17 15:39:29 -06:00
module_utils GetManagerNicInventory (#49961) 2018-12-18 09:58:17 -06:00
modules Do switch to apt if aptitude is not installed (#30738) 2018-12-18 12:48:11 -05:00
parsing Update bare exceptions to specify Exception. 2018-12-16 15:03:19 -08:00
playbook added handlers_from (#49220) 2018-12-18 11:28:24 -05:00
plugins PSRP: Add support for reconnection retries (#49772) 2018-12-18 08:20:53 +10:00
template Update bare exceptions to specify Exception. 2018-12-16 15:03:19 -08:00
utils plugin_formatter.py: Improve the output when processing docs (#46541) 2018-12-18 11:23:49 -06:00
vars Misc typo fixes (#49816) 2018-12-14 15:12:58 +05:30
__init__.py
constants.py become_method: make dzdo more like sudo (#47946) 2018-12-04 18:24:32 -05:00
release.py Codename: How Many More Times 2018-09-04 12:38:29 -04:00