On Thu, Aug 23, 2018 at 3:14 PM Jameson <[email protected]> wrote:
> On Thu, Aug 23, 2018 at 2:26 PM flowerysong <[email protected]> wrote:
>
>> There's nothing wrong with your condition, you're just using debug
>> incorrectly. 'var' expects a var name, so you're double-interpolating and
>> telling it to look up the value of the variable named 'TenGigabitEthernet
>> 0/32', which fails.
>>
>
> Gotcha, so debug can't be used to debug the output of a loop. Thanks.
>
Thanks for helping me sort my debug procedure. It turns out, this is
actually what I was going for in the end:
---
- name: "Get facts"
dellos9_facts:
register: facts
- name: "Configure all internal interfaces with VLANs"
dellos9_config:
parents: "{{ item }}"
lines:
- vlan tagged
2,25,100,104,108,160,202,204,210,212,214,238,600-604,2001-2008,2111,2121-2122,2211,2500-2515,3011-3012,3111-3112,3121-3122,3211-3212,3311-3312,3711
- vlan untagged 1
loop: "{{ facts.ansible_facts.ansible_net_interfaces | flatten }}"
when:
- item[21:23]|int <= 32
- item is search("TenGig")
--
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/CAHtGYf_iViz7e6SsC4_PuwxP5EgnXOME%2B-eQzATZyrf6ZG7_5A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.