mirror of
https://github.com/geerlingguy/ansible-role-kubernetes.git
synced 2024-11-23 19:06:33 +01:00
install weave network
This commit is contained in:
parent
f912a393b5
commit
b91e92b0b7
@ -45,6 +45,22 @@
|
||||
changed_when: "'created' in calico_result.stdout"
|
||||
when: kubernetes_pod_network.cni == 'calico'
|
||||
|
||||
# LINT-ERROR
|
||||
- name: "Get K8s version"
|
||||
shell: |
|
||||
set -o pipefail
|
||||
kubectl version | base64 | tr -d '\n'
|
||||
register: k8_version
|
||||
when: kubernetes_pod_network.cni == 'weave'
|
||||
|
||||
- name: Configure Weave networking.
|
||||
command: "{{ item }}"
|
||||
with_items:
|
||||
- "kubectl apply -f https://cloud.weave.works/k8s/net?k8s-version={{ k8_version.stdout_lines[0] }}"
|
||||
register: weave_result
|
||||
changed_when: "'created' in weave_result.stdout"
|
||||
when: kubernetes_pod_network.cni == 'weave'
|
||||
|
||||
# TODO: Check if taint exists with something like `kubectl describe nodes`
|
||||
# instead of using kubernetes_init_stat.stat.exists check.
|
||||
- name: Allow pods on master node (if configured).
|
||||
|
Loading…
Reference in New Issue
Block a user