Last active
July 22, 2020 17:49
-
-
Save IPvSean/573b71dc0f783309af6bb9fb1373f6ab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: remove stale interface config from Ethernet interfaces and turn on udld | |
connection: local | |
template: | |
src: template.j2 | |
dest: test_render.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: remove stale interface config from Ethernet interfaces and turn on udld | |
ios_config: | |
src: template.j2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% for tim_interface in hostvars[inventory_hostname].ansible_net_interfaces %} | |
interface {{ tim_interface }} | |
{% if "Vlan" not in tim_interface and "Tunnel" not in tim_interface and "Port" not in tim_interface %} | |
no spanning-tree portfast | |
no spanning-tree bpdufilter | |
udld port | |
{% endif %} | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment