On 5/11/20 8:20 AM, Umut Cokbilir wrote:
> Hi All,
>
> I have a question about the loop. As You know, loopback and main interface
> aren't any vlan so i need to add 'null' for
> intf_vlan's item
>
> How can I handle this problem?
>
> *Here is my '.*.yml' part and output;*
> Thanks.
>
> - name: Extract 'interface, vlan, description, mtu , ip address, subnet,
> ISIS Process, Circuit Type and QoS'
> set_fact:
> intf_isis: "{{ intf_isis | default([]) + item |
> regex_findall('.*interface\\s+(\\S+)') }}"
> intf_vlan: "{{ intf_vlan | default([]) + item |
> regex_findall('.*vlan-type\\s+dot1q\\s+(\\S+)') }}"
> # intf_desc: "{{ item | regex_findall('.*description\\s+(\\S+)') }}"
> loop: "{{ interface_detail }}"
>
>
Hello Umut,
Don't use a loop here. It only complicates things in your scenario.
- name: Extract 'interface, vlan, description, mtu , ip address, subnet, ISIS
Process, Circuit Type and QoS'
set_fact:
intf_isis: "{{ interface_detail | regex_findall('.*interface\\s+(\\S+)')
}}"
Regards
Racke
> 2.PNG <about:invalid#zClosurez>
>
>
> --
> 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]
> <mailto:[email protected]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/e7e5d6ef-eb04-4c32-aa8c-868fb0b40288%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/e7e5d6ef-eb04-4c32-aa8c-868fb0b40288%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/2bf9bc22-aad9-8a57-91e0-ebaf1042837a%40linuxia.de.
signature.asc
Description: OpenPGP digital signature
