Skip to content
Snippets Groups Projects
Commit 3fceaeb8 authored by ynerant's avatar ynerant Committed by ynerant
Browse files

[nginx] allow setting credentials to a nginx server

parent 6ee4d8b4
No related branches found
No related tags found
1 merge request!165Nginx
......@@ -2,6 +2,8 @@
loc_nginx:
default_server: lists.crans.org
default_ssl_server: lists.crans.org
auth_passwd:
Stop: "$apr1$NXaV5H7Q$J3ora3Jo5h775Y1nm93PN1"
servers:
- server_name:
- lists.crans.org
......
......@@ -4,14 +4,8 @@
src: "{{ item.src }}"
dest: "{{ item.dest }}"
loop:
- src: nginx/sites-available/mailman.j2
dest: /etc/nginx/sites-available/mailman
- src: nginx/mailman_passwd.j2
dest: /etc/nginx/mailman_passwd
- src: nginx/snippets/fastcgi-mailman.conf.j2
dest: /etc/nginx/snippets/fastcgi-mailman.conf
- src: nginx/snippets/options-ssl.conf.j2
dest: /etc/nginx/snippets/options-ssl.conf
- src: var/www/robots.txt.j2
dest: /var/www/robots.txt
- src: var/www/custom_401.html.j2
......
......@@ -70,3 +70,9 @@
src: update-motd.d/05-service.j2
dest: /etc/update-motd.d/05-nginx
mode: 0755
- name: Install passwords
template:
src: nginx/passwd.j2
dest: /etc/nginx/passwd
mode: 0644
{{ ansible_header | comment }}
{% for user, hash in nginx.auth_passwd -%}
{{ user }}: {{ hash }}
{% endfor -%}
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