Browse Source

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
changes/34/600334/2
yatin 4 years ago
parent
commit
b33f893567
  1. 4
      tasks/docker-update.yml

4
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

Loading…
Cancel
Save