Skip to content

Commit fff3346

Browse files
author
CISE
committed
use retries instead of wait_for before upload
sometimes icinga isn't ready to accept the newly uploaded file directly after deleting the old one. We used to have a wait_for task in there which waited for 10 seconds before trying to upload again but this wasn't really reliable as well This changes it to a retries setting on the uri resource instead.
1 parent cf2166f commit fff3346

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

roles/ansible_icinga_business_process/tasks/business_process.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@
4848
alreadyexists.status == 200 and
4949
dl_cleanup != template_cleanup
5050
51-
- name: wait for 10 seconds and continue with play
52-
wait_for:
53-
timeout: 10
54-
5551
- name: upload template
5652
uri:
5753
url: "{{ icinga_business_process_url }}/businessprocess/process/upload"
@@ -66,6 +62,10 @@
6662
source: "{{ lookup('template', './config.j2', convert_data=False) }}"
6763
Store: Store
6864
__FORM_NAME: IcingaModuleBusinessprocessFormsBpUploadForm
65+
register: upload
66+
retries: 10
67+
delay: 10
68+
until: upload.status == 302
6969
when: >
7070
(
7171
alreadyexists.status == 200 and

0 commit comments

Comments
 (0)