[WARNING]: Could not match supplied host pattern, ignoring: unprovisioned

PLAY [Deploy initial device configuration] *************************************

TASK [Set variables that cannot be set with VARS] ******************************
ok: [dut]
ok: [x1]
ok: [x2]

TASK [Find device readiness script] ********************************************
ok: [dut]
ok: [x1]
ok: [x2]

TASK [Wait for device to become ready] *****************************************
skipping: [dut]
skipping: [x1]
skipping: [x2]

TASK [Normalize config on bridge-like devices] *********************************
included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-module.yml for dut, x1, x2

TASK [Figure out whether to deploy the module normalize on current device] *****
ok: [dut]
ok: [x1]
ok: [x2]

TASK [Find configuration template for normalize] *******************************
ok: [dut]
ok: [x1]
ok: [x2]

TASK [fail] ********************************************************************
skipping: [dut]
skipping: [x1]
skipping: [x2]

TASK [Print deployed configuration when running in verbose mode] ***************
skipping: [dut]
skipping: [x1]
skipping: [x2]

TASK [Find configuration deployment deploy_script for normalize] ***************
skipping: [dut]
skipping: [x1]
skipping: [x2]

TASK [Deploy normalize configuration] ******************************************
skipping: [dut]
skipping: [x1]
skipping: [x2]

TASK [Deploy initial configuration] ********************************************
included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-module.yml for dut, x1, x2

TASK [Figure out whether to deploy the module initial on current device] *******
ok: [dut]
ok: [x1]
ok: [x2]

TASK [Find configuration template for initial] *********************************
ok: [dut]
ok: [x1]
ok: [x2]

TASK [fail] ********************************************************************
skipping: [dut]
skipping: [x1]
skipping: [x2]

TASK [Print deployed configuration when running in verbose mode] ***************
ok: [dut] => 
  msg: |-
    initial configuration for dut
    =========================================
    #!/bin/vbash
    source /opt/vyatta/etc/functions/script-template
  
    if [ "$(id -g -n)" != 'vyattacfg' ] ; then
        exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@"
    fi
  
    # Configuration items start here
  
    configure
    set system host-name 'dut'
  
  
    set interfaces dummy dum0 address 10.0.0.1/32
  
  
  
    set interfaces ethernet eth1 description 'dut -> x1 [external]'
  
    set interfaces ethernet eth1 mtu 1500
  
    set interfaces ethernet eth1 address 10.1.0.1/30
  
    set interfaces ethernet eth1 address 2001:db8:3::1/64;
  
  
  
  
    set interfaces ethernet eth2 description 'dut -> x2 [external]'
  
    set interfaces ethernet eth2 mtu 1500
  
    set interfaces ethernet eth2 address 10.1.0.5/30
  
    set interfaces ethernet eth2 address 2001:db8:3:1::1/64;
  
  
  
    set service lldp interface all
    set service lldp interface eth0 disable
  
    set service router-advert interface eth1
    set service router-advert interface eth2
  
    set service ssh
  
    # Commit, save and exit from subshell
  
    commit
    save
    exit
  
    # Restart FRR to pick up the new hostname
    sudo service frr restart
ok: [x1] => 
  msg: |-
    initial configuration for x1
    =========================================
    #!/bin/bash
    #
    set -e
    set -x
    #
    # Create bash profile script
    #
    cat <<SCRIPT >/root/.bash_profile
    #!/bin/bash
    #
    export PS1="\h(bash)# "
    echo
    echo "Use vtysh to connect to FRR daemon"
    echo
    SCRIPT
    #
    # Get the current next hop for the default route
    #
    def_nh=$(ip route list default|awk '{ print $3 }')
    #
    # Create the management VRF and add eth0 to it
    #
    if [ ! -e /sys/devices/virtual/net/mgmt ]; then
      ip link add mgmt type vrf table 42
    fi
    ip link set mgmt up
    sysctl -qw net.ipv6.conf.eth0.keep_addr_on_down=1
    ip link set eth0 master mgmt
    #
    # Reinstall the default route if we had it before
    #
    if [[ -n "$def_nh" ]]; then
      ip route add 0.0.0.0/0 vrf mgmt via $def_nh
    fi
    #
    # Enable FRR modules (if not using containerlab bind-mounted /etc/frr/daemons)
    #
  
    #
    # Create loopbacks, stub and lag/bond devices
    #
    if [ ! -e /sys/class/net/lo ]; then
      if [ ! -e /sys/devices/virtual/net/lo ]; then
        ip link add lo type dummy
        ip link set dev lo up
      fi
    fi
  
    # Disable IPv6 (for IPv4-only interfaces) or SLAAC (if the device is a router)
    #
    sysctl -qw net.ipv6.conf.eth1.autoconf=0
    sysctl -qw net.ipv6.conf.eth1.accept_ra=0
    ip link set eth1 down
    ip link set eth1 up
  
    #
    # Add vtysh.conf file
    echo "service integrated-vtysh-config" >/etc/frr/vtysh.conf
    #
    # Set Ethernet interface MTU
    ip link set dev eth1 mtu 1500
  
    #
    # Rest of initial configuration done through VTYSH
    #
    cat >/tmp/config <<CONFIG
    hostname x1
    !
    vrf mgmt
     exit-vrf
    !
    ipv6 forwarding
    frr defaults datacenter
    !
    interface lo
     no shutdown
     ip address 172.42.42.1/24
     ipv6 address 2001:db8:a02::1/64
    !
    interface eth1
     no shutdown
     description x1 -> dut [external]
     ip address 10.1.0.2/30
     ipv6 address 2001:db8:3::2/64
     ipv6 nd ra-interval 5
     no ipv6 nd suppress-ra
    !
    do write
    CONFIG
    vtysh -f /tmp/config
    exit 0
