728x90
ansible-vault 명령
ansible-vault create a.yaml
ansible-vault view a.yaml
$ ansible-vault view a.yaml
Vault password:
---
- hosts: node1
tasks:
- ping:
ansible-vault edit a.yaml
$ ansible-vault edit a.yaml
Vault password:
---
- hosts: node1
tasks:
- ping:
ansible-playbook a.yaml -i ../inventory.ini --ask-vault-pass
$ ansible-playbook a.yaml -i ../inventory.ini --ask-vault-pass
Vault password:
PLAY [node1] ******************************************************************************************************
TASK [Gathering Facts] ********************************************************************************************
ok: [node1]
TASK [ping] *******************************************************************************************************
ok: [node1]
PLAY RECAP ********************************************************************************************************
node1 : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
728x90
'리눅스' 카테고리의 다른 글
[iac][ansible] 앤서블 인벤토리 (0) | 2022.08.25 |
---|---|
[iac][ansible] 앤서블 아키텍처 (0) | 2022.08.25 |
ansible-galaxy 명령어 (0) | 2022.08.25 |
SSH 키를 생성하고 배포하여 원격 서버에 SSH 접속하는 방법 (0) | 2022.08.23 |
Ansible 설치 및 업그레이드 (0) | 2022.08.23 |