[nginx] allow setting credentials to a nginx server
parent
6ee4d8b44d
commit
3fceaeb836
|
@ -2,6 +2,8 @@
|
||||||
loc_nginx:
|
loc_nginx:
|
||||||
default_server: lists.crans.org
|
default_server: lists.crans.org
|
||||||
default_ssl_server: lists.crans.org
|
default_ssl_server: lists.crans.org
|
||||||
|
auth_passwd:
|
||||||
|
Stop: "$apr1$NXaV5H7Q$J3ora3Jo5h775Y1nm93PN1"
|
||||||
servers:
|
servers:
|
||||||
- server_name:
|
- server_name:
|
||||||
- lists.crans.org
|
- lists.crans.org
|
||||||
|
|
|
@ -4,14 +4,8 @@
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
dest: "{{ item.dest }}"
|
dest: "{{ item.dest }}"
|
||||||
loop:
|
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
|
- src: nginx/snippets/fastcgi-mailman.conf.j2
|
||||||
dest: /etc/nginx/snippets/fastcgi-mailman.conf
|
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
|
- src: var/www/robots.txt.j2
|
||||||
dest: /var/www/robots.txt
|
dest: /var/www/robots.txt
|
||||||
- src: var/www/custom_401.html.j2
|
- src: var/www/custom_401.html.j2
|
||||||
|
|
|
@ -70,3 +70,9 @@
|
||||||
src: update-motd.d/05-service.j2
|
src: update-motd.d/05-service.j2
|
||||||
dest: /etc/update-motd.d/05-nginx
|
dest: /etc/update-motd.d/05-nginx
|
||||||
mode: 0755
|
mode: 0755
|
||||||
|
|
||||||
|
- name: Install passwords
|
||||||
|
template:
|
||||||
|
src: nginx/passwd.j2
|
||||||
|
dest: /etc/nginx/passwd
|
||||||
|
mode: 0644
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
{{ ansible_header | comment }}
|
||||||
|
{% for user, hash in nginx.auth_passwd -%}
|
||||||
|
{{ user }}: {{ hash }}
|
||||||
|
{% endfor -%}
|
Loading…
Reference in New Issue