Last active
October 2, 2018 22:01
-
-
Save dmsimard/cb28393b10c75a018d42bc30b1f199ab to your computer and use it in GitHub Desktop.
ara-mysql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
yum -y install mariadb-server | |
systemctl enable --now mariadb | |
mysql -e "CREATE DATABASE ara;" | |
mysql -e "CREATE USER ara@localhost IDENTIFIED BY 'password';" | |
mysql -e "GRANT ALL PRIVILEGES ON ara.* TO ara@localhost;" | |
mysql -e "FLUSH PRIVILEGES;" | |
virtualenv ara | |
. ara/bin/activate | |
pip install ara | |
pip install PyMySQL | |
export ARA_DATABASE="mysql+pymysql://ara:password@localhost/ara" | |
source <(python -m ara.setup.env) | |
cat << EOF > /tmp/playbook.yml | |
- hosts: localhost | |
gather_facts: no | |
tasks: | |
- debug: | |
msg: hello world | |
EOF | |
ansible-playbook /tmp/playbook.yml | |
mysql -e "use ara; select path from playbooks;" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment