community.general/lib/ansible/modules
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
..
cloud Sanity fixes in various modules (#50080) 2018-12-18 09:53:46 -06:00
clustering Update bare exceptions to specify Exception. 2018-12-16 15:03:19 -08:00
commands Sanity fixes in various modules (#50080) 2018-12-18 09:53:46 -06:00
crypto openssl_privatekey: add ECC support (#49416) 2018-12-18 09:07:36 +00:00
database Sanity fixes in various modules (#50080) 2018-12-18 09:53:46 -06:00
files Sanity fixes in various modules (#50080) 2018-12-18 09:53:46 -06:00
identity Fix an issue retrieving some types of 1Password items. (#47213) 2018-12-05 11:49:26 -05:00
inventory Bulk fix DOCUMENTATION.author (Part 1) (#48934) 2018-11-20 19:31:35 +00:00
messaging rabbitmq_vhost_limits: Move to rabbitmq subdirectory (#49650) 2018-12-08 23:41:59 +01:00
monitoring Ensure that current uses of BaseException are required 2018-12-16 15:03:19 -08:00
net_tools Update bare exceptions to specify Exception. 2018-12-16 15:03:19 -08:00
network Sanity fixes in various modules (#50080) 2018-12-18 09:53:46 -06:00
notification Update bare exceptions to specify Exception. 2018-12-16 15:03:19 -08:00
packaging Do switch to apt if aptitude is not installed (#30738) 2018-12-18 12:48:11 -05:00
remote_management GetManagerNicInventory (#49961) 2018-12-18 09:58:17 -06:00
source_control Update bare exceptions to specify Exception. 2018-12-16 15:03:19 -08:00
storage Update bare exceptions to specify Exception. 2018-12-16 15:03:19 -08:00
system Sanity fixes in various modules (#50080) 2018-12-18 09:53:46 -06:00
utilities added handlers_from (#49220) 2018-12-18 11:28:24 -05:00
web_infrastructure Sophos UTM - add module to handle utm ca host key certificate entries (#48927) 2018-12-17 11:57:54 +00:00
windows fix facts memtotal_mb rounding on VMWare and swaptotal_mb conversion from KB to MB (#49940) 2018-12-18 08:09:19 +10:00
__init__.py Re-adding the init py for modules 2016-12-08 11:35:20 -05:00