Skip to content

Commit 1f02eed

Browse files
committed
Support recent Fedoras' dnf package manager
Dnf replaced Yum (keeping the same cli interface though) for some time on Fedora. Likewise, the ansible RPM provided in Fedora (23+) doesn't include the "yum" Ansible module, so we must use the "dnf" module there (which, thanksfully, has the same arguments as the "yum" module). Let's use action: "{{ ansible_pkg_mgr }} [...]" on RPM based distributions, to maintain compatibility with both yum and dnf.
1 parent f86d4a6 commit 1f02eed

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tasks/redhat/main.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
- installation
1616

1717
- name: install RPM
18-
yum:
19-
name="{{ oracle_java_dir_source }}/{{ oracle_java_rpm_filename }}"
20-
state=present
18+
action: "{{ ansible_pkg_mgr }} name={{ oracle_java_dir_source }}/{{ oracle_java_rpm_filename }} state=present"
2119
when: not oracle_java_task_rpm_download|skipped
2220
sudo: yes
2321
tags:

0 commit comments

Comments
 (0)