From c4a9d078bfef9c6b0cc8d609bec86d9cd0c7a0b8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Herv=C3=A9=20=20MENAGER?= <herve.menager@pasteur.fr>
Date: Mon, 15 Jan 2018 21:42:07 +0100
Subject: [PATCH] correct path to http auth passwd file and change http conf
 appended bit

Former-commit-id: 85b9e6503aca88e0161e506eb35609814ceec04d
---
 ansible/deploy.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ansible/deploy.yaml b/ansible/deploy.yaml
index 40e9448b..bf5f1a17 100644
--- a/ansible/deploy.yaml
+++ b/ansible/deploy.yaml
@@ -93,7 +93,7 @@
         settings: "ippisite.{{ ansible_hostname }}_settings"
     # FIXME: this should obviously be removed before switching to prod. env.
     - htpasswd:
-        path: /etc/nginx/passwdfile
+        path: /etc/ippidb-80/passwdfile
         name: ippidb
         password: 'LeroyMerlin' #FIXME FIXME should be secret
         owner: root
@@ -102,7 +102,7 @@
       lineinfile: dest=/etc/ippidb-80/httpd.conf 
                   regexp=''
                   insertafter=EOF
-                  line='<Location '/'>\nRequire all denied\nRequire ip 10.6.108.60\nRequire ip 10.6.107.22\nRequire ip 157.99\n</Location>\n'
+                  line='LoadModule auth_basic_module '${MOD_WSGI_MODULES_DIRECTORY}/mod_auth_basic.so'\nLoadModule authn_core_module '${MOD_WSGI_MODULES_DIRECTORY}/mod_authn_core.so'\nLoadModule authn_file_module '${MOD_WSGI_MODULES_DIRECTORY}/mod_authn_file.so'\nLoadModule authz_core_module '${MOD_WSGI_MODULES_DIRECTORY}/mod_authz_core.so'\nLoadModule authz_user_module '${MOD_WSGI_MODULES_DIRECTORY}/mod_authz_user.so'\n<Location />AuthType Basic\nAuthName "Restricted Files"\nAuthUserFile /etc/ippidb-80/passwords\nRequire valid-user\n</Location>\n'
     - name: copy systemd service file for IPPIDB-web
       copy: 
         remote_src: true
-- 
GitLab