ok: [x2] => 
  msg: |-
    initial configuration for x2
    =========================================
    #!/bin/bash
    #
    set -e
    set -x
    #
    # Create bash profile script
    #
    cat <<SCRIPT >/root/.bash_profile
    #!/bin/bash
    #
    export PS1="\h(bash)# "
    echo
    echo "Use vtysh to connect to FRR daemon"
    echo
    SCRIPT
    #
    # Get the current next hop for the default route
    #
    def_nh=$(ip route list default|awk '{ print $3 }')
    #
    # Create the management VRF and add eth0 to it
    #
    if [ ! -e /sys/devices/virtual/net/mgmt ]; then
      ip link add mgmt type vrf table 42
    fi
    ip link set mgmt up
    sysctl -qw net.ipv6.conf.eth0.keep_addr_on_down=1
    ip link set eth0 master mgmt
    #
    # Reinstall the default route if we had it before
    #
    if [[ -n "$def_nh" ]]; then
      ip route add 0.0.0.0/0 vrf mgmt via $def_nh
    fi
    #
    # Enable FRR modules (if not using containerlab bind-mounted /etc/frr/daemons)
    #
  
    #
    # Create loopbacks, stub and lag/bond devices
    #
    if [ ! -e /sys/class/net/lo ]; then
      if [ ! -e /sys/devices/virtual/net/lo ]; then
        ip link add lo type dummy
        ip link set dev lo up
      fi
    fi
  
    # Disable IPv6 (for IPv4-only interfaces) or SLAAC (if the device is a router)
    #
    sysctl -qw net.ipv6.conf.eth1.autoconf=0
    sysctl -qw net.ipv6.conf.eth1.accept_ra=0
    ip link set eth1 down
    ip link set eth1 up
  
    #
    # Add vtysh.conf file
    echo "service integrated-vtysh-config" >/etc/frr/vtysh.conf
    #
    # Set Ethernet interface MTU
    ip link set dev eth1 mtu 1500
  
    #
    # Rest of initial configuration done through VTYSH
    #
    cat >/tmp/config <<CONFIG
    hostname x2
    !
    vrf mgmt
     exit-vrf
    !
    ipv6 forwarding
    frr defaults datacenter
    !
    interface lo
     no shutdown
     ip address 172.42.43.1/24
     ipv6 address 2001:db8:a03::1/64
    !
    interface eth1
     no shutdown
     description x2 -> dut [external]
     ip address 10.1.0.6/30
     ipv6 address 2001:db8:3:1::2/64
     ipv6 nd ra-interval 5
     no ipv6 nd suppress-ra
    !
    do write
    CONFIG
    vtysh -f /tmp/config
    exit 0

TASK [Find configuration deployment deploy_script for initial] *****************
ok: [dut]
ok: [x1]
ok: [x2]

TASK [Deploy initial configuration] ********************************************
included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-config/vyos.yml for dut
included: /home/pipi/net101/tools/netsim/ansible/tasks/frr/initial-clab.yml for x1, x2

TASK [wait_for_connection] *****************************************************
ok: [dut]

TASK [wait_for] ****************************************************************
ok: [dut]

TASK [set_fact] ****************************************************************
ok: [dut]

TASK [set_fact] ****************************************************************
ok: [dut]

TASK [template] ****************************************************************
changed: [dut]

TASK [execute config-initial.sh to deploy initial config from /home/pipi/net101/tools/netsim/ansible/templates/initial/vyos.j2] ***
changed: [dut]

TASK [Attempt to load VRF kernel module] ***************************************
changed: [x1 -> localhost]

TASK [Disable FRR management VRF when modprobe fails] **************************
skipping: [x1]
skipping: [x2]

