728x90
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
'리눅스' 카테고리의 다른 글
[draft] Shell 스크립트 for 반복문 (0) | 2022.11.14 |
---|---|
[draft] 우분투에 OpenSSL을 최신 버전으로 업그레이드하는 방법 (0) | 2022.11.07 |
[리눅스] watchdog: BUG: soft lockup - CPU#0 stuck for 63s! (0) | 2022.11.07 |
[Ansible] ansible 팩트변수, 매직변수 (0) | 2022.11.07 |
파이썬 가상 환경을 구성하고 설정하는 방법(python virtual environment) (0) | 2022.11.07 |