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

View file

@ -24,7 +24,7 @@ Ubuntu:
CentOS: CentOS:
# https://mariadb.com/blog/rhel7-transition-mysql-mariadb-first-look # 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 fork = 'mariadb' %}
{% set service = 'mariadb' %} {% set service = 'mariadb' %}
{%- else %} {%- else %}

View file

@ -6,7 +6,7 @@ include:
# Completely ignore non-RHEL based systems # Completely ignore non-RHEL based systems
# TODO: Add Debian and Suse systems. # TODO: Add Debian and Suse systems.
# TODO: Allow user to specify MySQL version and alter yum repo file accordingly. # 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 %} {% if grains['osmajorrelease']|int == 5 %}
{% set rpm_source = "http://repo.mysql.com/mysql57-community-release-el5.rpm" %} {% set rpm_source = "http://repo.mysql.com/mysql57-community-release-el5.rpm" %}
{% elif grains['osmajorrelease']|int == 6 %} {% elif grains['osmajorrelease']|int == 6 %}

View file

@ -29,7 +29,7 @@ mysql_debconf:
- require: - require:
- pkg: mysql_debconf_utils - 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: mysql_password_debconf:
debconf.set: debconf.set: