From e5bb66d76d3d480a02e9c161a8263b5bf8568dd3 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Tue, 17 Nov 2015 15:31:51 +0100 Subject: [PATCH] Port the update-package playbook to support dnf on F22+ --- playbooks/manual/update-packages.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/playbooks/manual/update-packages.yml b/playbooks/manual/update-packages.yml index 4c86a730a5..ac39602d91 100644 --- a/playbooks/manual/update-packages.yml +++ b/playbooks/manual/update-packages.yml @@ -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 +