community.general/lib/ansible
Valentin Krasontovitsch cfff72e9db Use apt-get as fallback for apt upgrade
In answer to #2540, `aptitude` was introduced as tool of choice for running
upgrades in the apt module and installing new packages that arise as
dependencies during upgrades.

This recently lead to problems, as for example Ubuntu Xenial (16.04) ships
without aptitude (installed).

Studying the man pages of both apt-get and aptitude, it appears that we can
achieve the effects of `aptitude safe-upgrade` using

```
apt-get upgrade --with-new-pkgs --autoremove
```

while `aptitude full-upgrade` seems to be identical to `apt-get dist-upgrade`.

We use `apt-get` as described above as a fall-back in case that `aptitude`
cannot be found, issuing a warning when it does so.

Furthermore it introduces a flag `force_apt_get` which may be used to enforce
usage of apt-get (which does not issue a warning).

The integration tests are updated accordingly.

Cf. also the discussion in #27370.

Fixes #18987
2017-08-10 09:25:56 -04:00
..
cli pylint fixes for vault related code (#27721) 2017-08-08 16:10:03 -04:00
compat Remove wildcard imports 2017-07-28 22:10:17 -07:00
config Add back support for vault_password_file config var (#27597) 2017-08-01 18:07:33 -04:00
errors correct, cleanup & simplify dwim stack (#25956) 2017-07-03 15:27:53 -04:00
executor Fix for ansiballz filenames conflicting with python stdlib modules 2017-08-01 15:20:35 -07:00
galaxy Removes container-enabled warning (#27578) 2017-08-01 12:51:03 -04:00
inventory ensure all groups inherit from 'all' 2017-07-13 18:38:39 -04:00
module_utils Various fixes (#27889) 2017-08-10 01:51:13 +02:00
modules Use apt-get as fallback for apt upgrade 2017-08-10 09:25:56 -04:00
parsing pylint fixes for vault related code (#27721) 2017-08-08 16:10:03 -04:00
playbook helpers.py: Fixes #27334 include empty task file within a 'block' dis… (#27811) 2017-08-08 09:48:39 -04:00
plugins ISSUE 25470 - update patch from review details 2017-08-09 13:38:16 -07:00
template template: fix KeyError: 'undefined variable: 0 (#27972) 2017-08-09 18:50:53 -04:00
utils Delete unused module_utils/cloudengine.py (#25054) 2017-08-09 12:32:45 -04:00
vars Remove wildcard imports 2017-07-28 22:10:17 -07:00
__init__.py Fix ziploader for the cornercase of ansible invoking ansible. 2016-04-29 08:47:49 -07:00
constants.py Fix undefined variables, basestring usage, and some associated python3 issues 2017-07-25 15:58:23 -07:00
release.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00