mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-01 09:38:12 -03:30
Support multiple artifacts under individual inventory directory
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
---
|
||||
kubeconfig_localhost: false
|
||||
kubectl_localhost: false
|
||||
artifacts_dir: "./artifacts"
|
||||
artifacts_dir: "{{ inventory_dir }}/artifacts"
|
||||
|
||||
kube_config_dir: "/etc/kubernetes"
|
||||
kube_apiserver_port: "6443"
|
||||
|
||||
@@ -55,9 +55,23 @@
|
||||
- name: Copy kubectl binary to ansible host
|
||||
fetch:
|
||||
src: "{{ bin_dir }}/kubectl"
|
||||
dest: "{{ artifacts_dir }}/kubectl"
|
||||
dest: "{{ bin_dir }}/kubectl"
|
||||
flat: yes
|
||||
validate_checksum: no
|
||||
become: no
|
||||
run_once: yes
|
||||
when: kubectl_localhost|default(false)
|
||||
|
||||
- name: create helper script kubectl.sh on ansible host
|
||||
copy:
|
||||
content: |
|
||||
#!/bin/bash
|
||||
kubectl --kubeconfig=admin.conf $@
|
||||
dest: "{{ artifacts_dir }}/kubectl.sh"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0755
|
||||
become: no
|
||||
run_once: yes
|
||||
delegate_to: localhost
|
||||
when: kubectl_localhost|default(false) and kubeconfig_localhost|default(false)
|
||||
|
||||
@@ -152,9 +152,9 @@ helm_deployment_type: host
|
||||
# Enable kubeadm deployment (experimental)
|
||||
kubeadm_enabled: false
|
||||
|
||||
# Make a copy of kubeconfig on the host that runs Ansible in GITDIR/artifacts
|
||||
# Make a copy of kubeconfig on the host that runs Ansible in {{ inventory_dir }}/artifacts
|
||||
kubeconfig_localhost: false
|
||||
# Download kubectl onto the host that runs Ansible in GITDIR/artifacts
|
||||
# Download kubectl onto the host that runs Ansible in {{ bin_dir }}
|
||||
kubectl_localhost: false
|
||||
|
||||
# K8s image pull policy (imagePullPolicy)
|
||||
|
||||
Reference in New Issue
Block a user