--- - name: main haproxy block vars: {} block: - debug: var: groups['containers'] - name: install pakages apk: name: [ haproxy ] state: installed - 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: cerbot block when: install_certbot block: - name: install certbot apk: name: [ certbot ] - name: add certbot hooks include_tasks: install_certbot_hooks.yml loop: [ "stop", "start" ] - name: add certbot autorenew cron job template: src: templates/certbot_renew_cron.sh.j2 dest: /etc/periodic/weekly/certbot_renew.sh mode: 0755 # TODO: add task to upload existing certificates # TODO: add task to create initial certificates