TASK [include_tasks] ***********************************************************
included: /home/pipi/net101/tools/netsim/ansible/tasks/frr/deploy-config.yml for x1, x2

TASK [template] ****************************************************************
changed: [x1]
changed: [x2]

TASK [set_fact] ****************************************************************
ok: [x1]
ok: [x2]

TASK [run /tmp/config.sh to deploy initial config from /home/pipi/net101/tools/netsim/ansible/templates/initial/frr.j2] ***
changed: [x1]
changed: [x2]

TASK [run vtysh to import initial config from /home/pipi/net101/tools/netsim/ansible/templates/initial/frr.j2] ***
skipping: [x1]
skipping: [x2]

PLAY [Deploy module-specific configurations] ***********************************

TASK [Set variables that cannot be set with VARS] ******************************
ok: [dut]
ok: [x1]
ok: [x2]

TASK [Deploy individual configuration modules] *********************************
included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-module.yml for dut, x1, x2 => (item=bgp)

TASK [Figure out whether to deploy the module bgp on current device] ***********
ok: [dut]
ok: [x1]
ok: [x2]

TASK [Find configuration template for bgp] *************************************
ok: [dut]
ok: [x1]
ok: [x2]

TASK [fail] ********************************************************************
skipping: [dut]
skipping: [x1]
skipping: [x2]

TASK [Print deployed configuration when running in verbose mode] ***************
ok: [dut] => 
  msg: |-
    bgp configuration for dut
    =========================================
    #!/bin/vbash
    source /opt/vyatta/etc/functions/script-template
  
    if [ "$(id -g -n)" != 'vyattacfg' ] ; then
        exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@"
    fi
  
    # Configuration items start here
  
    configure
  
    set protocols bgp system-as 65000
  
    set protocols bgp parameters router-id 10.0.0.1
  
  
  
    set protocols bgp neighbor 10.1.0.2 remote-as 65100
    set protocols bgp neighbor 10.1.0.2 description 'x1'
  
  
  
  
  
    set protocols bgp neighbor 2001:db8:3::2 remote-as 65100
    set protocols bgp neighbor 2001:db8:3::2 description 'x1'
  
  
  
  
  
    set protocols bgp neighbor 10.1.0.6 remote-as 65100
    set protocols bgp neighbor 10.1.0.6 description 'x2'
  
  
  
  
  
    set protocols bgp neighbor 2001:db8:3:1::2 remote-as 65100
    set protocols bgp neighbor 2001:db8:3:1::2 description 'x2'
  
  
  
  
  
    # Work on Family ipv4
  
  
    set protocols bgp address-family ipv4-unicast network 10.0.0.1/32
  
  
  
  
  
    set protocols bgp neighbor 10.1.0.2 address-family ipv4-unicast soft-reconfiguration inbound
  
    set protocols bgp neighbor 10.1.0.2 address-family ipv4-unicast nexthop-self
  
    set protocols bgp neighbor 10.1.0.2 address-family ipv4-unicast disable-send-community extended
  
  
  
    set protocols bgp neighbor 10.1.0.6 address-family ipv4-unicast soft-reconfiguration inbound
  
    set protocols bgp neighbor 10.1.0.6 address-family ipv4-unicast nexthop-self
  
    set protocols bgp neighbor 10.1.0.6 address-family ipv4-unicast disable-send-community extended
  
  
  
    # Work on Family ipv6
  
  
  
  
  
  
  
    set protocols bgp neighbor 2001:db8:3::2 address-family ipv6-unicast soft-reconfiguration inbound
  
    set protocols bgp neighbor 2001:db8:3::2 address-family ipv6-unicast nexthop-self
  
    set protocols bgp neighbor 2001:db8:3::2 address-family ipv6-unicast disable-send-community extended
  
  
  
    set protocols bgp neighbor 2001:db8:3:1::2 address-family ipv6-unicast soft-reconfiguration inbound
  
    set protocols bgp neighbor 2001:db8:3:1::2 address-family ipv6-unicast nexthop-self
  
    set protocols bgp neighbor 2001:db8:3:1::2 address-family ipv6-unicast disable-send-community extended
  
  
  
  
    # Commit, save and exit from subshell
  
    commit
    save
    exit
