Commit Graph

26 Commits (02e98810a9fa895b8215e864f11e537cbd125bae)

Author SHA1 Message Date
LRitzdorf 6bcb494f83
[dnf] Fix skip_broken, add test coverage (v2) (#78158)
* [dnf] Fix skip_broken, add test coverage

Change:
- skip_broken was set in config but not actually used in calls to
  base.install()
- added a lot of test cases with specialized repo
- got rid of external (docker repo) nobest test cases since the
  specialized repo works well for those too
- Slight cleanup and adding comments in dnf module

Test Plan:
- ci_complete

Tickets:
- Fixes #73072

Original-author: Rick Elrod <rick@elrod.me>

* Use a better test for checking results list

ci_complete

Signed-off-by: Rick Elrod <rick@elrod.me>

Co-authored-by: Rick Elrod <rick@elrod.me>
2 years ago
Matt Clay 43d650f924
Add RHEL 9.0 to CI. (#77853)
* Add RHEL 9.0 to CI.

* Restrict network manager inspection to RHEL8

* Skip module tests when astream_name is undefined, undefine it for RHEL9 until 9.1

* Remove redundant test.

Co-authored-by: Matt Martz <matt@sivel.net>
2 years ago
mbanas 43e99e4132
Adding modularity tag to task modularity.yml (#76557)
Co-authored-by: Martin Banas <mbanas@redhat.com>
3 years ago
Matt Clay 730194e2b6
ansible-test - Add RHEL 9 support. (#76217)
* Move RHEL pip package install into function.
* Add RHEL 9 support to bootstrap script.
* ansible-test - Add RHEL 9 support.
* Add install and uninstall instructions for RHEL9 to paramiko tests
* Skip incidental_inventory_docker_swarm on RHEL 9.
* Update dnf tests for rhel9
* Fix prepare_http_tests on RHEL 9.
* fix RHEL9 Python discovery tests to match distro map
* Skip subversion test on RHEL 9.0b.

Co-authored-by: Matt Martz <matt@sivel.net>
Co-authored-by: Matt Davis <mrd@redhat.com>
3 years ago
Rick Elrod d8c20a73a4
[ansible-test] Add Fedora 34, update Fedora 33 (#74506)
Change:
- Added Fedora 34 container image to docker.txt
- Dropped Fedora 32 from CI
- Added Fedora 34 to CI
- Updated Fedora 32 and 33 containers for ssh-related fixes
- Move cron fix from 698eae3f3d into
  cron_setup and make it more generic; it can affect modern distros too.

Test Plan:
- ci_complete

Signed-off-by: Rick Elrod <rick@elrod.me>
3 years ago
Amin Vakil fdee5ca16d
Add cacheonly option to yum and dnf modules (#73820)
* Add integration test

* Add changelog

Co-authored-by: Matt Clay <matt@mystile.com>
3 years ago
Rick Elrod b96732fa6b [ansible-test] Add Fedora 33 support and drop F31
Change:
- Changes to make F33 work with current tests
- Add F33 to docker.txt
- Add F33 to AZP config

Test Plan:
- ci_complete

Signed-off-by: Rick Elrod <rick@elrod.me>
4 years ago
Amin Vakil 98d10cd6ee
Fix conditional for the dnf nobest test (#71805) 4 years ago
Rick Elrod fdf80690e4
[dnf] accumulate update filters (#71726)
Change:
- Previously when `security: true` and `bugfix: true` were both given,
  only security updates would get applied. Filters now accumulate so
  that both get applied in this case.

Test Plan:
- New integration tests for both check_mode and not. These tests make
  use of a contrived yum repository which is stored in S3.

Tickets:
- Fixes #70854

Signed-off-by: Rick Elrod <rick@elrod.me>
Co-authored-by: Matt Martz <matt@sivel.net>

Co-authored-by: Matt Martz <matt@sivel.net>
4 years ago
Rick Elrod 9bea33ffa3
[dnf] ensure packages are gpg-verified (#71537)
Change:
- By default the dnf API does not gpg-verify packages. This is a feature
  that is executed in its CLI code. It never made it into Ansible's
  usage of the API, so packages were previously not verified.
- This fixes CVE-2020-14365.

Test Plan:
- New integration tests

Signed-off-by: Rick Elrod <rick@elrod.me>
4 years ago
Amin Vakil 9d2982549d
dnf: Add nobest option (#70318)
* dnf: Add nobest option

* dnf: Fix indent, add nobest specifically to dnf not yum

* Add changelog for dnf: add nobest option

* dnf: Add nobest to yumdnf module argument_spec

* dnf: remove nobest from module paramaters in yumdnf.py

* dnf: Add test for nobest option

* dnf: Cleanup packages in nobest test at last

* dnf: Cleanup manually added repos in nobest test at last

* dnf: Remove dnf-plugins-core as well in nobest test

* dnf: Change nobest release version to 2.11

* Change changelog number according to change in PR number

* Change changelog number according to change in PR number
4 years ago
Hideki Saito 79ab798427 Enable logging using setup_loggers() API in dnf-4.2.17-6 or later
- Fixed issue #28061
- https://bugzilla.redhat.com/show_bug.cgi?id=1788212

Signed-off-by: Hideki Saito <saito@fgrep.org>
4 years ago
Rick Elrod eb65a01598 Enable dnf integration tests on CentOS 8
Change:
We were only testing dnf on RHEL previously.
Test on CentOS 8 as well.

Test Plan:
Ran locally in docker.

Signed-off-by: Rick Elrod <rick@elrod.me>
4 years ago
Sam Doran 16d6fcf514
Improve dnf test formatting and fix RHEL 8 module name (#58648)
- use single include_vars task rather than multiple set_fact tasks
- use multi-line YAML to break up long conditionals
- use version() test rather than direct comparisions
- use different appstream package on RHEL since '@swig:3.0/default' is not working in the GA
5 years ago
Matt Clay a20d0d1afb
Fix dnf integration test issues. (#51251)
* update/enable rhel8 beta integration tests for yum and dnf

Signed-off-by: Adam Miller <admiller@redhat.com>

* fix typo in conditional for dnf/tasks/main.yml

Signed-off-by: Adam Miller <admiller@redhat.com>

* fix var scoping for environment checks

Signed-off-by: Adam Miller <admiller@redhat.com>

* Disable install via path on RHEL.
6 years ago
Jordan Borean 198f1e1bea
Revert "Fixes #49362 module dnf: install python3-dnf preferably over python2-dnf. (#49402)" (#49633)
This reverts commit 3247eec97a.
6 years ago
Robert de Bock 3247eec97a Fixes #49362 module dnf: install python3-dnf preferably over python2-dnf. (#49402)
* Create python3and2

Adding tests to see if dnf still works when python-2 and python-3 are installed.

* Update main.yml

Include the tests that run on python 2 and python 3, based on the package manager.

* Update dnf.py

Use python3-dnf by default, otherwise python2-dnf.

* Rename python3and2 to python3and2.yml

Rename.
6 years ago
Adam Miller 4a06e95671 dnf to support modularity module appstream specs
Fixes #48743

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Peter Janes 67493ebdee Add a 'releasever' parameter for dnf. Fixes #33314. (#37493)
* Add a 'releasever' parameter for dnf. #33314

* Set a default value for releasever

* Fix a variable name typo
6 years ago
Martin Krizek 3c1fb9b547
Use custom rpm repo script for dnf testing (#32737)
* Use custom rpm repo script for dnf testing

* Switch to a jinja2 test
7 years ago
berenddeschouwer b1c57ea443 Installroot OS version check fix (#20180)
Cast to int before checking the OS version.
This prevents the DNF tests from running on
Fedora < 23
8 years ago
Toshio Kuratomi cd2516bf8d Revert "Revert "Add --installroot to YUM and DNF modules, issue #11310""
This reverts commit b73ddd5212.
8 years ago
Matt Clay b73ddd5212 Revert "Add --installroot to YUM and DNF modules, issue #11310" 8 years ago
berenddeschouwer 1fdcda0996 Add --installroot to YUM and DNF modules, issue #11310 (#19861)
* Add --installroot to YUM and DNF modules, issue #11310

This continues ansible-modules-core#1558, and
ansible-modules-core#1669

Allow specifying installroot for the yum and dnf modules
to install and remove packages in a location other than /.

* Remove empty aliases

* Simpler installroot set default logic
8 years ago
Adrien Vergé 0e834fc9e4 Fix cosmetic problems in YAML source
This change corrects problems reported by the `yamllint` linter.

Since key duplication problems were removed in 4d48711, this commit
mainly fixes trailing spaces and extra empty lines at beginning/end of
files.
8 years ago
Toshio Kuratomi 02859a3e32 Add tests for dnf modelled after the yum tests (#18226) 8 years ago