Skip to content

Instantly share code, notes, and snippets.

@dmsimard
Last active October 2, 2018 22:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmsimard/cb28393b10c75a018d42bc30b1f199ab to your computer and use it in GitHub Desktop.
Save dmsimard/cb28393b10c75a018d42bc30b1f199ab to your computer and use it in GitHub Desktop.
ara-mysql
#!/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