ok: [x1] => 
  msg: |-
    bgp configuration for x1
    =========================================
    !
    router bgp 65100
      no bgp ebgp-requires-policy
      no bgp default ipv4-unicast
      bgp default show-hostname
      bgp default show-nexthop-hostname
  
      ! Consider AS paths of same length but with different AS as ECMP candidates
      bgp bestpath as-path multipath-relax
  
      bgp router-id 172.42.42.1
    !
      neighbor 10.1.0.1 remote-as 65000
      neighbor 10.1.0.1 description dut
    !
      neighbor 2001:db8:3::1 remote-as 65000
      neighbor 2001:db8:3::1 description dut
    !
     address-family ipv4 unicast
    !
  
    !
      network 172.42.42.0/24
    !
    !
    !
      neighbor 10.1.0.1 activate
      no neighbor 10.1.0.1 send-community all
      neighbor 10.1.0.1 send-community standard
      neighbor 10.1.0.1 send-community large
    !
     address-family ipv6 unicast
    !
  
    !
      network 2001:db8:a02::/64
    !
    !
    !
      neighbor 2001:db8:3::1 activate
      no neighbor 2001:db8:3::1 send-community all
      neighbor 2001:db8:3::1 send-community standard
      neighbor 2001:db8:3::1 send-community large
    !
    !
    !
    do write
ok: [x2] => 
  msg: |-
    bgp configuration for x2
    =========================================
    !
    router bgp 65100
      no bgp ebgp-requires-policy
      no bgp default ipv4-unicast
      bgp default show-hostname
      bgp default show-nexthop-hostname
  
      ! Consider AS paths of same length but with different AS as ECMP candidates
      bgp bestpath as-path multipath-relax
  
      bgp router-id 172.42.43.1
    !
      neighbor 10.1.0.5 remote-as 65000
      neighbor 10.1.0.5 description dut
    !
      neighbor 2001:db8:3:1::1 remote-as 65000
      neighbor 2001:db8:3:1::1 description dut
    !
     address-family ipv4 unicast
    !
  
    !
      network 172.42.43.0/24
    !
    !
    !
      neighbor 10.1.0.5 activate
      no neighbor 10.1.0.5 send-community all
      neighbor 10.1.0.5 send-community standard
      neighbor 10.1.0.5 send-community large
    !
     address-family ipv6 unicast
    !
  
    !
      network 2001:db8:a03::/64
    !
    !
    !
      neighbor 2001:db8:3:1::1 activate
      no neighbor 2001:db8:3:1::1 send-community all
      neighbor 2001:db8:3:1::1 send-community standard
      neighbor 2001:db8:3:1::1 send-community large
    !
    !
    !
    do write

TASK [Find configuration deployment deploy_script for bgp] *********************
ok: [dut]
ok: [x1]
ok: [x2]

TASK [Deploy bgp configuration] ************************************************
included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-config/vyos.yml for dut
included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-config/frr.yml for x1, x2

TASK [wait_for_connection] *****************************************************
skipping: [dut]

TASK [wait_for] ****************************************************************
skipping: [dut]

TASK [set_fact] ****************************************************************
ok: [dut]

TASK [set_fact] ****************************************************************
ok: [dut]

TASK [template] ****************************************************************
changed: [dut]

TASK [execute config-bgp.sh to deploy bgp config from /home/pipi/net101/tools/netsim/ansible/templates/bgp/vyos.j2] ***
changed: [dut]

TASK [template] ****************************************************************
changed: [x2]
changed: [x1]

TASK [set_fact] ****************************************************************
ok: [x1]
ok: [x2]

TASK [run /tmp/config.sh to deploy bgp config from /home/pipi/net101/tools/netsim/ansible/templates/bgp/frr.j2] ***
skipping: [x1]
skipping: [x2]

TASK [run vtysh to import bgp config from /home/pipi/net101/tools/netsim/ansible/templates/bgp/frr.j2] ***
changed: [x2]
changed: [x1]

PLAY [Deploy custom deployment templates] **************************************

TASK [Run custom configuration deployment scripts] *****************************
included: /home/pipi/net101/tools/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 /home/pipi/net101/tools/netsim/extra/bgp.session/vyos.j2 for dut] ***
skipping: [dut]

TASK [Find custom configuration deployment script] *****************************
ok: [dut]

TASK [Run the configuration deployment script] *********************************
included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-config/vyos.yml for dut

TASK [wait_for_connection] *****************************************************
skipping: [dut]

TASK [wait_for] ****************************************************************
skipping: [dut]

TASK [set_fact] ****************************************************************
ok: [dut]

TASK [set_fact] ****************************************************************
ok: [dut]

TASK [template] ****************************************************************
changed: [dut]

TASK [execute config-bgp.session.sh to deploy bgp.session config from /home/pipi/net101/tools/netsim/extra/bgp.session/vyos.j2] ***
changed: [dut]

PLAY RECAP *********************************************************************
dut                        : ok=37   changed=6    unreachable=0    failed=0    skipped=14   rescued=0    ignored=0   
x1                         : ok=26   changed=5    unreachable=0    failed=0    skipped=10   rescued=0    ignored=0   
x2                         : ok=25   changed=4    unreachable=0    failed=0    skipped=10   rescued=0    ignored=0   



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.