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.
43 lines
914 B
43 lines
914 B
--- |
|
- 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
|
|
|