Ansible
Logical 'OR' in when statement?
Archives
Ansible Project
John_Oliver
(John Oliver)
August 14, 2014, 5:32pm
1
Can I execute an action when variable1=x OR variable2=y?
Michael_DeHaan1
(Michael DeHaan)
August 14, 2014, 5:51pm
2
Yep!
shell: echo hi
when: variable1 == x and variable2 == y
Related topics
Topic
Replies
Views
Activity
When clause with AND and OR condition does not work
Get Help
playbook
,
howto
7
2230
May 24, 2024
When Or statement
Ansible Project
5
25
December 1, 2020
When condition 'or' structure question
Ansible Project
3
3
September 10, 2019
Evaluating 'or' in when: conditional
Ansible Project
1
8
January 27, 2015
how to use "when: variableA == variableB"
Ansible Project
7
11
June 28, 2018