28 lines
486 B
YAML
28 lines
486 B
YAML
|
---
|
||
|
- hosts: all
|
||
|
connection: local
|
||
|
gather_facts: False
|
||
|
|
||
|
vars:
|
||
|
internal: "print me"
|
||
|
|
||
|
tasks:
|
||
|
- action: debug msg="skip me"
|
||
|
when_unset: $internal
|
||
|
|
||
|
- action: debug msg="$internal"
|
||
|
when_set: $internal
|
||
|
|
||
|
- action: debug msg="skip me"
|
||
|
when_unset: $external
|
||
|
|
||
|
- action: debug msg="$external"
|
||
|
when_set: $external
|
||
|
|
||
|
- action: debug msg="run me"
|
||
|
when_unset: $this_var_does_not_exist
|
||
|
|
||
|
- action: debug msg="skip me"
|
||
|
when_set: $this_var_does_not_exist
|
||
|
|