Skip to content

Instantly share code, notes, and snippets.

@ssbarnea
Created May 3, 2020 10:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ssbarnea/c162d9c96efd7d2a52e455892183b649 to your computer and use it in GitHub Desktop.
Save ssbarnea/c162d9c96efd7d2a52e455892183b649 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ansible-playbook
- hosts: localhost
vars:
data:
- name: foo
when: "2 > 1"
- name: bar
tasks:
- debug:
msg: |
"E1120: No value for argument!"
when: "{{ item.when | default(true) }}"
loop: "{{ data }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment