limit 옵션 강제하기
문제
Fail if hosts are not defined
- hosts: all
tasks:
- name: Fail if hosts are not defined
fail:
msg: 'you must use -l or --limit'
when: ansible_limit is not defined
run_once: true
- name: echo hello
shell: |
echo hello
- name: echo hello2
shell: |
echo hello2태그를 명시하지 않으면 실행되게 않게 하기
참고
Last updated