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
This commit is contained in:
Leif Madsen 2017-05-23 14:33:50 -04:00
parent 905e9cae12
commit 4200c39121
No known key found for this signature in database
GPG Key ID: 409E6FD5A5D30321

View File

@ -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"