mirror of
https://github.com/saltstack-formulas/mysql-formula.git
synced 2025-04-17 10:10:30 +00:00
Adjust check to mysql.version due to compile fail on Arch.
This commit is contained in:
parent
ff728b2d22
commit
6ff6974640
1 changed files with 3 additions and 3 deletions
|
@ -64,7 +64,7 @@ mysql_delete_anonymous_user_{{ host }}:
|
||||||
# on arch linux: inital mysql datadirectory is not created
|
# on arch linux: inital mysql datadirectory is not created
|
||||||
mysql_install_datadir:
|
mysql_install_datadir:
|
||||||
cmd.run:
|
cmd.run:
|
||||||
{% if pkg.version >= 5.7 %}
|
{% if mysql.version >= 5.7 %}
|
||||||
- name: mysqld --initialize-insecure --user=mysql --basedir=/usr --datadir=/var/lib/mysql
|
- name: mysqld --initialize-insecure --user=mysql --basedir=/usr --datadir=/var/lib/mysql
|
||||||
{% else %}
|
{% else %}
|
||||||
- name: mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
|
- name: mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
|
||||||
|
@ -88,7 +88,7 @@ mysqld-packages:
|
||||||
- debconf: mysql_debconf
|
- debconf: mysql_debconf
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if os_family == 'RedHat' or 'Suse' and pkg.version >= 5.7 %}
|
{% if os_family == 'RedHat' or 'Suse' and mysql.version >= 5.7 %}
|
||||||
# Initialize mysql database with --initialize-insecure option before starting service so we don't get locked out.
|
# Initialize mysql database with --initialize-insecure option before starting service so we don't get locked out.
|
||||||
mysql_initialize:
|
mysql_initialize:
|
||||||
cmd.run:
|
cmd.run:
|
||||||
|
@ -105,7 +105,7 @@ mysqld:
|
||||||
- enable: True
|
- enable: True
|
||||||
- require:
|
- require:
|
||||||
- pkg: {{ mysql.server }}
|
- pkg: {{ mysql.server }}
|
||||||
{% if os_family == 'RedHat' or 'Suse' and pkg.version >= 5.7 %}
|
{% if os_family == 'RedHat' or 'Suse' and mysql.version >= 5.7 %}
|
||||||
- cmd: mysql_initialize
|
- cmd: mysql_initialize
|
||||||
{% endif %}
|
{% endif %}
|
||||||
- watch:
|
- watch:
|
||||||
|
|
Loading…
Add table
Reference in a new issue