From 2729e2acb18c0e878cbd893a31fd00ec0b15397a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20=20MENAGER?= <herve.menager@pasteur.fr> Date: Wed, 13 Sep 2017 11:04:49 +0200 Subject: [PATCH] modify ansible script to set DJANGO settings at the top of file Former-commit-id: fe649cab10820a40938455a39c8f2e8a8833182b --- ansible/deploy.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ansible/deploy.yaml b/ansible/deploy.yaml index f32f360f..9378d420 100644 --- a/ansible/deploy.yaml +++ b/ansible/deploy.yaml @@ -80,8 +80,11 @@ - name: add line in generated WSGI handler script to set DJANGO_SETTINGS_MODULE blockinfile: path: /etc/ippidb-80/handler.wsgi + insert before: BOF content: | - os.environ['DJANGO_SETTINGS_MODULE'] = 'ippisite.{{ ansible_hostname }}_settings' + # added by ansible deployment script to use the right django settings file + import os + os.environ['DJANGO_SETTINGS_MODULE'] = 'ippisite.hub16_settings' - name: create or update database become_user: "{{ deploy_user_name }}" django_manage: -- GitLab