From 4200c39121c7c140378a472c5fa9212f18e15079 Mon Sep 17 00:00:00 2001 From: Leif Madsen Date: Tue, 23 May 2017 14:33:50 -0400 Subject: [PATCH] Fix when clause in pymysql check on CentOS The when clause that checks if pymysql should be installed from pip is incorrectly doing an integer comparison against a string value from the ansible_distribution_major_version variable. This change resolves that issue by using the version_compare() cast like was being done for Ubuntu. Related to: #1665279 Change-Id: Ia3a4bf789cc8e19d7b1f7854cb3ae71c2b8d47e1 --- playbooks/roles/bifrost-ironic-install/tasks/install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/roles/bifrost-ironic-install/tasks/install.yml b/playbooks/roles/bifrost-ironic-install/tasks/install.yml index 867fbab86..1a4c05c7b 100644 --- a/playbooks/roles/bifrost-ironic-install/tasks/install.yml +++ b/playbooks/roles/bifrost-ironic-install/tasks/install.yml @@ -104,7 +104,7 @@ when: - skip_install is not defined - enable_venv | bool == false - - (ansible_distribution == 'CentOS' and ansible_distribution_major_version <= 7) or + - (ansible_distribution == 'CentOS' and ansible_distribution_major_version|version_compare('7', '<=')) or (ansible_distribution == 'Ubuntu' and ansible_distribution_version|version_compare('14.10', '==')) - name: "Install Ironic using pip"