mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
dnf/yum - added install_weak_deps option (#50525)
* dnf/yum - added install_weak_deps option * skip creating weak dep packages if rpm doesn't support it * fix rpm check for older hosts
This commit is contained in:
@@ -43,28 +43,12 @@
|
||||
with_items: "{{mysql_packages}}"
|
||||
when: ansible_pkg_mgr == 'yum'
|
||||
|
||||
- block:
|
||||
# This is required as mariadb-server has a weak dependency on Python 2 which causes the test to break on Py3 hosts
|
||||
- name: create test dnf.conf file to ignore weak dependencies
|
||||
copy:
|
||||
content: |
|
||||
[main]
|
||||
install_weak_deps=False
|
||||
dest: '{{ output_dir }}/dnf.conf'
|
||||
register: test_dnf_conf_copy
|
||||
|
||||
- name: install mysqldb_test rpm dependencies
|
||||
dnf:
|
||||
name: '{{ item }}'
|
||||
state: latest
|
||||
conf_file: '{{ test_dnf_conf_copy.dest }}'
|
||||
with_items: "{{mysql_packages}}"
|
||||
|
||||
always:
|
||||
- name: remove test dnf.conf file
|
||||
file:
|
||||
path: '{{ test_dnf_conf_copy.dest }}'
|
||||
state: absent
|
||||
- name: install mysqldb_test rpm dependencies
|
||||
dnf:
|
||||
name: '{{ item }}'
|
||||
state: latest
|
||||
install_weak_deps: False # mariadb-server has a weak dep on python2 which break Python 3 test environments
|
||||
with_items: "{{mysql_packages}}"
|
||||
when: ansible_pkg_mgr == 'dnf'
|
||||
|
||||
- name: install mysqldb_test debian dependencies
|
||||
|
||||
Reference in New Issue
Block a user