blob: a36c17a2020d6d2e8732120b64ef3f23341f09ae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
- hosts: localhost
tasks:
- block:
- command: "dnf install -y 'dnf-command(copr)'"
- name: Test against dnf5 nightly build to detect any issues early
command: dnf copr enable -y rpmsoftwaremanagement/dnf-nightly
- name: Ensure module deps are not installed
command: dnf remove -y python3-libdnf5
- name: Test the auto_install_module_deps option
dnf5:
name: sos
auto_install_module_deps: false
register: r
ignore_errors: true
- assert:
that:
- r is failed
- r.msg is contains("Could not import the libdnf5 python module")
# Now the first dnf5 task in the dnf role should auto install python3-libdnf5 as
# auto_install_module_deps is true by default.
- include_role:
name: dnf
vars:
dnf5: true
dnf_log_files:
- /var/log/dnf5.log
when: ansible_distribution == 'Fedora'
module_defaults:
dnf:
use_backend: dnf5
|