Creating Device configuration snippets [CREATED] h1: initial,routing,h1 [CREATED] h2: initial,routing,h2 [CREATED] dut: normalize,initial,routing Checking Are lab devices ready to be configured? [INFO] Checking SSH server(s) on dut [SSH] SSH server on node dut (device ioll2) is ready after 9.3 seconds Config Normalizing device configurations [WARNING]: Found variable using reserved name: hosts PLAY [Normalize device configurations] ***************************************** 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] *************** ok: [dut] => { "msg": "normalize configuration for dut\n=========================================\n!\ninterface Ethernet0/1\n shutdown\n!\ninterface Ethernet0/2\n shutdown\n" } TASK [Deploy normalize configuration] ****************************************** included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/ios.yml for dut TASK [ios_config: deploying normalize from /work/netlab_cicd/node_files/dut/normalize] *** [WARNING]: To ensure idempotency and correct diff the input configuration lines should be similar to how they appear if present in the running configuration on device including the indentation changed: [dut] PLAY RECAP ********************************************************************* dut : ok=8 changed=1 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Config Deploying device configurations [INFO] Executing initial configuration for node h1 (namespace clab- ml-17-h1) [INFO] Executing initial configuration for node h2 (namespace clab- ml-17-h2) [INFO] Executing routing configuration for node h1 (namespace clab- ml-17-h1) [INFO] Executing routing configuration for node h2 (namespace clab- ml-17-h2) [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: [h1] ok: [h2] ok: [dut] TASK [Deploy initial configuration] ******************************************** included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-module.yml for h1, h2, dut TASK [Figure out whether to deploy the module initial on current device] ******* ok: [h1] ok: [h2] ok: [dut] TASK [Find configuration template for initial] ********************************* skipping: [h1] skipping: [h2] ok: [dut] TASK [fail] ******************************************************************** skipping: [h1] skipping: [h2] skipping: [dut] TASK [Find configuration deployment deploy_script for initial] ***************** skipping: [h1] skipping: [h2] ok: [dut] TASK [Print deployed configuration when running in verbose mode] *************** skipping: [h1] skipping: [h2] ok: [dut] => { "msg": "initial configuration for dut\n=========================================\nhostname dut\n!\nno ip domain lookup\nlogging buffered 256000\n\n!\nlldp run\n!\nip host h1 172.16.0.1\nip host h2 192.168.0.2\n!\nip routing\n!\nno ipv6 unicast-routing\n!\n!\ninterface Loopback0\n ip address 10.0.0.3 255.255.255.255\n!\ninterface Ethernet0/0\n no lldp transmit\n no lldp receive\n!\ninterface Ethernet0/1\n no switchport\n description dut -> h1 [probe]\n ip mtu 1500\n ip address 172.16.0.3 255.255.255.0\n mac-address caf0.0003.0001\n no shutdown\n!\ninterface Ethernet0/2\n no switchport\n description dut -> h2 [stub]\n ip mtu 1500\n ip address 192.168.0.3 255.255.255.0\n mac-address caf0.0003.0002\n no shutdown\n!\n!\n! Configure DHCP client - has to be done before routing protocol config, but after generic interface config\n!\n\n!\nline vty 0 4\n exec-timeout 0 0 \n!\nno banner exec\nno banner login\nno banner incoming\n" } TASK [Deploy initial configuration] ******************************************** skipping: [h1] skipping: [h2] included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/ios.yml for dut TASK [ios_config: deploying initial from /work/netlab_cicd/node_files/dut/initial] *** [WARNING]: To ensure idempotency and correct diff the input configuration lines should be similar to how they appear if present in the running configuration on device including the indentation changed: [dut] PLAY [Deploy module-specific configurations] *********************************** TASK [Set variables that cannot be set with VARS] ****************************** ok: [h1] ok: [h2] ok: [dut] TASK [Deploy individual configuration modules] ********************************* included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-module.yml for h1, h2, dut => (item=routing) TASK [Figure out whether to deploy the module routing on current device] ******* ok: [h1] ok: [h2] ok: [dut] TASK [Find configuration template for routing] ********************************* skipping: [h1] skipping: [h2] ok: [dut] TASK [fail] ******************************************************************** skipping: [h1] skipping: [h2] skipping: [dut] TASK [Find configuration deployment deploy_script for routing] ***************** skipping: [h1] skipping: [h2] ok: [dut] TASK [Print deployed configuration when running in verbose mode] *************** skipping: [h1] skipping: [h2] ok: [dut] => { "msg": "routing configuration for dut\n=========================================\n\n\nip access-list extended h1_filter_ipv4\n 100 remark test ACL\n 110 permit icmp any any\n 120 permit tcp host 172.16.0.1 host 192.168.0.2 eq 100\n 130 deny tcp 172.16.0.0 0.0.0.255 192.168.0.0 0.0.255.255 range 50 150\n 140 permit tcp 172.16.0.0 0.0.0.255 192.168.0.0 0.0.0.255 lt 50\n 150 permit tcp 172.16.0.0 0.0.0.255 192.168.0.0 0.0.0.255 gt 150\nip access-list extended h1_est_ipv4\n 100 permit tcp any any established log\n 110 deny tcp any any\n 120 permit ip any any\n!\ninterface Ethernet0/1\n ip access-group h1_filter_ipv4 in\n ip access-group h1_est_ipv4 out\n!\ninterface Ethernet0/2\n!\n!\n" } TASK [Deploy routing configuration] ******************************************** skipping: [h1] skipping: [h2] included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/ios.yml for dut TASK [ios_config: deploying routing from /work/netlab_cicd/node_files/dut/routing] *** changed: [dut] PLAY [Deploy custom deployment templates] ************************************** TASK [Run custom configuration deployment scripts] ***************************** skipping: [h1] => (item=h2) skipping: [h2] => (item=h1) included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-custom-config.yml for h1 => (item=h1) included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-custom-config.yml for h2 => (item=h2) TASK [Find configuration template] ********************************************* ok: [h1] TASK [fail] ******************************************************************** skipping: [h1] TASK [Check is the configuration template is a file] *************************** ok: [h1 -> localhost] TASK [fail] ******************************************************************** skipping: [h1] TASK [Process template /work/netlab_cicd/node_files/h1/h1 for h1] ************** skipping: [h1] TASK [debug] ******************************************************************* skipping: [h1] TASK [debug] ******************************************************************* skipping: [h1] TASK [Find custom configuration deployment script] ***************************** ok: [h1] TASK [Run the configuration deployment script] ********************************* included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/linux-clab.yml for h1 TASK [Define script filename and determine whether to execute in netns] ******** ok: [h1] TASK [Create a temporary file for the rendered script] ************************* changed: [h1 -> localhost] TASK [Create container setup script from /work/netlab_cicd/node_files/h1/h1] *** changed: [h1 -> localhost] TASK [Copy script into running container at /tmp/config-h1_h1.sh] ************** changed: [h1 -> localhost] TASK [Execute /tmp/config-h1_h1.sh to deploy h1 config based on /work/netlab_cicd/node_files/h1/h1] *** changed: [h1] TASK [Container configuration for h1 based on /work/netlab_cicd/node_files/h1/h1 executed in netns] *** skipping: [h1] TASK [Remove temporary file /tmp/h1_h1-qarsmmzr.sh] **************************** changed: [h1 -> localhost] TASK [Find configuration template] ********************************************* ok: [h2] TASK [fail] ******************************************************************** skipping: [h2] TASK [Check is the configuration template is a file] *************************** ok: [h2 -> localhost] TASK [fail] ******************************************************************** skipping: [h2] TASK [Process template /work/netlab_cicd/node_files/h2/h2 for h2] ************** skipping: [h2] TASK [debug] ******************************************************************* skipping: [h2] TASK [debug] ******************************************************************* skipping: [h2] TASK [Find custom configuration deployment script] ***************************** ok: [h2] TASK [Run the configuration deployment script] ********************************* included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/linux-clab.yml for h2 TASK [Define script filename and determine whether to execute in netns] ******** ok: [h2] TASK [Create a temporary file for the rendered script] ************************* changed: [h2 -> localhost] TASK [Create container setup script from /work/netlab_cicd/node_files/h2/h2] *** changed: [h2 -> localhost] TASK [Copy script into running container at /tmp/config-h2_h2.sh] ************** changed: [h2 -> localhost] TASK [Execute /tmp/config-h2_h2.sh to deploy h2 config based on /work/netlab_cicd/node_files/h2/h2] *** changed: [h2] TASK [Container configuration for h2 based on /work/netlab_cicd/node_files/h2/h2 executed in netns] *** skipping: [h2] TASK [Remove temporary file /tmp/h2_h2-cdlsoy6r.sh] **************************** changed: [h2 -> localhost] PLAY RECAP ********************************************************************* dut : ok=16 changed=2 unreachable=0 failed=0 skipped=2 rescued=0 ignored=0 h1 : ok=17 changed=5 unreachable=0 failed=0 skipped=16 rescued=0 ignored=0 h2 : ok=17 changed=5 unreachable=0 failed=0 skipped=16 rescued=0 ignored=0 Results of configuration script deployments ================================================================================ h1 Script: initial,routing h2 Script: initial,routing The device under test is a simple router with in/out ACLs on the interface facing h1