--- - 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