playbook mysql fixes

This commit is contained in:
Josh Brower
2020-05-11 22:39:13 -04:00
parent b658f7133b
commit 09ce3e088a
2 changed files with 36 additions and 44 deletions

View File

@@ -0,0 +1,5 @@
{%- set MYSQLPASS = salt['pillar.get']('secrets:mysql', None) -%}
#!/bin/sh
docker cp /opt/so/saltstack/salt/playbook/files/playbook_db_init.sql so-mysql:/tmp/playbook_db_init.sql
docker exec so-mysql /bin/bash -c "/usr/bin/mysql -b -uroot -p{{MYSQLPASS}} < /tmp/playbook_db_init.sql"