only_if and tasks that are skipped
If you register a variable, but that very task get skipped, "only_if" will give you an error because the variable isn't defined.
Use "when_set" instead of "only_if". Check conditional execution in the doc.
Written by Yves Dorfsman
Related protips
1 Response
use when: instead of all of the above
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ansible
Authors
Misha Behersky
78.83K
tartansandal
73.25K
Related Tags
#ansible
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#