Compare commits

..

2 commits

4 changed files with 23 additions and 15 deletions

View file

@ -17,7 +17,7 @@
- gitea - gitea
- postfix - postfix
- matrix_riot - matrix_riot
- pastebin - privatebin
smtp_host: postfix smtp_host: postfix
smtp_port: 587 smtp_port: 587

View file

@ -1,3 +1,6 @@
nginx:
volume_folder: "{{ volume_root_folder }}/nginx"
ldap: ldap:
domain: "ldap.{{ base_domain }}" domain: "ldap.{{ base_domain }}"

View file

@ -1,8 +1,10 @@
--- ---
- docker_volume: - name: create nginx-proxy volume folders
name: "{{ volume }}" file:
with_items: name: "{{ nginx.volume_folder }}/{{ volume }}"
state: directory
loop:
- conf - conf
- vhost - vhost
- html - html
@ -22,11 +24,11 @@
- "80:80" - "80:80"
- "443:443" - "443:443"
volumes: volumes:
- conf:/etc/nginx/conf.d - "{{ nginx.volume_folder }}/conf:/etc/nginx/conf.d"
- vhost:/etc/nginx/vhost.d - "{{ nginx.volume_folder }}/vhost:/etc/nginx/vhost.d"
- html:/usr/share/nginx/html - "{{ nginx.volume_folder }}/html:/usr/share/nginx/html"
- dhparam:/etc/nginx/dhparam - "{{ nginx.volume_folder }}/dhparam:/etc/nginx/dhparam"
- certs:/etc/nginx/certs:ro - "{{ nginx.volume_folder }}/certs:/etc/nginx/certs:ro"
- /var/run/docker.sock:/tmp/docker.sock:ro - /var/run/docker.sock:/tmp/docker.sock:ro
- name: nginx letsencrypt container - name: nginx letsencrypt container
@ -35,10 +37,11 @@
image: jrcs/letsencrypt-nginx-proxy-companion image: jrcs/letsencrypt-nginx-proxy-companion
restart_policy: always restart_policy: always
volumes: volumes:
- vhost:/etc/nginx/vhost.d - "{{ nginx.volume_folder }}/vhost:/etc/nginx/vhost.d"
- html:/usr/share/nginx/html - "{{ nginx.volume_folder }}/html:/usr/share/nginx/html"
- dhparam:/etc/nginx/dhparam:ro - "{{ nginx.volume_folder }}/dhparam:/etc/nginx/dhparam:ro"
- certs:/etc/nginx/certs - "{{ nginx.volume_folder }}/certs:/etc/nginx/certs"
- /var/run/docker.sock:/var/run/docker.sock:ro - /var/run/docker.sock:/var/run/docker.sock:ro
env: env:
NGINX_PROXY_CONTAINER: nginx-proxy NGINX_PROXY_CONTAINER: nginx-proxy

View file

@ -2,11 +2,13 @@
- name: create privatebin volume folders - name: create privatebin volume folders
file: file:
name: "{{ privatebin.volume_folder }}/{{ item }}" name: "{{ privatebin.volume_folder }}/{{ volume }}"
state: directory state: directory
with_items: loop:
- cfg - cfg
- data - data
loop_control:
loop_var: volume
- name: upload privatebin config - name: upload privatebin config
template: template: