Force variable type;Ensure minimum default value for storage_benchmark;Fix type mismatch
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2023-03-09 09:59:45 +01:00
parent f47777763a
commit 230dc5e0cd
20 changed files with 27 additions and 24 deletions

View File

@ -26,7 +26,7 @@
- name: Calculate crude storage benchmark
ansible.builtin.set_fact:
storage_benchmark: "{{ (end_time | int - start_time | int) }}"
storage_benchmark: "{{ [storage_benchmark, (end_time | int - start_time | int)] | max }}"
- debug:
var: storage_benchmark

View File

@ -8,5 +8,5 @@
label: "{{ item | basename }}"
# Probably should add a task before that ensures K3s node is fully initialized before starting imports; currently K3s goes away briefly during this loop
retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark * playbook.delay.short) | int }}"
delay: "{{ ((storage_benchmark | float) * playbook.delay.short) | int }}"
until: import_result is not failed

View File

@ -5,7 +5,7 @@
schema: vsphere
register: vcenter_info
retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark * playbook.delay.short) | int }}"
delay: "{{ ((storage_benchmark | float) * playbook.delay.short) | int }}"
until: vcenter_info is not failed
module_defaults:

View File

@ -5,3 +5,6 @@ playbook:
long: 2
medium: 1
short: 0.5
# This default value is updated during the playbook, based on an I/O intensive operation
storage_benchmark: 30