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
This commit is contained in:
parent
d7e0e8f88f
commit
b33f893567
|
@ -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…
Reference in New Issue