On 04. mars 2017 11:20, [email protected] wrote:
The task is still being skipped even though the VLAN 200 is present in the
variable test.

In the debug task use var: instead of msg: when looking at variables, it's then easier to see their structure.
- debug:
    var: test.stdout


Can I confirm the syntax is correct? I have written it like:

        lines:
          - switchport access vlan 200
          - description nan
          - no shutdown
        parents:
          - interface e01
      when: "'200' in test.stdout"

After looking more closely at the output is seams that test.stdout is a list.
So get the first entry you would need to use test.stdout.0

--
Kai Stian Olstad

--
You received this message because you are subscribed to the Google Groups "Ansible 
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/f495af48-c681-9d96-2932-c4433c1e65cb%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to