Commit Graph

9 Commits (c51f2f835ebde2733ab42b2cd5371f4b9d3ddd15)

Author SHA1 Message Date
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
7 years ago
Matt Clay 5617d68c3e Disable failing apt test. 7 years ago
Matt Clay 779306cfed Disable skipped tests for remote platforms. (#26624) 7 years ago
David Newswanger ca16956337 added integration tests for apt upgrade (#25670)
* added integration tests for apt upgrade

changed version number for hello to 2.6 so that it works with Ubuntu 12.04

prevent tests from checking if aptitude is installed on non ubuntu systems

changed ordering on when statements for safe and full upgrade types so that the OS check happens before the aptitude check

added integration tests for apt upgrade

changed version number for hello to 2.6 so that it works with Ubuntu 12.04

* Moved additions to tasks/main.yml to make revisions easier. Changed tasks to multiline format
7 years ago
Evgeni Golov 1f78715848 apt: include arch in check for installed packages on multi-arch systems (#24846)
* apt: include arch in check for installed packages on multi-arch systems

Thanks: Stefan Löwen <stefan.loewen@gmail.com>

Fixes: #24673

* add an integration test for apt's multi-arch handling
7 years ago
Brendan Almonte 2af5556901 Added autoclean/autoremove for the apt module
- Removed alias autoclean from autoremove.
- Added independent execution of apt-get autoclean/autoremove
- Continued to support --auto-remove as a flag to install/remove

Fixes #22222 #24718
7 years ago
Brendan Almonte b820d024fc Add alternative syntax for upgrading all installed packages via apt (#25007)
syntax: 'apt: name=* state=latest'

feature #24189
7 years ago
Matt Clay 6bbd92e422 Initial ansible-test implementation. (#18556) 8 years ago
Matt Clay 75e4645ee7 Migrate Linux CI roles to test targets. (#17997) 8 years ago