From b33f89356789e9c9dda37c7f95084f1f4088b5d1 Mon Sep 17 00:00:00 2001 From: yatin Date: Thu, 6 Sep 2018 11:22:11 +0530 Subject: [PATCH] Correctly set registry_pkg_manager With https://review.openstack.org/#/c/597153/ registry_pkg_manager was set to dnf for Centos7 as well due to wrong string comparison, This patch convert ansible_distribution_major_version to integer before comparison and fixes the issue. Change-Id: I603c1f932c63d07040e6aa24f1a75eab4e389738 Related-Blueprint: dnf-support --- tasks/docker-update.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/docker-update.yml b/tasks/docker-update.yml index 44be937..48bd938 100644 --- a/tasks/docker-update.yml +++ b/tasks/docker-update.yml @@ -6,12 +6,12 @@ registry_pkg_manager: yum when: - ansible_os_family == 'RedHat' - - ansible_distribution_major_version == 7 + - ansible_distribution_major_version|int == 7 - name: set package manager to dnf set_fact: registry_pkg_manager: dnf - when: (ansible_os_family == 'RedHat' and ansible_distribution_major_version > 7) or (ansible_distribution == 'Fedora') + when: (ansible_os_family == 'RedHat' and ansible_distribution_major_version|int > 7) or (ansible_distribution == 'Fedora') - name: can docker be updated