mirror of
https://github.com/saltstack-formulas/mysql-formula.git
synced 2025-04-17 10:10:30 +00:00
Requisites for the failed test state killed additional execution
This commit is contained in:
parent
6b05b33a8a
commit
f0e80c60da
1 changed files with 1 additions and 7 deletions
|
@ -12,6 +12,7 @@ mysql_missing_root_password:
|
||||||
- changes: False
|
- changes: False
|
||||||
- result: False
|
- result: False
|
||||||
- comment: 'MySQL pillar is missing root password data. A random password will be used.'
|
- comment: 'MySQL pillar is missing root password data. A random password will be used.'
|
||||||
|
- order: 1
|
||||||
|
|
||||||
{% set mysql_root_password = salt['test.rand_str'](64) %}
|
{% set mysql_root_password = salt['test.rand_str'](64) %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -26,10 +27,6 @@ mysql_debconf:
|
||||||
'mysql-server/start_on_boot': {'type': 'boolean', 'value': 'true'}
|
'mysql-server/start_on_boot': {'type': 'boolean', 'value': 'true'}
|
||||||
- require_in:
|
- require_in:
|
||||||
- pkg: mysqld
|
- pkg: mysqld
|
||||||
{% if 'mysql:server:root_password' not in pillar %}
|
|
||||||
- require:
|
|
||||||
- test: mysql_missing_root_password
|
|
||||||
{% endif %}
|
|
||||||
{% elif os == 'CentOS' %}
|
{% elif os == 'CentOS' %}
|
||||||
mysql_root_password:
|
mysql_root_password:
|
||||||
cmd.run:
|
cmd.run:
|
||||||
|
@ -37,9 +34,6 @@ mysql_root_password:
|
||||||
- unless: mysql --user root --password='{{ mysql_root_password|replace("'", "'\"'\"'") }}' --execute="SELECT 1;"
|
- unless: mysql --user root --password='{{ mysql_root_password|replace("'", "'\"'\"'") }}' --execute="SELECT 1;"
|
||||||
- require:
|
- require:
|
||||||
- service: mysqld
|
- service: mysqld
|
||||||
{% if 'mysql:server:root_password' not in pillar %}
|
|
||||||
- test: mysql_missing_root_password
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% for host in ['localhost', salt['grains.get']('fqdn')] %}
|
{% for host in ['localhost', salt['grains.get']('fqdn')] %}
|
||||||
mysql_delete_anonymous_user_{{ host }}:
|
mysql_delete_anonymous_user_{{ host }}:
|
||||||
|
|
Loading…
Add table
Reference in a new issue