Ansible: When Variable Is – Defined | Exists | Empty | True
Ansible ‘When’ Statement: Check If Variable Is… Check if Ansible variable is defined (exists): tasks: - shell: echo "The variable 'foo' is defined: '{{ foo }}'" when: foo is defined - fail: msg="The variable 'bar' is not defined" when: bar is undefined Check if Ansible variable is empty: tasks: - fail: msg="The variable 'bar' is empty" when: bar|length == 0 - shell: echo "The variable 'foo' is n..
DevOps/Ansible
2021. 6. 22. 16:33
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- ssl
- iTerm2
- URL Encoding
- 데브옵스
- Docker
- Playbook
- Nexus
- groovy
- Thread Dump
- 쓰레드덤프
- rsync
- vagrant
- 플레이북
- JVM
- Password manager
- 리눅스
- Shell Script
- Ansible
- Config History
- Linux
- openssl
- PostgreSQL
- 쉘스크립트
- 엔시블
- Jenkins
- nginx
- DevOps
- 엔서블
- 파이프라인
- 젠킨스
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
글 보관함