Playbook db init fix

This commit is contained in:
Josh Brower
2020-07-14 09:09:47 -04:00
parent 09c460dbe9
commit b884e09e7a
2 changed files with 6 additions and 15 deletions

View File

@@ -6,18 +6,9 @@
{%- set MYSQLPASS = salt['pillar.get']('secrets:mysql', None) -%}
{%- set PLAYBOOKPASS = salt['pillar.get']('secrets:playbook', None) -%}
{% if salt['mysql.db_exists']('playbook') %}
#Playbook database exists - Do nothing
{% else %}
salt://playbook/files/playbook_db_init.sh:
cmd.script:
- cwd: /root
- template: jinja
'sleep 5':
cmd.run
{% endif %}
include:
- mysql
create_playbookdbuser:
module.run:
- mysql.user_create: