mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
486 B
YAML
28 lines
486 B
YAML
12 years ago
|
---
|
||
|
- 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
|
||
|
|