On 12/1/20 5:17 PM, James Lagermann wrote:
> Have you tried to put the line in double quotes? I'm not sure if it's always
> required, however, some of my 'or'
> statements will not work without them so I just put all of them in double
> quotes.
>
> when: "(item.key is not regex("(Port|Vl
Have you tried to put the line in double quotes? I'm not sure if it's
always required, however, some of my 'or' statements will not work without
them so I just put all of them in double quotes.
when: "(item.key is not regex("(Port|Vlan)"))
or (item.key not in po_ints)"
On Monday, Novem
Hello,
Just thought I would uypdate. I was not able to find the correct syntax
for an or in a when statement. What I end up doing, and I am sure there
is a better way to do it, was create separate lists then adding them
together.
- name: Create a list without Gigabit interfaces
set_f
I apologize I did miss a line in my task when I copied. So I used the
(Port|Vlan). Which again works as a single statement. Also tried putting
the statements in ()
- name: Apply policy to the interfaces
cisco.ios.ios_config:
parents: interface {{ item.key }}
lines:
On 11/25/20 4:44 PM, colli...@gmail.com wrote:
> In an ansible play, is "or" not supported with conditional statements? I have
> a task that is searching a variable for 2
> values. The when statements work alone, but with "or" it runs but doesn't do
> what I am expecting. Here is the task, is
> m
In an ansible play, is "or" not supported with conditional statements? I
have a task that is searching a variable for 2 values. The when statements
work alone, but with "or" it runs but doesn't do what I am expecting. Here
is the task, is my syntax wrong or is it just not supported? -
- n