mirror of
https://github.com/saltstack-formulas/mysql-formula.git
synced 2025-04-16 01:30:25 +00:00
bugfix: remove anonymous accounts on all os, fix condition os_family for mysql root password
This commit is contained in:
parent
a9680e9bc9
commit
24f54ee98c
1 changed files with 2 additions and 2 deletions
|
@ -24,13 +24,14 @@ mysql_debconf:
|
|||
- pkg: mysqld
|
||||
- require:
|
||||
- pkg: mysql_debconf_utils
|
||||
{% elif os_family == 'RedHat' or 'Suse' %}
|
||||
{% elif os_family == 'RedHat' or os_family == 'Suse' or os_family == 'Arch' %}
|
||||
mysql_root_password:
|
||||
cmd.run:
|
||||
- name: mysqladmin --user root password '{{ mysql_root_password|replace("'", "'\"'\"'") }}'
|
||||
- unless: mysql --user root --password='{{ mysql_root_password|replace("'", "'\"'\"'") }}' --execute="SELECT 1;"
|
||||
- require:
|
||||
- service: mysqld
|
||||
{% endif %}
|
||||
|
||||
include:
|
||||
- mysql.python
|
||||
|
@ -55,7 +56,6 @@ mysql_delete_anonymous_user_{{ host }}:
|
|||
{%- endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
mysqld:
|
||||
pkg.installed:
|
||||
|
|
Loading…
Add table
Reference in a new issue