add a setup script to the ansible role

This commit is contained in:
Andreas Zweili 2017-12-25 22:34:38 +01:00
parent 058dc79bef
commit 78eeb91f03
2 changed files with 9 additions and 0 deletions

View File

@ -29,5 +29,8 @@
- Pillow
executable: pip3
- name: Run the setup script to add some final touches
shell: "/vagrant/ansible/roles/web_AI-5/tasks/setup_scripts.sh"
- name: Restart apache service
service: name=apache2 state=restarted

View File

@ -0,0 +1,6 @@
mysql < /vagrant/sql/04_remove_database.sql
mysql < /vagrant/sql/01_create_database.sql
rm /vagrant/django/didgeridoo/webshop/migrations/*.py
python3 /vagrant/django/didgeridoo/manage.py makemigrations webshop
python3 /vagrant/django/didgeridoo/manage.py migrate
mysql < /vagrant/sql/02_insert_data.sql