Files
role_haproxy/tasks/acmesh.yml
T

26 lines
724 B
YAML

---
# tasks file for haproxy
- name: Install acme.sh
ansible.builtin.apt:
name: acme.sh
become: true
# Always run: also covers instances where acme.sh is already installed
- name: Ensure to install cronjob
ansible.builtin.command:
argv:
- acme.sh
- --install-cronjob
become: true
# One include per command: a failing command stops the host, so a --deploy
# never runs after a failed --issue (a plain loop would continue).
- name: Execute acme.sh commands
ansible.builtin.include_tasks:
file: acmesh_command.yml
loop: "{{ haproxy_acmesh }}"
loop_control:
loop_var: haproxy_acmesh_item
label: "{{ haproxy_acmesh_item.name | default(haproxy_acmesh_item.command | join(' ')) }}"