Generate kubectl bash completion from kubectl instead of file
This commit is contained in:
parent
1ccc10baf8
commit
15bc445a9c
2 changed files with 15 additions and 3025 deletions
File diff suppressed because it is too large
Load diff
|
@ -1,11 +1,6 @@
|
|||
---
|
||||
- include: pre-upgrade.yml
|
||||
|
||||
- name: Copy kubectl bash completion
|
||||
copy:
|
||||
src: kubectl_bash_completion.sh
|
||||
dest: /etc/bash_completion.d/kubectl.sh
|
||||
when: ansible_os_family in ["Debian","RedHat"]
|
||||
|
||||
- name: Copy kubectl from hyperkube container
|
||||
command: "/usr/bin/docker run --rm -v {{ bin_dir }}:/systembindir {{ hyperkube_image_repo }}:{{ hyperkube_image_tag }} /bin/cp /hyperkube /systembindir/kubectl"
|
||||
|
@ -15,6 +10,21 @@
|
|||
delay: "{{ retry_stagger | random + 3 }}"
|
||||
changed_when: false
|
||||
|
||||
- name: Gather kubectl bash completion
|
||||
command: "{{ bin_dir }}/kubectl completion bash"
|
||||
no_log: true
|
||||
register: kubectl_bash_completion
|
||||
when: ansible_os_family in ["Debian","RedHat"]
|
||||
|
||||
- name: Write kubectl bash completion
|
||||
copy:
|
||||
content: "{{ kubectl_bash_completion.stdout }}"
|
||||
dest: /etc/bash_completion.d/kubectl.sh
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0755
|
||||
when: ansible_os_family in ["Debian","RedHat"] and kubectl_bash_completion.changed
|
||||
|
||||
- name: Write kube-apiserver manifest
|
||||
template:
|
||||
src: manifests/kube-apiserver.manifest.j2
|
||||
|
|
Loading…
Reference in a new issue