feat(linux): archlinux support (no osmajorrelase grain)

This commit is contained in:
N 2019-08-03 15:15:24 +01:00
parent 5d42846e0c
commit 4b4ad882c8
No known key found for this signature in database
GPG key ID: 55A292EAB4E54067
4 changed files with 7 additions and 7 deletions

View file

@ -2,7 +2,7 @@
#
Debian:
{% if salt['grains.get']('osmajorrelease')|int >= 9 %}
{% if 'osmajorrelease' in grains and salt['grains.get']('osmajorrelease')|int >= 9 %}
serverpkg: mariadb-server
service: mariadb
clientpkg: mariadb-client
@ -42,13 +42,13 @@ Debian:
key_buffer_size: 16M
append: |
!includedir /etc/mysql/conf.d/
# {% if salt['grains.get']('osmajorrelease')|int >= 9 -%}
# {% if 'osmajorrelease' in grains and salt['grains.get']('osmajorrelease')|int >= 9 -%}
# !includedir /etc/mysql/mariadb.conf.d/
# {%- endif %}
RedHat:
#https://mariadb.com/blog/rhel7-transition-mysql-mariadb-first-look
{%- if salt['grains.get']('osmajorrelease')|int in [7] %}
{%- if 'osmajorrelease' in grains and salt['grains.get']('osmajorrelease')|int in [7] %}
{% set fork = 'mariadb' %}
serverpkg: mariadb-server
service: mariadb
@ -75,7 +75,7 @@ RedHat:
Suse:
serverpkg: mariadb
clientpkg: mariadb-client
{%- if salt['grains.get']('osmajorrelease')|int == 42 %}
{%- if 'osmajorrelease' in grains and salt['grains.get']('osmajorrelease')|int == 42 %}
# "old" package name up to Leap 42.x
pythonpkg: python-PyMySQL
{% else %}

View file

@ -24,7 +24,7 @@ Ubuntu:
CentOS:
# https://mariadb.com/blog/rhel7-transition-mysql-mariadb-first-look
{%- if salt['grains.get']('osmajorrelease')|int in [7] %}
{%- if 'osmajorrelease' in grains and salt['grains.get']('osmajorrelease')|int in [7] %}
{% set fork = 'mariadb' %}
{% set service = 'mariadb' %}
{%- else %}

View file

@ -6,7 +6,7 @@ include:
# Completely ignore non-RHEL based systems
# 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['os_family'] == 'RedHat' and `osmajorrelease` in grains %}
{% if grains['osmajorrelease']|int == 5 %}
{% set rpm_source = "http://repo.mysql.com/mysql57-community-release-el5.rpm" %}
{% elif grains['osmajorrelease']|int == 6 %}

View file

@ -29,7 +29,7 @@ mysql_debconf:
- require:
- pkg: mysql_debconf_utils
{% if salt['grains.get']('osmajorrelease')|int < 9 or not salt['grains.get']('os')|lower == 'debian' %}
{% if 'osmajorrelease' in grains and salt['grains.get']('osmajorrelease')|int < 9 or not salt['grains.get']('os')|lower == 'debian' %}
mysql_password_debconf:
debconf.set: