From b2c5aacd3ebc9aac4ea03bdde62e836f5c37ce0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20=20MENAGER?= <herve.menager@pasteur.fr> Date: Tue, 12 Sep 2017 11:42:01 +0200 Subject: [PATCH] create or update schema for the db on ansible deployment Former-commit-id: 1d6b183e033698e06ceff44e08e8d843e7257f35 --- ansible/deploy.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ansible/deploy.yaml b/ansible/deploy.yaml index 3008b6b2..7ae4e30b 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 -- GitLab