Merge pull request #177 from Achimh3011/fix-command-prompt-when-loading-schema

Avoid -p option if password is empty.
This commit is contained in:
alxwr 2018-03-19 21:59:19 +01:00 committed by GitHub
commit 95c58871f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -45,7 +45,7 @@ include:
{{ state_id }}_load:
cmd.wait:
- name: mysql -u {{ mysql_salt_user }} -h{{ mysql_host }} -p{{ mysql_salt_pass }} {{ database }} < /etc/mysql/{{ database }}.schema
- name: mysql -u {{ mysql_salt_user }} -h{{ mysql_host }} {% if mysql_salt_pass %}-p{% endif %}{{ mysql_salt_pass }} {{ database }} < /etc/mysql/{{ database }}.schema
- watch:
- file: {{ state_id }}_schema
- mysql_database: {{ state_id }}