Skip to content

Instantly share code, notes, and snippets.

@dmsimard
Created October 15, 2018 23:44
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/7f4ac34787ecd76b72b3a8e7907c1db8 to your computer and use it in GitHub Desktop.
Save dmsimard/7f4ac34787ecd76b72b3a8e7907c1db8 to your computer and use it in GitHub Desktop.
ara-mysql
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;"
yum -y install mariadb-server
systemctl enable --now 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