JNPRAutomate / ansible-junos-evpn-vxlan

Sample project that use Ansible and Jinja2 template to automatically generate configurations for Juniper devices deploy in EVPN/VXLAN fabric mode
MIT License
91 stars 64 forks source link

/* This block of configuration has been generated by the role ... */ #38

Open ksator opened 7 years ago

ksator commented 7 years ago

Hello, I think we should remove these lines (which are comming from the templates in the roles) from the junos configuration running on the devices:

/* This block of configuration has been generated by the role underlay-ebgp for Ansible */
/* This block of configuration has been generated by the role overlay-evpn-qfx-l2 for Ansible */
...

We can use this ansible module to remove these lines before to push them on Junos devices http://docs.ansible.com/ansible/lineinfile_module.html

as:

lab@leaf-01> show configuration | match block
/* This block of configuration has been generated by the role underlay-ebgp for Ansible */
/* This block of configuration has been generated by the role overlay-evpn-qfx-l2 for Ansible */
lab@leaf-01> show configuration | find block
/* This block of configuration has been generated by the role underlay-ebgp for Ansible */
interfaces {
    xe-0/0/12 {
        description "to access";
        flexible-vlan-tagging;
        unit 10 {
            vlan-id 10;
        }
        unit 11 {
            vlan-id 11;
        }
    }
    xe-0/0/13 {
        description "to access";
        flexible-vlan-tagging;
        unit 10 {
            vlan-id 10;
        }
        unit 11 {
            vlan-id 11;
        }
        unit 12 {
            vlan-id 12;
        }
        unit 13 {
            vlan-id 13;
        }
    }
    et-0/0/48 {
        description " * to spine-01";
        mtu 9192;
        unit 0 {
            family inet {
                mtu 9000;
                address 172.16.0.1/31;
            }
        }
    }
dgarros commented 7 years ago

Good point, lets remove them Feel free to send a pull request or I'll do it during the next update Thanks