Ansible
Ansible Task 조건문 + 변수 사용해보기 (when 사용)
앵남(Andy)
2024. 8. 3. 22:53
Ansible Task에서 when 조건문을 사용해서 특정 task를 관리할 수 있다.
---
- name: basic condition
hosts: localhost
vars:
username: "andy"
tasks:
- name: "Print andy"
debug:
msg: "Print username == andy"
when: username == "andy"