You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

30 lines
630 B

---
- name: main haproxy block
vars:
install_certbot: true
block:
- debug:
var: groups['containers']
- name: install pakages
apk:
name: [ haproxy ]
- name: create haproxy routes for other containers
template:
src: templates/haproxy.cfg.j2
dest: /etc/haproxy/haproxy.cfg
- name: restart haproxy service
service:
name: haproxy
enabled: yes
state: restarted
- name: install certbot
apk:
name: [ certbot ]
when: install_certbot
# TODO: route web roots for each container in haproxy.conf
# NOTE: can use *.lxd domain names in haproxy container