ansible/roles/ingress/tasks/main.yml

23 lines
985 B
YAML
Raw Permalink Normal View History

#!/usr/bin/env ansible-playbook
# vim:ft=ansible:
- name: assure ingress container persist directories
2022-06-16 23:45:29 -05:00
ansible.builtin.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
2022-06-16 23:45:29 -05:00
ansible.builtin.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 }}"
ports: "{{ ingress_container_ports }}"
volumes:
- "{{ ingress_container_persist_dir }}/letsencrypt:/etc/letsencrypt"
- "{{ ingress_container_persist_dir }}/user_conf.d:{{ ingress_container_config_mount }}:ro"