mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-03-23 03:45:03 -02:30
Fix warning of mkdir usage (#6951)
This fixes the following warning: [kubernetes/client : Generate admin kubeconfig with external api endpoint] [WARNING]: Consider using the file module with state=directory rather than running 'mkdir'. If you need to use command because file is insufficient you can
This commit is contained in:
@@ -47,10 +47,16 @@
|
|||||||
port: "{{ kube_apiserver_port }}"
|
port: "{{ kube_apiserver_port }}"
|
||||||
timeout: 180
|
timeout: 180
|
||||||
|
|
||||||
|
- name: Create external_kubeconfig dir
|
||||||
|
file:
|
||||||
|
path: "{{ kube_config_dir }}/external_kubeconfig"
|
||||||
|
mode: "0750"
|
||||||
|
state: directory
|
||||||
|
when: kubeconfig_localhost
|
||||||
|
|
||||||
# NOTE(mattymo): Please forgive this workaround
|
# NOTE(mattymo): Please forgive this workaround
|
||||||
- name: Generate admin kubeconfig with external api endpoint # noqa 302
|
- name: Generate admin kubeconfig with external api endpoint # noqa 302
|
||||||
shell: >-
|
shell: >-
|
||||||
mkdir -p {{ kube_config_dir }}/external_kubeconfig &&
|
|
||||||
{{ bin_dir }}/kubeadm
|
{{ bin_dir }}/kubeadm
|
||||||
init phase
|
init phase
|
||||||
kubeconfig admin
|
kubeconfig admin
|
||||||
|
|||||||
Reference in New Issue
Block a user