Creating Device configuration snippets [CREATED] dut: initial,bgp,bgp.session [CREATED] x1: initial,bgp [CREATED] x2: initial,bgp Config Deploying device configurations [INFO] Executing initial configuration for node x1 [INFO] Executing initial configuration for node x2 [INFO] Executing bgp configuration for node x2 [INFO] Executing bgp configuration for node x1 [INFO] Starting Ansible playbook to deploy the rest of the configurations [WARNING]: Found variable using reserved name: hosts PLAY [Deploy initial device configuration] ************************************* TASK [Set variables that cannot be set with VARS] ****************************** ok: [dut] TASK [Normalize config on bridge-like devices] ********************************* included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-module.yml for dut TASK [Figure out whether to deploy the module normalize on current device] ***** ok: [dut] TASK [Find configuration template for normalize] ******************************* ok: [dut] TASK [fail] ******************************************************************** skipping: [dut] TASK [Find configuration deployment deploy_script for normalize] *************** ok: [dut] TASK [Print deployed configuration when running in verbose mode] *************** skipping: [dut] TASK [Deploy normalize configuration] ****************************************** skipping: [dut] TASK [Deploy initial configuration] ******************************************** included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-module.yml for dut TASK [Figure out whether to deploy the module initial on current device] ******* ok: [dut] TASK [Find configuration template for initial] ********************************* ok: [dut] TASK [fail] ******************************************************************** skipping: [dut] TASK [Find configuration deployment deploy_script for initial] ***************** ok: [dut] TASK [Print deployed configuration when running in verbose mode] *************** ok: [dut] => { "msg": "initial configuration for dut\n=========================================\n#!/bin/sh\n#\nset -e\nset -x\n\nhostname dut\n#\n# Build hosts file\n#\n#\ncat <<'SCRIPT' >/tmp/hosts\n#\n# Created by netlab initial\n#\n10.0.0.1 dut\n10.1.0.1 vio1.dut\n2001:db8:3::1 vio1.dut\n10.1.0.5 vio2.dut\n2001:db8:3:1::1 vio2.dut\n172.42.42.1 x1\n2001:db8:a02::1 x1\n10.1.0.2 eth1.x1\n2001:db8:3::2 eth1.x1\n172.42.43.1 x2\n2001:db8:a03::1 x2\n10.1.0.6 eth1.x2\n2001:db8:3:1::3 eth1.x2\nSCRIPT\ngrep \"Created by netlab\" /etc/hosts || uniq /tmp/hosts >>/etc/hosts\n\n#\n# Enable forwarding\n#\nsysctl net.inet.ip.forwarding=1\nsysctl net.inet6.ip6.forwarding=1\necho -n > /etc/rad.conf\n\n#\n# Interface configuration\n#\nifconfig lo0 inet 10.0.0.1/32 alias\n\nifconfig vio1 -inet\nifconfig vio1 -inet6\nifconfig vio1 inet 10.1.0.1/30 \necho interface vio1 >> /etc/rad.conf\nifconfig vio1 inet6 2001:db8:3::1/64\nifconfig vio1 description \"dut -> x1\"\n\nifconfig vio2 -inet\nifconfig vio2 -inet6\nifconfig vio2 inet 10.1.0.5/30 \necho interface vio2 >> /etc/rad.conf\nifconfig vio2 inet6 2001:db8:3:1::1/64\nifconfig vio2 description \"dut -> x2\"\n\n\n#\n# (re-)start RA daemon\n#\npkill -q rad || true\nrad\n" } TASK [Deploy initial configuration] ******************************************** included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/openbsd.yml for dut TASK [template] **************************************************************** changed: [dut] TASK [Execute /tmp/config.sh to deploy initial config from /work/netlab_cicd/node_files/dut/initial] *** changed: [dut] PLAY [Deploy module-specific configurations] *********************************** TASK [Set variables that cannot be set with VARS] ****************************** ok: [dut] TASK [Deploy individual configuration modules] ********************************* included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-module.yml for dut => (item=bgp) TASK [Figure out whether to deploy the module bgp on current device] *********** ok: [dut] TASK [Find configuration template for bgp] ************************************* ok: [dut] TASK [fail] ******************************************************************** skipping: [dut] TASK [Find configuration deployment deploy_script for bgp] ********************* ok: [dut] TASK [Print deployed configuration when running in verbose mode] *************** ok: [dut] => { "msg": "bgp configuration for dut\n=========================================\n#!/bin/sh\n\ncat </etc/bgpd.conf\nAS 65000\nrouter-id 10.0.0.1\nlog updates\n\n## network announcements\n\nnetwork 10.0.0.1/32\n\n## neighbors and groups\n\nneighbor 10.1.0.2 {\n remote-as 65100\n descr \"x1\"\n as-override yes\n}\nneighbor 2001:db8:3::2 {\n remote-as 65100\n descr \"x1\"\n as-override yes\n}\nneighbor 10.1.0.6 {\n remote-as 65100\n descr \"x2\"\n as-override yes\n}\nneighbor 2001:db8:3:1::3 {\n remote-as 65100\n descr \"x2\"\n as-override yes\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" } TASK [Deploy bgp configuration] ************************************************ included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/openbsd.yml for dut TASK [template] **************************************************************** changed: [dut] TASK [Execute /tmp/config.sh to deploy bgp config from /work/netlab_cicd/node_files/dut/bgp] *** changed: [dut] PLAY [Deploy custom deployment templates] ************************************** TASK [Run custom configuration deployment scripts] ***************************** included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-custom-config.yml for dut => (item=bgp.session) TASK [Find configuration template] ********************************************* ok: [dut] TASK [fail] ******************************************************************** skipping: [dut] TASK [Check is the configuration template is a file] *************************** ok: [dut -> localhost] TASK [fail] ******************************************************************** skipping: [dut] TASK [Process template /work/netlab_cicd/node_files/dut/bgp.session for dut] *** skipping: [dut] TASK [Find custom configuration deployment script] ***************************** ok: [dut] TASK [Run the configuration deployment script] ********************************* included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/openbsd.yml for dut TASK [template] **************************************************************** changed: [dut] TASK [Execute /tmp/config.sh to deploy bgp.session config from /work/netlab_cicd/node_files/dut/bgp.session] *** changed: [dut] PLAY RECAP ********************************************************************* dut : ok=29 changed=6 unreachable=0 failed=0 skipped=8 rescued=0 ignored=0 Results of configuration script deployments ================================================================================ x1 Script: initial,bgp x2 Script: initial,bgp Use this topology to test the 'as-override' functionality. The DUT has to replace the AS 65100 with AS 65000 in outgoing updates, causing X1 and X2 to accept EBGP updates from another site with the same AS.