fix(ansible): use k3s kubectl

This commit is contained in:
Timothy Stewart 2022-09-02 11:07:17 -05:00
parent 6695d13683
commit 3c36dc8bfd

View File

@ -28,14 +28,14 @@
- name: Wait for metallb controller to be running - name: Wait for metallb controller to be running
command: >- command: >-
kubectl wait deployment -n metallb-system controller --for condition=Available=True --timeout=60s k3s kubectl wait deployment -n metallb-system controller --for condition=Available=True --timeout=60s
changed_when: false changed_when: false
with_items: "{{ groups['master'] }}" with_items: "{{ groups['master'] }}"
run_once: true run_once: true
- name: Wait for metallb webhook service to be running - name: Wait for metallb webhook service to be running
command: >- command: >-
kubectl wait -n metallb-system --for=jsonpath='{.status.phase}'=Running pods \ k3s kubectl wait -n metallb-system --for=jsonpath='{.status.phase}'=Running pods \
--selector component=controller --timeout=60s --selector component=controller --timeout=60s
changed_when: false changed_when: false
with_items: "{{ groups['master'] }}" with_items: "{{ groups['master'] }}"
@ -43,7 +43,7 @@
- name: Wait for metallb pods in replicasets - name: Wait for metallb pods in replicasets
command: >- command: >-
kubectl wait pods -n metallb-system --for condition=Ready \ k3s kubectl wait pods -n metallb-system --for condition=Ready \
--selector component=controller,app=metallb --timeout=60s --selector component=controller,app=metallb --timeout=60s
changed_when: false changed_when: false
with_items: "{{ groups['master'] }}" with_items: "{{ groups['master'] }}"
@ -51,7 +51,7 @@
- name: Wait for the metallb controller readyReplicas - name: Wait for the metallb controller readyReplicas
command: >- command: >-
kubectl wait -n metallb-system --for=jsonpath='{.status.readyReplicas}'=1 replicasets \ k3s kubectl wait -n metallb-system --for=jsonpath='{.status.readyReplicas}'=1 replicasets \
--selector component=controller,app=metallb --timeout=60s --selector component=controller,app=metallb --timeout=60s
changed_when: false changed_when: false
with_items: "{{ groups['master'] }}" with_items: "{{ groups['master'] }}"
@ -59,7 +59,7 @@
- name: Wait for the metallb controller fullyLabeledReplicas - name: Wait for the metallb controller fullyLabeledReplicas
command: >- command: >-
kubectl wait -n metallb-system --for=jsonpath='{.status.fullyLabeledReplicas}'=1 replicasets \ k3s kubectl wait -n metallb-system --for=jsonpath='{.status.fullyLabeledReplicas}'=1 replicasets \
--selector component=controller,app=metallb --timeout=60s --selector component=controller,app=metallb --timeout=60s
changed_when: false changed_when: false
with_items: "{{ groups['master'] }}" with_items: "{{ groups['master'] }}"
@ -67,7 +67,7 @@
- name: Wait for the metallb controller availableReplicas - name: Wait for the metallb controller availableReplicas
command: >- command: >-
kubectl wait -n metallb-system --for=jsonpath='{.status.availableReplicas}'=1 replicasets \ k3s kubectl wait -n metallb-system --for=jsonpath='{.status.availableReplicas}'=1 replicasets \
--selector component=controller,app=metallb --timeout=60s --selector component=controller,app=metallb --timeout=60s
changed_when: false changed_when: false
with_items: "{{ groups['master'] }}" with_items: "{{ groups['master'] }}"