diff --git a/ansible/deploy.yaml b/ansible/deploy.yaml index 3008b6b2a907f848aa83793f097f1016f42d155d..7ae4e30b12ccb40d4c6fcd2fa25107a3a4c6e10b 100644 --- a/ansible/deploy.yaml +++ b/ansible/deploy.yaml @@ -75,6 +75,11 @@ django_manage: command: "runmodwsgi --setup-only --port=80 --user ippidb --group wheel --server-root=/etc/ippidb-80" app_path: "/home/{{ deploy_user_name }}/iPPIDB/ippisite" + - name: create or update database + become_user: "{{ deploy_user_name }}" + django_manage: + command: "migrate" + app_path: "/home/{{ deploy_user_name }}/iPPIDB/ippisite" # FIXME: this should obviously be removed before switching to prod. env. - name: restrict access to the web server to specific IPs lineinfile: dest=/etc/ippidb-80/httpd.conf