Prevent configuration reset;Fix query
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Danny Bessems 2023-02-02 21:52:57 +01:00
parent 07e95d82a2
commit d874da0cb3
2 changed files with 5 additions and 4 deletions

View File

@ -27,7 +27,8 @@
chdir: /opt/metacluster/k3s chdir: /opt/metacluster/k3s
environment: environment:
INSTALL_K3S_SKIP_DOWNLOAD: 'true' INSTALL_K3S_SKIP_DOWNLOAD: 'true'
INSTALL_K3S_EXEC: "server --token {{ vapp['metacluster.token'] | trim }} --server https://{{ vapp['metacluster.vip'] }}:6443 --disable local-storage --config /etc/rancher/k3s/config.yaml" # To prevent from overwriting traefik's existing configuration, "disable" it on this new node
INSTALL_K3S_EXEC: "server --token {{ vapp['metacluster.token'] | trim }} --server https://{{ vapp['metacluster.vip'] }}:6443 --disable local-storage,traefik --config /etc/rancher/k3s/config.yaml"
when: ansible_facts.services['k3s.service'] is undefined when: ansible_facts.services['k3s.service'] is undefined
- name: Ensure API availability - name: Ensure API availability

View File

@ -21,9 +21,9 @@
method: GET method: GET
register: volume_details register: volume_details
until: until:
- volume_details.json.data is defined - volume_details.json is defined
- (volume_details.json.data | json_query('[*].robustness') | unique | length) == 1 - (volume_details.json | json_query('data[? state==`attached`].robustness') | unique | length) == 1
- (volume_details.json.data | json_query('[*].robustness') | first) == "healthy" - (volume_details.json | json_query('data[? state==`attached`].robustness') | first) == "healthy"
retries: "{{ playbook.retries }}" retries: "{{ playbook.retries }}"
delay: "{{ playbook.delay.long }}" delay: "{{ playbook.delay.long }}"