Force variable type;Ensure minimum default value for storage_benchmark
;Fix type mismatch
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
f47777763a
commit
230dc5e0cd
@ -133,7 +133,7 @@
|
||||
- api_readycheck.json.status is defined
|
||||
- api_readycheck.json.status == 'ok'
|
||||
retries: "{{ playbook.retries }}"
|
||||
delay: "{{ (storage_benchmark * playbook.delay.long) | int }}"
|
||||
delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
|
||||
|
||||
module_defaults:
|
||||
ansible.builtin.uri:
|
||||
|
@ -19,7 +19,7 @@
|
||||
- api_readycheck.json.status is defined
|
||||
- api_readycheck.json.status == 'pass'
|
||||
retries: "{{ playbook.retries }}"
|
||||
delay: "{{ (storage_benchmark * playbook.delay.long) | int }}"
|
||||
delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
|
||||
|
||||
- name: Configure additional SSH ingress
|
||||
ansible.builtin.template:
|
||||
|
@ -18,7 +18,7 @@
|
||||
until:
|
||||
- api_readycheck.json.Version is defined
|
||||
retries: "{{ playbook.retries }}"
|
||||
delay: "{{ (storage_benchmark * playbook.delay.long) | int }}"
|
||||
delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
|
||||
|
||||
- name: Generate argo-cd API token
|
||||
ansible.builtin.uri:
|
||||
|
@ -40,7 +40,7 @@
|
||||
register: api_readycheck
|
||||
until: api_readycheck.json.apiVersion is defined
|
||||
retries: "{{ playbook.retries }}"
|
||||
delay: "{{ (storage_benchmark * playbook.delay.medium) | int }}"
|
||||
delay: "{{ (storage_benchmark | int) * (playbook.delay.medium | int) }}"
|
||||
|
||||
- name: Install kubectl tab-completion
|
||||
ansible.builtin.shell:
|
||||
@ -77,4 +77,4 @@
|
||||
until:
|
||||
- k8snode_patch.result.metadata.labels['ova.airgappedk8s/moref_id'] is defined
|
||||
retries: "{{ playbook.retries }}"
|
||||
delay: "{{ (storage_benchmark * playbook.delay.medium) | int }}"
|
||||
delay: "{{ (storage_benchmark | int) * (playbook.delay.medium | int) }}"
|
||||
|
@ -19,7 +19,7 @@
|
||||
- api_readycheck.json.status is defined
|
||||
- api_readycheck.json.status == 'healthy'
|
||||
retries: "{{ playbook.retries }}"
|
||||
delay: "{{ (storage_benchmark * playbook.delay.long) | int }}"
|
||||
delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
|
||||
|
||||
- name: Push images to registry
|
||||
ansible.builtin.shell:
|
||||
@ -40,7 +40,7 @@
|
||||
loop_control:
|
||||
label: "{{ item | basename }}"
|
||||
retries: "{{ playbook.retries }}"
|
||||
delay: "{{ (storage_benchmark * playbook.delay.short) | int }}"
|
||||
delay: "{{ ((storage_benchmark | float) * playbook.delay.short) | int }}"
|
||||
until: push_result is not failed
|
||||
|
||||
module_defaults:
|
||||
|
@ -17,7 +17,7 @@
|
||||
until:
|
||||
- api_readycheck is not failed
|
||||
retries: "{{ playbook.retries }}"
|
||||
delay: "{{ (storage_benchmark * playbook.delay.long) | int }}"
|
||||
delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
|
||||
|
||||
module_defaults:
|
||||
ansible.builtin.uri:
|
||||
|
@ -150,7 +150,7 @@
|
||||
register: certificate_subject
|
||||
until: certificate_subject is not failed
|
||||
retries: "{{ playbook.retries }}"
|
||||
delay: "{{ (storage_benchmark * playbook.delay.medium) | int }}"
|
||||
delay: "{{ (storage_benchmark | int) * (playbook.delay.medium | int) }}"
|
||||
- name: Apply workload cluster manifest
|
||||
kubernetes.core.k8s:
|
||||
definition: >-
|
||||
@ -168,7 +168,7 @@
|
||||
register: cluster_readycheck
|
||||
until: cluster_readycheck is succeeded
|
||||
retries: "{{ playbook.retries }}"
|
||||
delay: "{{ (storage_benchmark * playbook.delay.long) | int }}"
|
||||
delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
|
||||
|
||||
- name: Initialize tempfile
|
||||
ansible.builtin.tempfile:
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
@ -24,7 +24,7 @@
|
||||
- nodedrain_results is not failed
|
||||
- (nodedrain_results.stdout_lines | last) is match('node/.* drained')
|
||||
retries: "{{ playbook.retries }}"
|
||||
delay: "{{ (storage_benchmark * playbook.delay.short) | int }}"
|
||||
delay: "{{ ((storage_benchmark | float) * playbook.delay.short) | int }}"
|
||||
|
||||
- name: Delete node
|
||||
kubernetes.core.k8s:
|
||||
|
@ -43,7 +43,7 @@
|
||||
- api_readycheck.json.status is defined
|
||||
- api_readycheck.json.status == 'ok'
|
||||
retries: "{{ playbook.retries }}"
|
||||
delay: "{{ (storage_benchmark * playbook.delay.long) | int }}"
|
||||
delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
|
||||
|
||||
module_defaults:
|
||||
ansible.builtin.uri:
|
||||
|
@ -19,7 +19,7 @@
|
||||
loop_control:
|
||||
label: "{{ item | basename }}"
|
||||
retries: "{{ playbook.retries }}"
|
||||
delay: "{{ (storage_benchmark * playbook.delay.short) | int }}"
|
||||
delay: "{{ ((storage_benchmark | float) * playbook.delay.short) | int }}"
|
||||
until: push_result is not failed
|
||||
|
||||
- name: Get all stored container images (=artifacts)
|
||||
|
@ -18,7 +18,7 @@
|
||||
- api_readycheck.json.status is defined
|
||||
- api_readycheck.json.status == 'pass'
|
||||
retries: "{{ playbook.retries }}"
|
||||
delay: "{{ (storage_benchmark * playbook.delay.long) | int }}"
|
||||
delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
|
||||
|
||||
module_defaults:
|
||||
ansible.builtin.uri:
|
||||
|
@ -17,7 +17,7 @@
|
||||
until:
|
||||
- api_readycheck.json.Version is defined
|
||||
retries: "{{ playbook.retries }}"
|
||||
delay: "{{ (storage_benchmark * playbook.delay.long) | int }}"
|
||||
delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
|
||||
|
||||
module_defaults:
|
||||
ansible.builtin.uri:
|
||||
|
@ -40,7 +40,7 @@
|
||||
register: api_readycheck
|
||||
until: api_readycheck.json.apiVersion is defined
|
||||
retries: "{{ playbook.retries }}"
|
||||
delay: "{{ (storage_benchmark * playbook.delay.medium) | int }}"
|
||||
delay: "{{ (storage_benchmark | int) * (playbook.delay.medium | int) }}"
|
||||
|
||||
- name: Install kubectl tab-completion
|
||||
ansible.builtin.shell:
|
||||
@ -77,4 +77,4 @@
|
||||
until:
|
||||
- k8snode_patch.result.metadata.labels['ova.airgappedk8s/moref_id'] is defined
|
||||
retries: "{{ playbook.retries }}"
|
||||
delay: "{{ (storage_benchmark * playbook.delay.medium) | int }}"
|
||||
delay: "{{ (storage_benchmark | int) * (playbook.delay.medium | int) }}"
|
||||
|
@ -18,7 +18,7 @@
|
||||
- api_readycheck.json.status is defined
|
||||
- api_readycheck.json.status == 'healthy'
|
||||
retries: "{{ playbook.retries }}"
|
||||
delay: "{{ (storage_benchmark * playbook.delay.long) | int }}"
|
||||
delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
|
||||
|
||||
module_defaults:
|
||||
ansible.builtin.uri:
|
||||
|
@ -25,7 +25,7 @@
|
||||
- (volume_details.json | json_query('data[? state==`attached`].robustness') | unique | length) == 1
|
||||
- (volume_details.json | json_query('data[? state==`attached`].robustness') | first) == "healthy"
|
||||
retries: "{{ ( playbook.retries * 2) | int }}"
|
||||
delay: "{{ (storage_benchmark * playbook.delay.long) | int }}"
|
||||
delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
|
||||
|
||||
- name: Upgrade longhorn chart
|
||||
kubernetes.core.helm:
|
||||
@ -44,7 +44,7 @@
|
||||
until:
|
||||
- api_readycheck is not failed
|
||||
retries: "{{ playbook.retries }}"
|
||||
delay: "{{ (storage_benchmark * playbook.delay.long) | int }}"
|
||||
delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
|
||||
|
||||
module_defaults:
|
||||
ansible.builtin.uri:
|
||||
|
@ -8,4 +8,4 @@
|
||||
until:
|
||||
- api_readycheck.json.apiVersion is defined
|
||||
retries: "{{ playbook.retries }}"
|
||||
delay: "{{ (storage_benchmark * playbook.delay.medium) | int }}"
|
||||
delay: "{{ (storage_benchmark | int) * (playbook.delay.medium | int) }}"
|
||||
|
Loading…
Reference in New Issue
Block a user