Stop acme.sh commands on first failure
This commit is contained in:
1 parent
e02ccc7d74
commit
b71dd06736
2 files changed
+16
-7
No files matched your search
+6
-7
@@ -14,13 +14,12 @@
|
|||||||
- --install-cronjob
|
- --install-cronjob
|
||||||
become: true
|
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
|
- name: Execute acme.sh commands
|
||||||
ansible.builtin.command:
|
ansible.builtin.include_tasks:
|
||||||
argv: "{{ item.command }}"
|
file: acmesh_command.yml
|
||||||
creates: "{{ item.must_present | default(omit) }}"
|
|
||||||
removes: "{{ item.must_absent | default(omit) }}"
|
|
||||||
become: true
|
|
||||||
loop: "{{ haproxy_acmesh }}"
|
loop: "{{ haproxy_acmesh }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.command | join(' ') }}"
|
loop_var: haproxy_acmesh_item
|
||||||
environment: "{{ item.env }}"
|
label: "{{ haproxy_acmesh_item.name | default(haproxy_acmesh_item.command | join(' ')) }}"
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
# tasks file for haproxy
|
||||||
|
|
||||||
|
- name: "Execute acme.sh command: {{ haproxy_acmesh_item.name | default(haproxy_acmesh_item.command | join(' ')) }}"
|
||||||
|
ansible.builtin.command:
|
||||||
|
argv: "{{ haproxy_acmesh_item.command }}"
|
||||||
|
creates: "{{ haproxy_acmesh_item.must_present | default(omit) }}"
|
||||||
|
removes: "{{ haproxy_acmesh_item.must_absent | default(omit) }}"
|
||||||
|
become: true
|
||||||
|
environment: "{{ haproxy_acmesh_item.env | default({}) }}"
|
||||||
Reference in new issue
Block a user