diff --git a/ansible/deploy.yaml b/ansible/deploy.yaml
index 7ae4e30b12ccb40d4c6fcd2fa25107a3a4c6e10b..7aaea533fb6df5ae920cccc1da388ca3d7f68bbd 100644
--- a/ansible/deploy.yaml
+++ b/ansible/deploy.yaml
@@ -71,15 +71,18 @@
       django_manage:
         command: "collectstatic"
         app_path: "/home/{{ deploy_user_name }}/iPPIDB/ippisite"
+        settings: "ippisite.{{ ansible_nodename }}_settings"
     - name: create mod_wsgi configuration
       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"
+        settings: "ippisite.{{ ansible_nodename }}_settings"
     - name: create or update database
       become_user: "{{ deploy_user_name }}"
       django_manage:
         command: "migrate"
         app_path: "/home/{{ deploy_user_name }}/iPPIDB/ippisite"
+        settings: "ippisite.{{ ansible_nodename }}_settings"
     # 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