Creating Device configuration snippets [CREATED] dut: initial [CREATED] h4: initial,dhcp [CREATED] dhsrv: initial,dhcp [CREATED] h0: initial [CREATED] h1: initial [CREATED] h2: initial [CREATED] h3: initial Config Deploying device configurations [INFO] Executing initial configuration for node dut [INFO] Executing initial configuration for node dhsrv (namespace clab-ml-17-dhsrv) [INFO] Executing initial configuration for node h0 [INFO] Executing initial configuration for node h1 [INFO] Executing initial configuration for node h3 [INFO] Executing initial configuration for node 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: [h4] TASK [Deploy initial configuration] ******************************************** included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-module.yml for h4 TASK [Figure out whether to deploy the module initial on current device] ******* ok: [h4] TASK [Find configuration template for initial] ********************************* ok: [h4] TASK [fail] ******************************************************************** skipping: [h4] TASK [Find configuration deployment deploy_script for initial] ***************** ok: [h4] TASK [Print deployed configuration when running in verbose mode] *************** ok: [h4] => { "msg": "initial configuration for h4\n=========================================\n#!/bin/bash\n#\nset -e\n#\n# Create bash profile script\n#\ncat <<'SCRIPT' >/root/.bash_profile\n#!/bin/bash\n#\nexport PS1=\"\\h(bash)$ \"\nSCRIPT\nhostname h4\n#\n# Build hosts file\n#\n#\ncat <<'SCRIPT' >/tmp/hosts\n#\n# Created by netlab initial\n#\n2001:db8:1:4::2 dhsrv eth1.dhsrv\n2001:db8:0:84::1 dut\n2001:db8:1::84 eth1.dut\n2001:db8:1:1::84 eth2.dut\n2001:db8:1:2::84 eth3.dut\n2001:db8:1:3::84 eth4.dut\n2001:db8:1:4::84 eth5.dut\nSCRIPT\ngrep \"Created by netlab\" /etc/hosts || uniq /tmp/hosts >>/etc/hosts\n# It seems on the Vagrant box for ubuntu 20.04, DNS Servers are hardcoded as 4.2.2.1 & Co.\n# This is annoying on a network with filtered DNS.\n# DNSMasq server used for giving out DHCP addresses on the management network is able to act as a DNS Server.\n# Let's use that.\n#\n# (Overwrite netplan config to remove DNS stuff)\necho -n 'Starting initial config ' && date\ncat <<'SCRIPT' >/etc/netplan/01-netcfg.yaml\nnetwork:\n version: 2\n renderer: networkd\n ethernets:\n eth0:\n dhcp4: true\n dhcp6: false\n optional: true\nSCRIPT\nnetplan apply\n\n# (Overwrite resolved config to remove DNS stuff)\ncat <<'SCRIPT' > /etc/systemd/resolved.conf \n[Resolve]\nDNS=\nFallbackDNS=\nDomains=\nDNSOverTLS=no\nCache=yes\nDNSStubListener=yes\nSCRIPT\n\nsystemctl restart systemd-resolved\n\n# Set persistent hostname\nhostnamectl set-hostname h4\n\nNEED_APT_UPDATE=YES\n\n# Loopback addressing\n\n# Interface addressing and bonds, including any static routes\ncat <<'SCRIPT' > /etc/netplan/03-eth-eth1.yaml\nnetwork:\n version: 2\n renderer: networkd\n ethernets:\n eth1:\n dhcp6: true\n accept-ra: true\nSCRIPT\n\n# Disable auto-negotiation on Ethernet interfaces, needed to make LACP work correctly\ncat <<'SCRIPT' > /etc/systemd/network/98-eth.link\n\n[Match]\nOriginalName=eth*\n\n[Link]\nBitsPerSecond=1G\nAutoNegotiation=no\nDuplex=full\nSCRIPT\n\nchmod 400 /etc/netplan/*\n\necho -n 'Starting netplan generate ' && date\nnetplan generate\necho -n 'Starting netplan apply ' && date\nnetplan apply\n\n#\n# Sysctl settings: IPv4/IPv6 forwarding, IPv6 LLA\n# Do this after 'netplan apply', e.g. bond devices won't exist before that\n#\ncat <<'SCRIPT' > /etc/sysctl.d/10-netsim.conf\nnet.ipv4.conf.all.arp_announce=2\nnet.ipv4.ip_forward=0\nnet.ipv6.conf.all.forwarding=0\n\nnet.ipv6.conf.eth1.disable_ipv6=1\n\nSCRIPT\nsysctl -p /etc/sysctl.d/10-netsim.conf\n" } TASK [Deploy initial configuration] ******************************************** included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/linux.yml for h4 TASK [template] **************************************************************** changed: [h4] TASK [Execute /tmp/config.sh to deploy initial config from /work/netlab_cicd/node_files/h4/initial] *** changed: [h4] PLAY [Deploy module-specific configurations] *********************************** TASK [Set variables that cannot be set with VARS] ****************************** ok: [h4] TASK [Deploy individual configuration modules] ********************************* included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-module.yml for h4 => (item=dhcp) TASK [Figure out whether to deploy the module dhcp on current device] ********** ok: [h4] TASK [Find configuration template for dhcp] ************************************ ok: [h4] TASK [fail] ******************************************************************** skipping: [h4] TASK [Find configuration deployment deploy_script for dhcp] ******************** ok: [h4] TASK [Print deployed configuration when running in verbose mode] *************** ok: [h4] => { "msg": "dhcp configuration for h4\n=========================================\n# This is a placeholder file. DHCP is configured during initial configuration\n#\nif [ `grep 'ID=ubuntu' /etc/os-release` ]; then\n echo \"DHCP is supported, it should work after another plea to netplan\"\n netplan apply\nelse\n echo \"netlab supports DHCP only on Ubuntu\" >&2\n exit 1\nfi\n" } TASK [Deploy dhcp configuration] *********************************************** included: /home/pipi/netlab_gh/netsim/ansible/tasks/linux/dhcp.yml for h4 TASK [Install dnsmasq] ********************************************************* skipping: [h4] TASK [Install isc-dhcp-relay] ************************************************** skipping: [h4] TASK [Create DHCP deployment script] ******************************************* changed: [h4] TASK [Execute /tmp/config.sh to deploy dhcp config from /work/netlab_cicd/node_files/h4/dhcp] *** changed: [h4] PLAY [Deploy custom deployment templates] ************************************** skipping: no hosts matched PLAY RECAP ********************************************************************* h4 : ok=18 changed=4 unreachable=0 failed=0 skipped=4 rescued=0 ignored=0 Results of configuration script deployments ================================================================================ dut Script: initial dhsrv Script: initial h0 Script: initial h1 Script: initial h2 Script: initial h3 Script: initial This scenario tests IPv6 RA behavior