Skip to content
Snippets Groups Projects
Commit 54a59f3a authored by Hervé  MENAGER's avatar Hervé MENAGER
Browse files

ansible WIP, restrict access by IP and collect static as ippidb

Former-commit-id: f9e46c934f318c2c40bed97e57781ff342159101
parent 41af071f
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,7 @@
- name: install python requirements
pip: requirements=/home/ippidb/iPPIDB/ippisite/requirements.txt extra_args=--upgrade executable=pip3
- name: collect static files
become_user: ippidb
django_manage:
command: "collectstatic"
app_path: "/home/ippidb/iPPIDB/ippisite"
......@@ -23,6 +24,11 @@
django_manage:
command: "runmodwsgi --setup-only --port=80 --user ippidb --group wheel --server-root=/etc/ippidb-80"
app_path: "/home/ippidb/iPPIDB/ippisite"
- name: restrict access to the web server to specific IPs
lineinfile: dest=/etc/ippidb-80/httpd.conf
regexp=''
insertafter=EOF
line='<Location '/'>\nRequire all denied\nRequire ip 10.6.108.60\nRequire ip 157.99\n</Location>\n'
- name: copy systemd service file for IPPIDB-web
copy:
remote_src: true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment