Add an nginx container to do crazy things with traefik

This commit is contained in:
Jake Howard
2022-01-16 14:08:29 +00:00
parent d5c7d94ac8
commit 6c0314b758
5 changed files with 43 additions and 0 deletions

View File

@ -106,3 +106,18 @@
- name: fail2ban
include: fail2ban.yml
when: with_fail2ban
- name: Check for nginx config
stat:
path: /opt/traefik/nginx.conf
register: nginx_file
become: true
- name: Create nginx config, if it doesn't exist already
template:
src: files/nginx.conf
dest: /opt/traefik/nginx.conf
mode: "0600"
when: not nginx_file.stat.exists
notify: restart traefik
become: true