osmajorrelease is an int now

This commit is contained in:
Daniel Wallace 2017-09-21 08:35:12 -06:00
parent 24d74d5731
commit 41044a4698
No known key found for this signature in database
GPG key ID: 5FA5E5544F010D48
2 changed files with 5 additions and 5 deletions

View file

@ -92,7 +92,7 @@ Debian:
!includedir /etc/mysql/conf.d/
CentOS:
# https://mariadb.com/blog/rhel7-transition-mysql-mariadb-first-look
{%- if salt['grains.get']('osmajorrelease') in ['7'] %}
{%- if salt['grains.get']('osmajorrelease')|int in [7] %}
{% set mysql_engine = 'mariadb' %}
{% set mysql_service = 'mariadb' %}
{%- else %}
@ -123,7 +123,7 @@ CentOS:
symbolic_links: 0
RedHat:
# https://mariadb.com/blog/rhel7-transition-mysql-mariadb-first-look
{%- if salt['grains.get']('osmajorrelease') in ['7'] %}
{%- if salt['grains.get']('osmajorrelease')|int in [7] %}
{% set mysql_engine = 'mariadb' %}
{% set mysql_service = 'mariadb' %}
{%- else %}

View file

@ -8,11 +8,11 @@ include:
# TODO: Add Debian and Suse systems.
# TODO: Allow user to specify MySQL version and alter yum repo file accordingly.
{% if grains['os_family'] == 'RedHat' %}
{% if grains['osmajorrelease'][0] == '5' %}
{% if grains['osmajorrelease']|int == 5 %}
{% set rpm_source = "http://repo.mysql.com/mysql57-community-release-el5.rpm" %}
{% elif grains['osmajorrelease'][0] == '6' %}
{% elif grains['osmajorrelease']|int == 6 %}
{% set rpm_source = "http://repo.mysql.com/mysql57-community-release-el6.rpm" %}
{% elif grains['osmajorrelease'][0] == '7' %}
{% elif grains['osmajorrelease']|int == 7 %}
{% set rpm_source = "http://repo.mysql.com/mysql57-community-release-el7.rpm" %}
{% endif %}
{% endif %}