ansible/test/integration/targets/apt
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
..
defaults added integration tests for apt upgrade (#25670) 2017-06-19 13:57:26 +01:00
meta Migrate Linux CI roles to test targets. (#17997) 2016-10-13 09:09:25 -07:00
tasks Use apt-get as fallback for apt upgrade 2017-08-10 09:25:56 -04:00
aliases Disable failing apt test. 2017-07-20 14:10:09 -07:00