Skip to content
Snippets Groups Projects
Commit 0bb96dbf authored by Arie Peterson's avatar Arie Peterson
Browse files

Merge branch 'kubectl_completion' into 'master'

Bash completion for kubectl and helm

Closes #79

See merge request openappstack/bootstrap!37
parents 915be762 89a45f21
No related branches found
No related tags found
No related merge requests found
# Bashrc additions for Openappstack
# This file is sourced from .bashrc
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi
......@@ -41,19 +41,44 @@
content: "{{ ip_address }}"
dest: "{{ configuration_directory }}/ip"
- name: Remove old files from previous deploys
file:
path: '{{ item }}'
state: absent
with_items:
- '/root/.bashrc_oas'
- '/root/.bash_aliases_oas'
become: true
- name: Install bash-completion
tags:
- bash
- completion
package:
name: "bash-completion"
- name: Add kubectl bash kompletion
tags:
- bash
- kubectl
- completion
shell: kubectl completion bash > /etc/bash_completion.d/kubectl
args:
creates: /etc/bash_completion.d/kubectl
- name: Restore original .bashrc
- name: Add helm bash kompletion
tags:
- bash
- helm
- completion
shell: helm completion bash > /etc/bash_completion.d/helm
args:
creates: /etc/bash_completion.d/helm
- name: Deploy /root/.bashrc_oas
tags:
- bash
copy:
dest: /root/.bashrc_oas
src: bashrc_oas
- name: Source /root/.bashrc_oas from /root/.bashrc
tags:
- bash
blockinfile:
path: "/root/.bashrc"
state: absent
state: present
create: true
block: |
# Source Openappstack addtions from .bashrc_oas
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment