mirror of
https://github.com/geerlingguy/ansible-role-kubernetes.git
synced 2024-11-18 19:10:39 +01:00
Fix some new ansible-lint issues.
This commit is contained in:
parent
5c4eea46ed
commit
261e51e448
@ -47,8 +47,9 @@ Extra args to pass to `kubeadm init` during K8s control plane initialization. E.
|
|||||||
Whether to remove the taint that denies pods from being deployed to the Kubernetes master. If you have a single-node cluster, this should definitely be `True`. Otherwise, set to `False` if you want a dedicated Kubernetes master which doesn't run any other pods.
|
Whether to remove the taint that denies pods from being deployed to the Kubernetes master. If you have a single-node cluster, this should definitely be `True`. Otherwise, set to `False` if you want a dedicated Kubernetes master which doesn't run any other pods.
|
||||||
|
|
||||||
kubernetes_enable_web_ui: false
|
kubernetes_enable_web_ui: false
|
||||||
|
kubernetes_web_ui_manifest_file: https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml
|
||||||
|
|
||||||
Whether to enable the Kubernetes web dashboard UI (only accessible on the master itself, or proxied).
|
Whether to enable the Kubernetes web dashboard UI (only accessible on the master itself, or proxied), and the file containing the web dashboard UI manifest.
|
||||||
|
|
||||||
kubernetes_pod_network_cidr: '10.244.0.0/16'
|
kubernetes_pod_network_cidr: '10.244.0.0/16'
|
||||||
kubernetes_apiserver_advertise_address: ''
|
kubernetes_apiserver_advertise_address: ''
|
||||||
|
@ -19,6 +19,7 @@ kubernetes_kubeadm_init_extra_opts: ""
|
|||||||
|
|
||||||
kubernetes_allow_pods_on_master: true
|
kubernetes_allow_pods_on_master: true
|
||||||
kubernetes_enable_web_ui: true
|
kubernetes_enable_web_ui: true
|
||||||
|
kubernetes_web_ui_manifest_file: https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml
|
||||||
|
|
||||||
kubernetes_pod_network_cidr: '10.244.0.0/16'
|
kubernetes_pod_network_cidr: '10.244.0.0/16'
|
||||||
kubernetes_apiserver_advertise_address: ''
|
kubernetes_apiserver_advertise_address: ''
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
kubelet_args_path: '/etc/systemd/system/kubelet.service.d/10-kubeadm.conf'
|
kubelet_args_path: '/etc/systemd/system/kubelet.service.d/10-kubeadm.conf'
|
||||||
kubelet_args_line: "{{ 'Environment=\"KUBELET_EXTRA_ARGS=' + kubernetes_kubelet_extra_args + '\"' }}"
|
kubelet_args_line: "{{ 'Environment=\"KUBELET_EXTRA_ARGS=' + kubernetes_kubelet_extra_args + '\"' }}"
|
||||||
kubelet_args_regexp: '^Environment='
|
kubelet_args_regexp: '^Environment='
|
||||||
when: kubelet_environment_file.stat.exists == false
|
when: not kubelet_environment_file.stat.exists
|
||||||
|
|
||||||
- name: Configure KUBELET_EXTRA_ARGS.
|
- name: Configure KUBELET_EXTRA_ARGS.
|
||||||
lineinfile:
|
lineinfile:
|
||||||
|
@ -10,13 +10,13 @@
|
|||||||
|
|
||||||
register: kubeadmin_init
|
register: kubeadmin_init
|
||||||
failed_when: false
|
failed_when: false
|
||||||
when: kubernetes_init_stat.stat.exists == false
|
when: not kubernetes_init_stat.stat.exists
|
||||||
|
|
||||||
- name: Print the init output to screen.
|
- name: Print the init output to screen.
|
||||||
debug:
|
debug:
|
||||||
var: kubeadmin_init.stdout
|
var: kubeadmin_init.stdout
|
||||||
verbosity: 2
|
verbosity: 2
|
||||||
when: kubernetes_init_stat.stat.exists == false
|
when: not kubernetes_init_stat.stat.exists
|
||||||
|
|
||||||
- name: Ensure .kube directory exists.
|
- name: Ensure .kube directory exists.
|
||||||
file:
|
file:
|
||||||
@ -43,7 +43,7 @@
|
|||||||
command: "kubectl taint nodes --all node-role.kubernetes.io/master-"
|
command: "kubectl taint nodes --all node-role.kubernetes.io/master-"
|
||||||
when:
|
when:
|
||||||
- kubernetes_allow_pods_on_master
|
- kubernetes_allow_pods_on_master
|
||||||
- kubernetes_init_stat.stat.exists == false
|
- not kubernetes_init_stat.stat.exists
|
||||||
|
|
||||||
- name: Check if Kubernetes Dashboard UI service already exists.
|
- name: Check if Kubernetes Dashboard UI service already exists.
|
||||||
shell: kubectl get services --namespace kube-system | grep -q kubernetes-dashboard
|
shell: kubectl get services --namespace kube-system | grep -q kubernetes-dashboard
|
||||||
@ -53,7 +53,7 @@
|
|||||||
when: kubernetes_enable_web_ui
|
when: kubernetes_enable_web_ui
|
||||||
|
|
||||||
- name: Enable the Kubernetes Web Dashboard UI (if configured).
|
- name: Enable the Kubernetes Web Dashboard UI (if configured).
|
||||||
command: "kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml"
|
command: "kubectl create -f {{ kubernetes_web_ui_manifest_file }}"
|
||||||
when:
|
when:
|
||||||
- kubernetes_enable_web_ui
|
- kubernetes_enable_web_ui
|
||||||
- kubernetes_dashboard_service is failed
|
- kubernetes_dashboard_service is failed
|
||||||
|
@ -3,3 +3,4 @@
|
|||||||
shell: >
|
shell: >
|
||||||
{{ kubernetes_join_command }}
|
{{ kubernetes_join_command }}
|
||||||
creates=/etc/kubernetes/kubelet.conf
|
creates=/etc/kubernetes/kubelet.conf
|
||||||
|
tags: ['skip_ansible_lint']
|
||||||
|
Loading…
Reference in New Issue
Block a user