diff --git a/ansible/deploy.yaml b/ansible/deploy.yaml
index 22e902e75100e13dfb028bc134342125150dae63..28d42ef2b9f8b550073800c8ca62dccb14248bdf 100644
--- a/ansible/deploy.yaml
+++ b/ansible/deploy.yaml
@@ -124,11 +124,15 @@
         command: "collectstatic"
         app_path: "/home/{{ deploy_user_name }}/ippidb-web/ippisite"
         settings: "ippisite.{{ ansible_hostname }}_settings"
+      environment:
+        BABEL_LIBDIR: '/usr/lib64/openbabel/'
     - 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-web/ippisite"
         settings: "ippisite.{{ ansible_hostname }}_settings"
+      environment:
+        BABEL_LIBDIR: '/usr/lib64/openbabel/'
     - name: add line in generated WSGI handler script to set DJANGO_SETTINGS_MODULE and BABEL_LIBDIR for openbabel formats
       blockinfile:
         path: /etc/ippidb-80/handler.wsgi
@@ -145,6 +149,8 @@
         command: "migrate"
         app_path: "/home/{{ deploy_user_name }}/ippidb-web/ippisite"
         settings: "ippisite.{{ ansible_hostname }}_settings"
+      environment:
+        BABEL_LIBDIR: '/usr/lib64/openbabel/'
     # FIXME: this should obviously be removed before switching to prod. env.
     - name: install passlib for htpasswd in ansible
       yum: name=python-passlib state=installed