You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
663 B
30 lines
663 B
- name: Effect of quotes in when conditions
|
|
gather_facts: no
|
|
hosts: localhost
|
|
vars:
|
|
a: true
|
|
b: false
|
|
c: false
|
|
tasks:
|
|
|
|
- name: I'm skipped and that's ok
|
|
fail:
|
|
msg: If you see this, there is something wrong
|
|
when: (a and b) or c
|
|
|
|
- name: I'm skipped and that's ok
|
|
fail:
|
|
msg: If you see this, there is something wrong
|
|
when: '(a and b) or c'
|
|
|
|
- name: I'm skipped and that's ok
|
|
fail:
|
|
msg: If you see this, there is something wrong
|
|
when: >-
|
|
(a and b) or c
|
|
|
|
- name: I should not be there!
|
|
fail:
|
|
msg: Quotes at the wrong place will lead to a wrong result
|
|
when: ('a and b') or 'c'
|
|
|
|
|