반응형
Ansible을 위한 기본 Bash 완성을 설치하는 방법(Basic bash completion for Ansible)
- github 다운로드
git clone https://github.com/dysosmus/ansible-completion.git
$ ls -l ansible-completion
total 68
-rw-rw-r-- 1 vagrant vagrant 5835 Nov 7 14:01 ansible-completion.bash
-rw-rw-r-- 1 vagrant vagrant 334 Nov 7 14:01 ansible-doc-completion.bash
-rw-rw-r-- 1 vagrant vagrant 1072 Nov 7 14:01 ansible-galaxy-completion.bash
-rw-rw-r-- 1 vagrant vagrant 1165 Nov 7 14:01 ansible-playbook-completion.bash
-rw-rw-r-- 1 vagrant vagrant 595 Nov 7 14:01 ansible-pull-completion.bash
-rw-rw-r-- 1 vagrant vagrant 685 Nov 7 14:01 ansible-vault-completion.bash
-rw-rw-r-- 1 vagrant vagrant 35120 Nov 7 14:01 LICENSE
-rw-rw-r-- 1 vagrant vagrant 2526 Nov 7 14:01 README.md
- ansible 명령 자동완성
sudo cp ansible-completion/ansible-completion.bash /etc/bash_completion.d/
- ansible-playbook 명령 자동 완성
sudo cp ansible-completion/ansible-playbook-completion.bash /etc/bash_completion.d/.
- ansible-doc 명령 자동 완성
sudo cp ansible-completion/ansible-doc-completion.bash /etc/bash_completion.d/.
source ~/.bashrc
- ansible 명령 입력 후 Tab,Tab
$ ansible -i ./inventory --
- ansible-playbook 명령 입력 후 Tab,Tab
$ ansible-playbook -i ./inventory --
참고URL
- Ansible 명령 셸 완성 추가 : https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#adding-ansible-command-shell-completion
728x90
반응형
'리눅스' 카테고리의 다른 글
우분투에 OpenSSL을 최신 버전으로 업그레이드하는 방법 (0) | 2022.11.08 |
---|---|
[리눅스] watchdog: BUG: soft lockup - CPU#0 stuck for 63s! (0) | 2022.11.07 |
docker build(Dockerfile) 경고 구문 (0) | 2022.11.03 |
ansible 팩트 변수와 매직 변수 (0) | 2022.11.03 |
파이썬 가상 환경을 구성하고 설정하는 방법(python virtual environment) (0) | 2022.11.03 |