mirror of
https://github.com/geerlingguy/ansible-role-kubernetes.git
synced 2024-11-23 19:06:33 +01:00
PR #65 follow-up: Clean up formatting slightly.
This commit is contained in:
parent
49217c2f52
commit
07aa887e99
@ -59,14 +59,16 @@ Whether to enable the Kubernetes web dashboard UI (only accessible on the master
|
|||||||
# Flannel CNI.
|
# Flannel CNI.
|
||||||
cni: 'flannel'
|
cni: 'flannel'
|
||||||
cidr: '10.244.0.0/16'
|
cidr: '10.244.0.0/16'
|
||||||
|
#
|
||||||
# Calico CNI.
|
# Calico CNI.
|
||||||
# cni: 'calico'
|
# cni: 'calico'
|
||||||
# cidr: '192.168.0.0/16'
|
# cidr: '192.168.0.0/16'
|
||||||
|
#
|
||||||
# Weave CNI.
|
# Weave CNI.
|
||||||
# cni: 'weave'
|
# cni: 'weave'
|
||||||
# cidr: '192.168.0.0/16'
|
# cidr: '192.168.0.0/16'
|
||||||
|
|
||||||
This role currently supports `flannel` (default), `calico` or `weave` for cluster pod networking. Choose one or the other for your cluster; converting between the three is not done automatically and could result in broken networking, and should be done outside of this role.
|
This role currently supports `flannel` (default), `calico` or `weave` for cluster pod networking. Choose only one for your cluster; converting between them is not done automatically and could result in broken networking; if you need to switch from one to another, it should be done outside of this role.
|
||||||
|
|
||||||
kubernetes_apiserver_advertise_address: ''
|
kubernetes_apiserver_advertise_address: ''
|
||||||
kubernetes_version_kubeadm: 'stable-{{ kubernetes_version }}'
|
kubernetes_version_kubeadm: 'stable-{{ kubernetes_version }}'
|
||||||
|
@ -44,15 +44,16 @@
|
|||||||
changed_when: "'created' in calico_result.stdout"
|
changed_when: "'created' in calico_result.stdout"
|
||||||
when: kubernetes_pod_network.cni == 'calico'
|
when: kubernetes_pod_network.cni == 'calico'
|
||||||
|
|
||||||
- name: "Get K8s version"
|
- name: Get Kubernetes version for Weave installation.
|
||||||
shell: kubectl version | base64 | tr -d '\n'
|
shell: kubectl version | base64 | tr -d '\n'
|
||||||
register: k8_version
|
changed_when: false
|
||||||
|
register: kubectl_version
|
||||||
when: kubernetes_pod_network.cni == 'weave'
|
when: kubernetes_pod_network.cni == 'weave'
|
||||||
|
|
||||||
- name: Configure Weave networking.
|
- name: Configure Weave networking.
|
||||||
command: "{{ item }}"
|
command: "{{ item }}"
|
||||||
with_items:
|
with_items:
|
||||||
- "kubectl apply -f https://cloud.weave.works/k8s/net?k8s-version={{ k8_version.stdout_lines[0] }}"
|
- "kubectl apply -f https://cloud.weave.works/k8s/net?k8s-version={{ kubectl_version.stdout_lines[0] }}"
|
||||||
register: weave_result
|
register: weave_result
|
||||||
changed_when: "'created' in weave_result.stdout"
|
changed_when: "'created' in weave_result.stdout"
|
||||||
when: kubernetes_pod_network.cni == 'weave'
|
when: kubernetes_pod_network.cni == 'weave'
|
||||||
|
Loading…
Reference in New Issue
Block a user