11Creating Device configuration snippets
2- [CREATED] dut: initial,ospf,bgp
2+ [CREATED] dut: initial,routing, ospf,bgp
33[CREATED] dut2: initial,bgp
44[CREATED] x1: initial,bgp
55[CREATED] x2: initial,bgp
@@ -23,7 +23,7 @@ ok: [dut]
2323ok: [dut2]
2424
2525TASK [Normalize config on bridge-like devices] *********************************
26- included: /home/pipi/netlab_gh /netsim/ansible/tasks/deploy-module.yml for dut, dut2
26+ included: /home/pipi/net101/tools /netsim/ansible/tasks/deploy-module.yml for dut, dut2
2727
2828TASK [Figure out whether to deploy the module normalize on current device] *****
2929ok: [dut]
@@ -50,7 +50,7 @@ skipping: [dut]
5050skipping: [dut2]
5151
5252TASK [Deploy initial configuration] ********************************************
53- included: /home/pipi/netlab_gh /netsim/ansible/tasks/deploy-module.yml for dut, dut2
53+ included: /home/pipi/net101/tools /netsim/ansible/tasks/deploy-module.yml for dut, dut2
5454
5555TASK [Figure out whether to deploy the module initial on current device] *******
5656ok: [dut]
@@ -77,11 +77,11 @@ ok: [dut2] => {
7777}
7878
7979TASK [Deploy initial configuration] ********************************************
80- included: /home/pipi/netlab_gh /netsim/ansible/tasks/deploy-config/openbsd.yml for dut, dut2
80+ included: /home/pipi/net101/tools /netsim/ansible/tasks/deploy-config/openbsd.yml for dut, dut2
8181
8282TASK [template] ****************************************************************
83- changed: [dut]
8483changed: [dut2]
84+ changed: [dut]
8585
8686TASK [Execute /tmp/config.sh to deploy initial config from /work/netlab_cicd/node_files/dut/initial] ***
8787changed: [dut2]
@@ -94,8 +94,41 @@ ok: [dut]
9494ok: [dut2]
9595
9696TASK [Deploy individual configuration modules] *********************************
97- included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-module.yml for dut, dut2 => (item=ospf)
98- included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-module.yml for dut, dut2 => (item=bgp)
97+ included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-module.yml for dut, dut2 => (item=routing)
98+ included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-module.yml for dut, dut2 => (item=ospf)
99+ included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-module.yml for dut, dut2 => (item=bgp)
100+
101+ TASK [Figure out whether to deploy the module routing on current device] *******
102+ ok: [dut]
103+ ok: [dut2]
104+
105+ TASK [Find configuration template for routing] *********************************
106+ skipping: [dut2]
107+ ok: [dut]
108+
109+ TASK [fail] ********************************************************************
110+ skipping: [dut]
111+ skipping: [dut2]
112+
113+ TASK [Find configuration deployment deploy_script for routing] *****************
114+ skipping: [dut2]
115+ ok: [dut]
116+
117+ TASK [Print deployed configuration when running in verbose mode] ***************
118+ skipping: [dut2]
119+ ok: [dut] => {
120+ "msg": "routing configuration for dut\n=========================================\n#!/bin/bash\n#\nset -e\nset -x\n#\n#\n#\n#\necho Adding discard static routes\nroute delete 172.42.42.0/24 || true\nroute add -blackhole 172.42.42.0/24 127.0.0.1\n"
121+ }
122+
123+ TASK [Deploy routing configuration] ********************************************
124+ skipping: [dut2]
125+ included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-config/openbsd.yml for dut
126+
127+ TASK [template] ****************************************************************
128+ changed: [dut]
129+
130+ TASK [Execute /tmp/config.sh to deploy routing config from /work/netlab_cicd/node_files/dut/routing] ***
131+ changed: [dut]
99132
100133TASK [Figure out whether to deploy the module ospf on current device] **********
101134ok: [dut]
@@ -116,12 +149,12 @@ ok: [dut]
116149TASK [Print deployed configuration when running in verbose mode] ***************
117150skipping: [dut2]
118151ok: [dut] => {
119- "msg": "ospf configuration for dut\n=========================================\n#!/bin/sh\ncat <<'OSPFD_CONF' >/etc/ospfd.conf\nrouter-id 10.0.0.1\nspf-delay msec 100\nspf-holdtime msec 200\n\narea 0.0.0.0 {\n interface lo0:10.0.0.1 {\n }\n interface vio1 {\n type p2p\n }\n interface vio5 {\n passive\n }\n}\n \nOSPFD_CONF\n\nchmod 640 /etc/ospfd.conf\nrcctl enable ospfd\nrcctl restart ospfd\n\n"
152+ "msg": "ospf configuration for dut\n=========================================\n#!/bin/sh\ncat <<'OSPFD_CONF' >/etc/ospfd.conf\nrouter-id 10.0.0.1\nspf-delay msec 100\nspf-holdtime msec 200\n\narea 0.0.0.0 {\n interface lo0:10.0.0.1 {\n }\n interface vio1 {\n type p2p\n hello-interval 1\n router-dead-time 3\n }\n interface vio5 {\n passive\n hello-interval 1\n router-dead-time 3 \n }\n}\n \nOSPFD_CONF\n\nchmod 640 /etc/ospfd.conf\nrcctl enable ospfd\nrcctl restart ospfd\n\n"
120153}
121154
122155TASK [Deploy ospf configuration] ***********************************************
123156skipping: [dut2]
124- included: /home/pipi/netlab_gh /netsim/ansible/tasks/deploy-config/openbsd.yml for dut
157+ included: /home/pipi/net101/tools /netsim/ansible/tasks/deploy-config/openbsd.yml for dut
125158
126159TASK [template] ****************************************************************
127160changed: [dut]
@@ -147,18 +180,18 @@ ok: [dut2]
147180
148181TASK [Print deployed configuration when running in verbose mode] ***************
149182ok: [dut] => {
150- "msg": "bgp configuration for dut\n=========================================\n#!/bin/sh\n\ncat <<BGPD_CONF >/etc/bgpd.conf\nAS 65000\nrouter-id 10.0.0.1\nlog updates\n\n## network announcements\n\nnetwork 172.42.43.0/24\nnetwork 172.42.42.0/24\nnetwork 172.0.42.0/24\n\n## neighbors and groups\n\nneighbor 10.0.0.5 {\n remote-as 65000\n descr \"r1\"\n local-address 10.0.0.1\n}\nneighbor 10.1.0.6 {\n remote-as 65100\n descr \"x1\"\n}\nneighbor 10.1.0.10 {\n remote-as 65101\n descr \"x2\"\n}\nneighbor 172.0.66.2 {\n remote-as 65001\n descr \"dut2\"\n}\n\n## rules\n\nmatch from ebgp set { nexthop self }\nmatch to ebgp set { ext-community delete * * }\n\nallow from any\nallow to any\n\nBGPD_CONF\n\nchmod 640 /etc/bgpd.conf\nrcctl enable bgpd\nrcctl restart bgpd\n\nroute add -blackhole 172.42.42.0/24 -priority 63 localhost\ n"
183+ "msg": "bgp configuration for dut\n=========================================\n#!/bin/sh\n\ncat <<BGPD_CONF >/etc/bgpd.conf\nAS 65000\nrouter-id 10.0.0.1\nlog updates\n\n## network announcements\n\nnetwork 172.42.43.0/24\nnetwork 172.42.42.0/24\nnetwork 172.0.42.0/24\n\n## neighbors and groups\n\nneighbor 10.0.0.5 {\n remote-as 65000\n descr \"r1\"\n local-address 10.0.0.1\n}\nneighbor 10.1.0.6 {\n remote-as 65100\n descr \"x1\"\n}\nneighbor 10.1.0.10 {\n remote-as 65101\n descr \"x2\"\n}\nneighbor 172.0.66.2 {\n remote-as 65001\n descr \"dut2\"\n}\n\n## rules\n\nmatch from ebgp set { nexthop self }\nmatch to ebgp set { ext-community delete * * }\n\nallow from any\nallow to any\n\nBGPD_CONF\n\nchmod 640 /etc/bgpd.conf\nrcctl enable bgpd\nrcctl restart bgpd\n\n"
151184}
152185ok: [dut2] => {
153186 "msg": "bgp configuration for dut2\n=========================================\n#!/bin/sh\n\ncat <<BGPD_CONF >/etc/bgpd.conf\nAS 65001\nrouter-id 10.0.0.2\nlog updates\n\n## network announcements\n\nnetwork 10.0.0.2/32\n\n## neighbors and groups\n\nneighbor 172.0.66.1 {\n remote-as 65000\n descr \"dut\"\n}\n\n## rules\n\nmatch from ebgp set { nexthop self }\nmatch to ebgp set { ext-community delete * * }\n\nallow from any\nallow to any\n\nBGPD_CONF\n\nchmod 640 /etc/bgpd.conf\nrcctl enable bgpd\nrcctl restart bgpd\n\n"
154187}
155188
156189TASK [Deploy bgp configuration] ************************************************
157- included: /home/pipi/netlab_gh /netsim/ansible/tasks/deploy-config/openbsd.yml for dut, dut2
190+ included: /home/pipi/net101/tools /netsim/ansible/tasks/deploy-config/openbsd.yml for dut, dut2
158191
159192TASK [template] ****************************************************************
160- changed: [dut]
161193changed: [dut2]
194+ changed: [dut]
162195
163196TASK [Execute /tmp/config.sh to deploy bgp config from /work/netlab_cicd/node_files/dut/bgp] ***
164197changed: [dut]
@@ -168,8 +201,8 @@ PLAY [Deploy custom deployment templates] **************************************
168201skipping: no hosts matched
169202
170203PLAY RECAP *********************************************************************
171- dut : ok=30 changed=6 unreachable=0 failed=0 skipped=6 rescued=0 ignored=0
172- dut2 : ok=24 changed=4 unreachable=0 failed=0 skipped=10 rescued=0 ignored=0
204+ dut : ok=38 changed=8 unreachable=0 failed=0 skipped=7 rescued=0 ignored=0
205+ dut2 : ok=26 changed=4 unreachable=0 failed=0 skipped=15 rescued=0 ignored=0
173206
174207Results of configuration script deployments
175208================================================================================
0 commit comments