Skip to content

Instantly share code, notes, and snippets.

@markuman
Created March 19, 2019 14:48
Show Gist options
  • Save markuman/d8e93a008e8180f56e45bf6628149da5 to your computer and use it in GitHub Desktop.
Save markuman/d8e93a008e8180f56e45bf6628149da5 to your computer and use it in GitHub Desktop.
- name: check required vars empty
fail: msg="Variable '{{ item }}' is empty"
when: vars[item] == ""
with_items: "{{ required_vars }}"
- name: check required vars null
fail: msg="Variable '{{ item }}' is null"
when: vars[item] is none
with_items: "{{ required_vars }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment