Port the update-package playbook to support dnf on F22+
This commit is contained in:
parent
1c183896c8
commit
e5bb66d76d
1 changed files with 11 additions and 2 deletions
|
@ -17,8 +17,17 @@
|
|||
|
||||
- name: yum update {{ package }} from main repo
|
||||
yum: name="{{ package }}" state=latest update_cache=yes
|
||||
when: not testing
|
||||
when: not testing and ansible_distribution_major_version|int < 22
|
||||
|
||||
- name: yum update {{ package }} from testing repo
|
||||
yum: name="{{ package }}" state=latest enablerepo=infrastructure-testing update_cache=yes
|
||||
when: testing
|
||||
when: testing and ansible_distribution_major_version|int < 22
|
||||
|
||||
- name: yum update {{ package }} from main repo
|
||||
dnf: name="{{ package }}" state=latest update_cache=yes
|
||||
when: not testing and ansible_distribution_major_version|int > 22
|
||||
|
||||
- name: yum update {{ package }} from testing repo
|
||||
dnf: name="{{ package }}" state=latest enablerepo=infrastructure-testing update_cache=yes
|
||||
when: testing and ansible_distribution_major_version|int > 22
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue