2021-09-18 00:04:05 -05:00
|
|
|
#!/usr/bin/env ansible-playbook
|
|
|
|
# vim:ft=ansible:
|
|
|
|
- name: assure ingress container persist directories
|
|
|
|
file: path="{{ ingress_container_persist_dir }}/{{ item }}" state=directory owner=root mode=0755
|
|
|
|
with_items:
|
|
|
|
- letsencrypt
|
|
|
|
- user_conf.d
|
|
|
|
- name: template out ingress configuration file
|
|
|
|
template: src=vhosts.conf.j2 dest="{{ ingress_container_persist_dir }}/user_conf.d/vhosts.conf" mode="0640"
|
|
|
|
notify: restart ingress container
|
|
|
|
- name: assure ingress container
|
|
|
|
docker_container:
|
|
|
|
name: ingress
|
|
|
|
image: "{{ ingress_container_image }}"
|
|
|
|
env:
|
|
|
|
TZ: "{{ ingress_container_timezone }}"
|
|
|
|
CERTBOT_EMAIL: "{{ ingress_container_certbot_email }}"
|
|
|
|
networks: "{{ ingress_container_networks }}"
|
2021-09-18 07:13:33 -05:00
|
|
|
ports: "{{ ingress_container_ports }}"
|
2021-09-18 00:04:05 -05:00
|
|
|
volumes:
|
|
|
|
- "{{ ingress_container_persist_dir }}/letsencrypt:/etc/letsencrypt"
|
2021-09-27 15:19:18 -05:00
|
|
|
- "{{ ingress_container_persist_dir }}/user_conf.d:{{ ingress_container_config_mount }}:ro"
|