cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
7332
Views
15
Helpful
10
Replies

Built in variables and Jinja templates

rasmus.elmholt
Level 7
Level 7

Hi,

I have made an onboarding template with the following Jinja code:

{% set ifrange = 'gi1/0/1-24' %}
{% if '9300L' in __device.family %}
{% set ifrange = 'gi1/0/1-12' %}
{% endif %}

interface range {{ ifrange }}
 description *** Client access port ***
 switchport mode access
 switchport access vlan {{ VLAN }}
 ip dhcp snooping limit rate 100
 storm-control broadcast level 01.00 00.90
 storm-control multicast level 01.00 00.90
 spanning-tree bpduguard enable
 spanning-tree portfast

When I simulate this template on a device I get the following output:

!###### Access interface #####
!

interface range gi1/0/1-24
 description *** Client access port ***
 switchport mode access
 switchport access vlan 99
 ip dhcp snooping limit rate 100
 storm-control broadcast level 01.00 00.90
 storm-control multicast level 01.00 00.90
 spanning-tree bpduguard enable
 spanning-tree portfast

And everything is fine.

But when I try to claim a switch with the same template the GUI stops working and I see a message in the log of the onboarding service:

2021-08-30 18:09:46,324 |  DEBUG | qtp1807648168-9146        |  | c.c.p.a.s.impl.TemplateServiceImpl | response object recieved: {"templateId":"e7cf432f-1e81-48d4-beef-12bd81c9d922","cliPreview":null,"deviceId":null,"validationErrors":[{"type":"RUNTIME","lineNumber":76,"message":"Cannot resolve property 'family' in ''"}]} |

Any help is appreciated.

 

1 Accepted Solution

Accepted Solutions

Preston Chilcote
Cisco Employee
Cisco Employee

I'm going to keep thinking about this and ask around, but my initial reaction is that we don't support built in variables during PnP.  The reason is that these variables all tie into inventory related databases, and since the device doesn't go into inventory until PnP is complete, you will get NULL responses when querying and field.

 

The best workaround I can think of so far is to create a Multi-select drop down to have the user tell you which product family it is.

 

It's worth mentioning though, that the best practice I recommend is to not put these interface configs into the onboarding template.  That might be why I haven't seen this topic come up before.   If you use day-N instead (by adding a provisioning step after the PnP) then if/when you need to make changes you can still use the same template.  The onboarding template should be just enough to keep connectivity to DNA center (usually to change the dhcp address to a static one on a management or uplink interface.

View solution in original post

10 Replies 10

Preston Chilcote
Cisco Employee
Cisco Employee

I'm going to keep thinking about this and ask around, but my initial reaction is that we don't support built in variables during PnP.  The reason is that these variables all tie into inventory related databases, and since the device doesn't go into inventory until PnP is complete, you will get NULL responses when querying and field.

 

The best workaround I can think of so far is to create a Multi-select drop down to have the user tell you which product family it is.

 

It's worth mentioning though, that the best practice I recommend is to not put these interface configs into the onboarding template.  That might be why I haven't seen this topic come up before.   If you use day-N instead (by adding a provisioning step after the PnP) then if/when you need to make changes you can still use the same template.  The onboarding template should be just enough to keep connectivity to DNA center (usually to change the dhcp address to a static one on a management or uplink interface.

Hi Preston

Thank you for the reply.

It makes sense that the information is not available before the device is added to the inventory. 

It would be great if the GUI showed that these variable was not available during onboarding.

Is there any documentation describing this?

 

I am not sure I am convinced the variables are a good idea to use at all. It seems like there is a lot of strange things happening with them.

pnperre.png

 

 

 
 

 

And then again. Doing a simulation of the following code:

!
{% for server in __ntpserver %}
ntp server {{ server }}
{% endfor %}
!

Gives me this result:

!
ntp server 10.10.8.1
!

But when deploying the template to a switch the generated config is:

!
ntp server 
!

 

 

That is curious behavior, but you actually don't need those variables at all.  When you do a day-N provision, then all of the Design settings for the site are automatically provisioned for you.  It is redundant to put them in your template.  This is what the "Network Settings" section of the Summary step of the Provision Devices workflow is trying to communicate... it just doesn't tell you the exact commands that Cisco DNA will provision.

One thing I noticed though was that my ip name-server was not configured from my design. It is configured in my design for the site. And I tried to reprovision the device from inventory but that did not push the name-servers. 

To confirm my sanity I tested provisioning of ip name-server with this helpful eem applet so I can see what Cisco DNA is doing:

 

vent manager applet catchall
event cli pattern ".*" sync no skip no
action 1 syslog msg "$_cli_msg"

 

I can confirm that ip name-server is applied during provision as I set it up in design settings.

 

*Sep 17 18:08:56.224: %HA_EM-6-LOG: catchall: no ip domain name 

*Sep 17 18:08:56.230: %HA_EM-6-LOG: catchall: ip domain-lookup 

*Sep 17 18:08:56.239: %HA_EM-6-LOG: catchall: ip name-server 4.4.4.4

 

This was also reflected in the configuration preview that you can select when you "Deploy" the provisioning task.

 

However, on a subsequent provision of the same switch, unless I change the name server in design settings, there is no name-server config applied.

Hi Preston,

I had to check as well after you post.

It seems like the ip domain name and ip name server are not pushed during Day0 but only if you provision the switch manually afterwards.

 

I am running DNAC 2.2.2.3 and this is the template I am pushing:

{% include "NDK-Imports/NDK-Ports" %}
!####### Template til Switch ######
!
!###### Hostname/Domain By-Lokation-UnderKrydsfelt-TypeNummer ######
!
ip domain name mgmt.net
!
!###### Temp debugging #####
!
event manager applet catchall
event cli pattern ".*" sync no skip no
action 1 syslog msg "$_cli_msg"
!
logging Buffered 4000000
logging persistent url flash:/PERSISTENTLOGS size 104857600 filesize 5242880
!
!###### Clock&Timezone&NTP ######
!
clock timezone CET 1
!
clock summer-time CEST recurring last Sun Mar 2:00 last Sun Oct 3:00
!
service timestamps log datetime show-timezone localtime 
!
ntp server 10.10.8.1
!
!###### SNMP ######
!
snmp-server location SJ2
snmp-server contact MyName
snmp-server view ViewDefault iso included
snmp-server group GrpMonitoring v3 priv read ViewDefault
snmp-server user UserJustMe GrpMonitoring v3 auth sha AuthPass1 priv aes 128 PrivPass2
!
!###### Error checks and recovery ######
!
errdisable recovery cause all
errdisable recovery interval 120
!
udld aggressive
!
Spanning-tree loopguard default
!
!###### Spanning-tree Non-root ######
!
spanning-tree mode rapid-pvst
spanning-tree vlan 1-4094 priority 36864
!
!###### Management ######
!
lldp run
cdp run
!
line con 0
 exec-timeout 15 0
 logging synchronous
!
line vty 0 4
 exec-timeout 15 0
 logging synchronous
 transport input ssh
 transport preferred none
 access-class 23 in
!
line vty 5 15
 exec-timeout 15 0
 logging synchronous
 transport input ssh
 transport preferred none
 access-class 23 in
!
no ip http server
ip http secure-server
!
access-list 23 permit 10.110.0.0 0.0.255.31
access-list 23 permit any
access-list 23 deny any log
!
!###### Access interface #####
!
!###### Access interface #####
!
{% set vlans = vlset %}

{% for vlan in vlans %}
{% set vlanInfo = vlan.split(';') %}
vlan {{ vlanInfo[0] }}
 name {{ vlanInfo[1] }}
{% endfor %}
!
!###### Access interface #####
!Do not provision until DayN
!
###### Uplink port ######
default int ra te 1/1/1-4
Interface ra te1/1/1-2
{{ uplink_trunk() }}
!
!###### Downlink port ######
Interface range te1/1/3-4
{{ downlink_trunk() }}
!
!###### MGMT Interface ######
interface vlan 1
 shutdown
!
interface GigabitEthernet0/0
 shutdown
!
{% set MGMTVLAN = "101" %}
{% set MGMTIPSTRING = "10.254.0.233 255.255.255.0" %}
interface vlan{{ MGMTVLAN }}
 ip address {{ MGMTIPSTRING }}
 no shutdown
!
ip route 0.0.0.0 0.0.0.0 10.254.0.1
!###### VTP ######
!
vtp mode transparent
! 
!###### Source interface ######
!
ip ssh source-interface vlan {{ MGMTVLAN }}
!
ip tacacs source-interface vlan {{ MGMTVLAN }}
!
ip radius source-interface vlan {{ MGMTVLAN }}
!
ip http client source-interface vlan {{ MGMTVLAN }}
!
ntp source vlan {{ MGMTVLAN }}
!
!###### DHCP Snooping ######
!
ip dhcp snooping
ip dhcp snooping vlan 1-4094
!
!###### AAA ######
!
aaa new-model
aaa authentication attempts login 3
!
netconf-yang
!
!###### Logging #####
!
logging Buffered 4000000
logging Buffered notifications
!
!####### Cleanup from PnP progress
!
!no pnp profile pnp-zero-touch
!
pnp profile pnp-zero-touch
 transport https ipv4 10.10.8.10 port 443
!

During the push this will generate the following in the template CLI Preview:

!####### Template til Switch ######
!
!###### Hostname/Domain By-Lokation-UnderKrydsfelt-TypeNummer ######
!
ip domain name mgmt.net
!
!###### Temp debugging #####
!
event manager applet catchall
event cli pattern ".*" sync no skip no
action 1 syslog msg "$_cli_msg"
!
logging Buffered 4000000
logging persistent url flash:/PERSISTENTLOGS size 104857600 filesize 5242880
!
!###### Clock&Timezone&NTP ######
!
clock timezone CET 1
!
clock summer-time CEST recurring last Sun Mar 2:00 last Sun Oct 3:00
!
service timestamps log datetime show-timezone localtime 
!
ntp server 10.10.8.1
!
!###### SNMP ######
!
snmp-server xxxxxxxx
snmp-server xxxxxxxx
snmp-server xxxxxxxx
snmp-server xxxxxxxx
snmp-server xxxxxxxx
!
!###### Error checks and recovery ######
!
errdisable recovery cause all
errdisable recovery interval 120
!
udld aggressive
!
Spanning-tree loopguard default
!
!###### Spanning-tree Non-root ######
!
spanning-tree mode rapid-pvst
spanning-tree vlan 1-4094 priority 36864
!
!###### Management ######
!
lldp run
cdp run
!
line con 0
 exec-timeout 15 0
 logging synchronous
!
line vty 0 4
 exec-timeout 15 0
 logging synchronous
 transport input ssh
 transport preferred none
 access-class 23 in
!
line vty 5 15
 exec-timeout 15 0
 logging synchronous
 transport input ssh
 transport preferred none
 access-class 23 in
!
no ip http server
ip http secure-server
!
access-list 23 permit 10.110.0.0 0.0.255.31
access-list 23 permit any
access-list 23 deny any log
!
!###### Access interface #####
!
!###### Access interface #####
!
vlan 10
 name data
vlan 20
 name voice
vlan 30
 name elev
vlan 101
 name adm
vlan 102
 name test
!
!###### Access interface #####
!Do not provision until DayN
!
###### Uplink port ######
default int ra te 1/1/1-4
Interface ra te1/1/1-2
 description *** Uplink to ****
 switchport mode trunk
 switchport nonegotiate
 switchport trunk native vlan 1
 switchport trunk allowed vlan 1-3002
 storm-control broadcast level 10.00 5.00
 storm-control multicast level 10.00 5.00
 ip dhcp snooping trust
!
!###### Downlink port ######
Interface range te1/1/3-4
 description *** Downlink to XXXXX ****
 switchport mode trunk
 switchport nonegotiate
 switchport trunk native vlan 1
 switchport trunk allowed vlan 1-3002
 storm-control broadcast level 10.00 5.00
 storm-control multicast level 10.00 5.00
!
!###### MGMT Interface ######
interface vlan 1
 shutdown
!
interface GigabitEthernet0/0
 shutdown
!
interface vlan101
 ip address 10.254.0.233 255.255.255.0
 no shutdown
!
ip route 0.0.0.0 0.0.0.0 10.254.0.1
!###### VTP ######
!
vtp mode transparent
! 
!###### Source interface ######
!
ip ssh source-interface vlan 101
!
ip tacacs source-interface vlan 101
!
ip radius source-interface vlan 101
!
ip http client source-interface vlan 101
!
ntp source vlan 101
!
!###### DHCP Snooping ######
!
ip dhcp snooping
ip dhcp snooping vlan 1-4094
!
!###### AAA ######
!
aaa new-model
aaa authentication attempts login 3
!
netconf-yang
!
!###### Logging #####
!
logging Buffered 4000000
logging Buffered notifications
!
!####### Cleanup from PnP progress
!
!no pnp profile pnp-zero-touch
!
pnp profile pnp-zero-touch
 transport https ipv4 10.10.8.10 port 443
!

And the following in Day-0 Template.

archive
 log config
  logging enable
  logging size 500
  hidekeys
  !
 !
!
service timestamps debug datetime msec
!
service timestamps log datetime msec
!
service password-encryption
!
service sequence-numbers
!
!
! Disable external HTTP(S) access
! Disable external Telnet access
! Enable external SSHv2 access
!
no ip http server
!
no ip http secure-server
!
crypto key generate rsa label dnac-sda modulus 2048
ip ssh version 2
!
ip scp server enable
!
line vty 0 15
 ! maybe redundant
login xxxxxx
 transport input ssh
 ! maybe redundant
 transport preferred none
! Set VTP mode to transparent (no auto VLAN propagation)
! Set STP mode to Rapid PVST+ (prefer for non-Fabric compatibility)
! Enable extended STP system ID
! Set Fabric Node to be STP Root for all local VLANs
! Enable STP Root Guard to prevent non-Fabric nodes from becoming Root
! Confirm whether vtp mode transparent below is needed
vtp mode transparent
!
spanning-tree mode rapid-pvst
!
spanning-tree extend system-id
! spanning-tree bridge priority 0
! spanning-tree rootguard
! spanning-tree portfast bpduguard default
no udld enable
!
errdisable recovery cause all
!
errdisable recovery interval 300
!
! Enable SNMP and RW access based on ACL
!
snmp-server xxxxxxxx
!
snmp-server xxxxxxxx
!
!
username xxxxxx
!
enable algorithm-type scrypt secret Linux1234
!
!
hostname DK-SJ2-TEMP
!

The configuration beeing applied on the switch:

No startup-config, starting autoinstall/pnp/ztp...

Autoinstall will terminate if any input is detected on console

Autoinstall trying DHCPv4 on GigabitEthernet0/0

Autoinstall trying DHCPv6 on GigabitEthernet0/0


         --- System Configuration Dialog ---

Would you like to enter the initial configuration dialog? [yes/no]: 
Acquired IPv4 address 10.254.0.53 on Interface GigabitEthernet0/0
Received following DHCPv4 options:
        domain-name     : dna.das-i.dk
        vendor          : 5A1N;B2;K4;I10.10.8.10;J80
        dns-server-ip   : 10.255.1.20
        si-addr         : 10.255.1.20



Press RETURN to get started!


*Sep 16 01:05:59.705: %PKI-6-TRUSTPOINT_CREATE: Trustpoint: TP-self-signed-3594917619 created succesfully
*Sep 16 01:06:00.168: %CRYPTO_ENGINE-5-KEY_ADDITION: A key named TP-self-signed-3594917619 has been generated or imported by crypto-engine
*Sep 16 01:06:00.170: %SSH-5-ENABLED: SSH 1.99 has been enabled
*Sep 16 01:06:00.230: %PKI-4-NOCONFIGAUTOSAVE: Configuration was modified.  Issue "write memory" to save new IOS PKI configuration
*Sep 16 01:06:00.232: %SYS-5-CONFIG_P: Configured programmatically by process PnP Agent Discovery from console as vty0
*Sep 16 01:06:00.368: %PKI-6-TRUSTPOINT_CREATE: Trustpoint: SLA-TrustPoint created succesfully
*Sep 16 01:06:00.371: %PKI-4-NOCONFIGAUTOSAVE: Configuration was modified.  Issue "write memory" to save new IOS PKI configuration
*Sep 16 01:06:00.379: %CALL_HOME-6-CALL_HOME_ENABLED: Call-home is enabled by Smart Agent for Licensing.
*Sep 16 01:06:01.702: %LINK-5-CHANGED: Interface Vlan1, changed state to administratively down
*Sep 16 01:06:01.780: %CRYPTO_ENGINE-5-KEY_ADDITION: A key named TP-self-signed-3594917619.server has been generated or imported by crypto-engine
*Sep 16 01:06:02.174: %SMART_LIC-6-REPORTING_REQUIRED: A Usage report acknowledgement will be required in 90 days.
*Sep 16 01:06:02.248: %SYS-5-CONFIG_P: Configured programmatically by process PnP Agent Discovery from console as vty0
*Sep 16 01:06:02.248: %PNP-6-PNP_SAVING_TECH_SUMMARY: Saving PnP tech summary (/pnp-tech/pnp-tech-discovery-summary)... Please wait. Do not interrupt.
*Sep 16 01:06:02.365: %SYS-5-CONFIG_P: Configured programmatically by process PnP Agent Discovery from console as vty0
*Sep 16 01:06:03.058: %SYS-5-CONFIG_P: Configured programmatically by process PnP Agent Discovery from console as vty0
*Sep 16 01:06:03.450: %SYS-5-CONFIG_P: Configured programmatically by process PnP Agent Discovery from console as vty0
*Sep 16 01:06:03.576: %SYS-5-CONFIG_P: Configured programmatically by process PnP Agent Discovery from console as vty0
OK to enter CLI now...

pnp-discovery can be monitored without entering enable mode

Entering enable mode will stop pnp-discovery

*Sep 16 01:06:05.431: %IOXN_APP-6-PRE_INIT_DAY0_GS_INFO: Day0 Guestshell de-initilization API is being invoked

*Sep 16 01:06:05.431: AUTOINSTALL: script execution not successful for Gi0/0.
*Sep 16 01:06:05.495: %SYS-5-CONFIG_P: Configured programmatically by process PnP Agent Discovery from console as vty0
*Sep 16 01:06:05.596: %PNP-6-PNP_TECH_SUMMARY_SAVED_OK: PnP tech summary (/pnp-tech/pnp-tech-discovery-summary) saved successfully (elapsed time: 3 seconds).
*Sep 16 01:06:05.596: %PNP-6-PNP_DISCOVERY_DONE: PnP Discovery done successfully (PnP-DHCP-IPv4)
*Sep 16 01:06:28.451: %IM-6-IOX_ENABLEMENT: Switch 1 R0/0: ioxman: IOX is ready.Guestshell destroyed successfully 

*Sep 16 01:06:31.323: %IOXN_APP-6-PRE_INIT_DAY0_GS_INFO: Day0 Guestshell destroyed

*Sep 16 01:06:31.842: %UICFGEXP-6-SERVER_NOTIFIED_STOP: Switch 1 R0/0: psd: Server iox has been notified to stop
*Sep 16 01:06:59.293: %LINEPROTO-5-UPDOWN: Line protocol on Interface TenGigabitEthernet1/0/23, changed state to down
*Sep 16 01:06:59.923: %PNP-6-HTTP_CONNECTED: PnP Discovery connected to PnP server (profile=pnp-zero-touch, ip=10.10.8.10, port=80)
*Sep 16 01:07:00.295: %LINK-3-UPDOWN: Interface TenGigabitEthernet1/0/23, changed state to down
*Sep 16 01:07:09.824: %LINK-3-UPDOWN: Interface TenGigabitEthernet1/0/23, changed state to up
*Sep 16 01:07:10.823: %LINEPROTO-5-UPDOWN: Line protocol on Interface TenGigabitEthernet1/0/23, changed state to up
*Sep 16 01:07:13.000: %SYS-6-CLOCKUPDATE: System clock has been updated from 01:07:11 UTC Thu Sep 16 2021 to 01:07:13 UTC Thu Sep 16 2021, configured from console by vty0.
Sep 16 01:07:13.000: %PKI-6-AUTHORITATIVE_CLOCK: The system clock has been set.
Sep 16 01:07:13.006: %SYS-5-CONFIG_P: Configured programmatically by process XEP_pnp-zero-touch from console as vty0
Sep 16 01:07:13.013: %PKI-6-TRUSTPOINT_CREATE: Trustpoint: pnplabel created succesfully
Sep 16 01:07:13.017: %PKI-4-NOCONFIGAUTOSAVE: Configuration was modified.  Issue "write memory" to save new IOS PKI configuration
Sep 16 01:07:13.018: %PNP-6-PNP_TRUSTPOINT_INSTALLED: Trustpoint (pnplabel) installed from (/pnp-info/pnp-xsvc-cert) by (pid=305, pname=XEP_pnp-zero-touch, time=01:07:13 UTC Thu Sep 16 2021)
Sep 16 01:07:14.201: %SYS-5-CONFIG_P: Configured programmatically by process PnP reconnect profile from console as vty0
Sep 16 01:07:24.873: %SYS-5-CONFIG_P: Configured programmatically by process XEP_pnp-zero-touch from console as vty0
Sep 16 01:08:47.171: %SYS-5-CONFIG_P: Configured programmatically by process XEP_pnp-zero-touch from console as vty0
Sep 16 01:08:47.629: %SYS-5-CONFIG_P: Configured programmatically by process XEP_pnp-zero-touch from console as vty0
Sep 16 01:08:51.630: %SYS-5-CONFIG_P: Configured programmatically by process XEP_pnp-zero-touch from console as vty0
Sep 16 01:08:51.631: %PNP-6-PNP_CONFIG_ARCHIVE: Config (flash:pnp-archive-Sep-16-01-08-47.264-0) archive (1/3) by (pid=505, pname=XEP_pnp-zero-touch, time=01:08:51 UTC Thu Sep 16 2021)
000129: Sep 16 01:08:55.455: %CRYPTO_ENGINE-5-KEY_ADDITION: A key named dnac-sda has been generated or imported by crypto-engine
000130: Sep 16 01:08:55.625: %SYS-5-LOG_CONFIG_CHANGE: Buffer logging: level debugging, xml disabled, filtering disabled, size (4000000)
000131: Sep 16 01:08:55.629: %SYS-5-LOG_CONFIG_CHANGE: Persistent logging: enabled, url flash:/PERSISTENTLOGS, disk space 104857600 bytes, file size 5242880 bytes, batch size 4096 bytes
000132: Sep 16 01:08:55.630: %SYS-6-CLOCKUPDATE: System clock has been updated from 01:08:55 UTC Thu Sep 16 2021 to 02:08:55 CET Thu Sep 16 2021, configured from console by dnac on vty1.
000133: Sep 16 01:08:55.631: %SYS-6-CLOCKUPDATE: System clock has been updated from 02:08:55 CET Thu Sep 16 2021 to 03:08:55 CEST Thu Sep 16 2021, configured from console by dnac on vty1.
000134: Sep 16 01:08:55.670: %HA_EM-6-LOG: catchall: logging buffered 4000000
000135: Sep 16 01:08:55.671: %HA_EM-6-LOG: catchall: logging persistent url flash:/PERSISTENTLOGS size 104857600 filesize 5242880
000136: Sep 16 01:08:55.671: %HA_EM-6-LOG: catchall: clock timezone CET 1
000137: Sep 16 01:08:55.672: %HA_EM-6-LOG: catchall: clock summer-time CEST recurring last Sun  Mar  2:00  last Sun  Oct  3:00 
000138: Sep 16 01:08:55.673: %HA_EM-6-LOG: catchall: service timestamps log datetime show-timezone localtime 
000139: Sep 16 01:08:55.676: %HA_EM-6-LOG: catchall: ntp server 10.10.8.1
000140: Sep 16 01:08:55.677: %HA_EM-6-LOG: catchall: snmp-server location SJ2
000141: Sep 16 01:08:55.678: %HA_EM-6-LOG: catchall: snmp-server contact MyName
000142: Sep 16 01:08:55.678: %HA_EM-6-LOG: catchall: snmp-server view ViewDefault iso included 
000143: Sep 16 01:08:55.679: %HA_EM-6-LOG: catchall: snmp-server group GrpMonitoring v3 priv read ViewDefault
000144: Sep 16 01:08:55.681: %HA_EM-6-LOG: catchall: snmp-server user UserJustMe GrpMonitoring v3 auth sha AuthPass1 priv aes 128 PrivPass2
000145: Sep 16 01:08:55.717: Configuring snmpv3 USM user, persisting snmpEngineBoots. Please Wait...

000146: Sep 16 01:08:55.802: %HA_EM-6-LOG: catchall: errdisable recovery cause all 
000147: Sep 16 01:08:55.804: %HA_EM-6-LOG: catchall: errdisable recovery interval 120
000148: Sep 16 01:08:55.804: %HA_EM-6-LOG: catchall: udld aggressive 
000149: Sep 16 01:08:55.805: %HA_EM-6-LOG: catchall: spanning-tree loopguard default 
000150: Sep 16 01:08:55.806: %HA_EM-6-LOG: catchall: spanning-tree mode rapid-pvst 
000151: Sep 16 01:08:55.808: %HA_EM-6-LOG: catchall: spanning-tree vlan 1-4094 priority 36864
000152: Sep 16 01:08:55.883: %HA_EM-6-LOG: catchall: lldp run 
000153: Sep 16 01:08:55.884: %HA_EM-6-LOG: catchall: cdp run 
000154: Sep 16 01:08:55.885: %HA_EM-6-LOG: catchall: line con 0
000155: Sep 16 01:08:55.886: %HA_EM-6-LOG: catchall: exec-timeout 15 0
000156: Sep 16 01:08:55.886: %HA_EM-6-LOG: catchall: logging synchronous 
000157: Sep 16 01:08:55.889: %HA_EM-6-LOG: catchall: line vty 0 4
000158: Sep 16 01:08:55.890: %HA_EM-6-LOG: catchall: exec-timeout 15 0
000159: Sep 16 01:08:55.891: %HA_EM-6-LOG: catchall: logging synchronous 
000160: Sep 16 01:08:55.892: %HA_EM-6-LOG: catchall: transport input ssh 
000161: Sep 16 01:08:55.892: %HA_EM-6-LOG: catchall: transport preferred none 
000162: Sep 16 01:08:55.895: %HA_EM-6-LOG: catchall: access-class 23 in 
000163: Sep 16 01:08:55.896: %HA_EM-6-LOG: catchall: line vty 5 15
000164: Sep 16 01:08:55.897: %HA_EM-6-LOG: catchall: exec-timeout 15 0
000165: Sep 16 01:08:55.898: %HA_EM-6-LOG: catchall: logging synchronous 
000166: Sep 16 01:08:55.898: %HA_EM-6-LOG: catchall: transport input ssh 
000167: Sep 16 01:08:55.905: %HA_EM-6-LOG: catchall: transport preferred none 
000168: Sep 16 01:08:55.906: %HA_EM-6-LOG: catchall: access-class 23 in 
000169: Sep 16 01:08:55.906: %HA_EM-6-LOG: catchall: no ip http server 
000170: Sep 16 01:08:55.907: %HA_EM-6-LOG: catchall: ip http secure-server 
000171: Sep 16 01:08:55.943: %HA_EM-6-LOG: catchall: access-list 23 permit 10.110.0.0 0.0.255.31
000172: Sep 16 01:08:55.944: %HA_EM-6-LOG: catchall: access-list
000128: Sep 16 01:08:55.432: %SMART_LIC-3-COMM_FAILED: Communications failure with the Cisco Smart License Utility (CSLU) : Unable to resolve server hostname/domain name  23 permit any 
000173: Sep 16 01:08:55.945: %HA_EM-6-LOG: catchall: access-list 23 deny any log 
000174: Sep 16 01:08:55.945: %HA_EM-6-LOG: catchall: vlan 10
000175: Sep 16 01:08:55.946: %HA_EM-6-LOG: catchall: name data
000176: Sep 16 01:08:55.949: %HA_EM-6-LOG: catchall: vlan 20
000177: Sep 16 01:08:55.950: %HA_EM-6-LOG: catchall: name voice
000178: Sep 16 01:08:55.950: %HA_EM-6-LOG: catchall: vlan 30
000179: Sep 16 01:08:55.951: %HA_EM-6-LOG: catchall: name elev
000180: Sep 16 01:08:55.952: %HA_EM-6-LOG: catchall: vlan 101
000181: Sep 16 01:08:55.955: %HA_EM-6-LOG: catchall: name adm
000182: Sep 16 01:08:55.955: %HA_EM-6-LOG: catchall: vlan 102
000183: Sep 16 01:08:55.956: %HA_EM-6-LOG: catchall: name test
000184: Sep 16 01:08:55.957: %HA_EM-6-LOG: catchall: default interface range TenGigabitEthernet1/1/1 - 4
000185: Sep 16 03:08:55 CEST: %SYS-5-CONFIG_P: Configured programmatically by process XEP_pnp-zero-touch from console as dnac on vty1
000186: Sep 16 03:08:55 CEST: %SYS-5-CONFIG_P: Configured programmatically by process XEP_pnp-zero-touch from console as dnac on vty1
000187: Sep 16 03:08:55 CEST: %SYS-5-CONFIG_P: Configured programmatically by process XEP_pnp-zero-touch from console as dnac on vty1
000188: Sep 16 01:08:55.981: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/1 
000189: Sep 16 01:08:55.982: %HA_EM-6-LOG: catchall: end 
000190: Sep 16 01:08:55.982: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/2 
000191: Sep 16 01:08:55.983: %HA_EM-6-LOG: catchall: end 
000192: Sep 16 01:08:55.984: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/3 
000193: Sep 16 01:08:55.986: %HA_EM-6-LOG: catchall: end 
000194: Sep 16 03:08:55 CEST: %SYS-5-CONFIG_P: Configured programmatically by process XEP_pnp-zero-touch from console as dnac on vty1
000195: Sep 16 01:08:56.046: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/4 
000196: Sep 16 01:08:56.047: %HA_EM-6-LOG: catchall: end 
000197: Sep 16 01:08:56.048: %HA_EM-6-LOG: catchall: interface range TenGigabitEthernet1/1/1 - 2
000198: Sep 16 01:08:56.049: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/2 
000199: Sep 16 01:08:56.049: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/1 
000200: Sep 16 01:08:56.052: %HA_EM-6-LOG: catchall: description *** Uplink to ****
000201: Sep 16 01:08:56.053: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/2 
000202: Sep 16 01:08:56.054: %HA_EM-6-LOG: catchall: description *** Uplink to ****
000203: Sep 16 01:08:56.055: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/1 
000204: Sep 16 01:08:56.055: %HA_EM-6-LOG: catchall: switchport mode trunk 
000205: Sep 16 01:08:56.058: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/2 
000206: Sep 16 01:08:56.059: %HA_EM-6-LOG: catchall: switchport mode trunk 
000207: Sep 16 01:08:56.060: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/1 
000208: Sep 16 01:08:56.061: %HA_EM-6-LOG: catchall: switchport nonegotiate 
000209: Sep 16 01:08:56.061: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/2 
000210: Sep 16 01:08:56.066: %HA_EM-6-LOG: catchall: switchport nonegotiate 
000211: Sep 16 01:08:56.067: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/1 
000212: Sep 16 01:08:56.068: %HA_EM-6-LOG: catchall: switchport trunk native vlan 1
000213: Sep 16 01:08:56.068: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/2 
000214: Sep 16 01:08:56.069: %HA_EM-6-LOG: catchall: switchport trunk native vlan 1
000215: Sep 16 01:08:56.072: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/1 
000216: Sep 16 01:08:56.073: %HA_EM-6-LOG: catchall: switchport trunk allowed vlan 1-3002
000217: Sep 16 01:08:56.074: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/2 
000218: Sep 16 01:08:56.075: %HA_EM-6-LOG: catchall: switchport trunk allowed vlan 1-3002
000219: Sep 16 01:08:56.075: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/1 
000220: Sep 16 01:08:56.078: %HA_EM-6-LOG: catchall: storm-control broadcast level 10.00  5.00 
000221: Sep 16 01:08:56.079: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/2 
000222: Sep 16 01:08:56.080: %HA_EM-6-LOG: catchall: storm-control broadcast level 10.00  5.00 
000223: Sep 16 01:08:56.080: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/1 
000224: Sep 16 01:08:56.081: %HA_EM-6-LOG: catchall: storm-control multicast level 10.00  5.00 
000225: Sep 16 01:08:56.084: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/2 
000226: Sep 16 01:08:56.085: %HA_EM-6-LOG: catchall: storm-control multicast level 10.00  5.00 
000227: Sep 16 01:08:56.086: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/1 
000228: Sep 16 01:08:56.086: %HA_EM-6-LOG: catchall: ip dhcp snooping trust 
000229: Sep 16 01:08:56.087: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/2 
000230: Sep 16 01:08:56.143: %HA_EM-6-LOG: catchall: ip dhcp snooping trust 
000231: Sep 16 01:08:56.144: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/1 
000232: Sep 16 01:08:56.145: %HA_EM-6-LOG: catchall: interface range TenGigabitEthernet1/1/3 - 4
000233: Sep 16 01:08:56.145: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/4 
000234: Sep 16 01:08:56.146: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/3 
000235: Sep 16 01:08:56.149: %HA_EM-6-LOG: catchall: description *** Downlink to XXXXX ****
000236: Sep 16 01:08:56.150: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/4 
000237: Sep 16 01:08:56.151: %HA_EM-6-LOG: catchall: description *** Downlink to XXXXX ****
000238: Sep 16 01:08:56.151: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/3 
000239: Sep 16 01:08:56.152: %HA_EM-6-LOG: catchall: switchport mode trunk 
000240: Sep 16 01:08:56.155: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/4 
000241: Sep 16 01:08:56.156: %HA_EM-6-LOG: catchall: switchport mode trunk 
000242: Sep 16 01:08:56.157: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/3 
000243: Sep 16 01:08:56.157: %HA_EM-6-LOG: catchall: switchport nonegotiate 
000244: Sep 16 01:08:56.158: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/4 
000245: Sep 16 01:08:56.161: %HA_EM-6-LOG: catchall: switchport nonegotiate 
000246: Sep 16 01:08:56.162: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/3 
000247: Sep 16 01:08:56.162: %HA_EM-6-LOG: catchall: switchport trunk native vlan 1
000248: Sep 16 01:08:56.163: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/4 
000249: Sep 16 01:08:56.164: %HA_EM-6-LOG: catchall: switchport trunk native vlan 1
000250: Sep 16 01:08:56.167: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/3 
000251: Sep 16 01:08:56.168: %HA_EM-6-LOG: catchall: switchport trunk allowed vlan 1-3002
000252: Sep 16 01:08:56.168: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/4 
000253: Sep 16 01:08:56.169: %HA_EM-6-LOG: catchall: switchport trunk allowed vlan 1-3002
000254: Sep 16 01:08:56.170: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/3 
000255: Sep 16 01:08:56.173: %HA_EM-6-LOG: catchall: storm-control broadcast level 10.00  5.00 
000256: Sep 16 01:08:56.174: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/4 
000257: Sep 16 01:08:56.174: %HA_EM-6-LOG: catchall: storm-control broadcast level 10.00  5.00 
000258: Sep 16 01:08:56.176: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/3 
000259: Sep 16 01:08:56.176: %HA_EM-6-LOG: catchall: storm-control multicast level 10.00  5.00 
000260: Sep 16 01:08:56.179: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/4 
000261: Sep 16 01:08:56.180: %HA_EM-6-LOG: catchall: storm-control multicast level 10.00  5.00 
000262: Sep 16 01:08:56.181: %HA_EM-6-LOG: catchall: interface TenGigabitEthernet1/1/3 
000263: Sep 16 01:08:56.182: %HA_EM-6-LOG: catchall: interface Vlan1 
000264: Sep 16 01:08:56.182: %HA_EM-6-LOG: catchall: shutdown 
000265: Sep 16 01:08:56.185: %HA_EM-6-LOG: catchall: interface GigabitEthernet0/0 
000266: Sep 16 01:08:56.185: %HA_EM-6-LOG: catchall: shutdown 
000267: Sep 16 01:09:00.522: %HA_EM-6-LOG: catchall: interface Vlan101 
000268: Sep 16 01:09:00.522: %HA_EM-6-LOG: catchall: ip address 10.254.0.233 255.255.255.0
000269: Sep 16 01:09:00.523: %HA_EM-6-LOG: catchall: no shutdown 
000270: Sep 16 01:09:00.524: %HA_EM-6-LOG: catchall: ip route 0.0.0.0 0.0.0.0 10.254.0.1
000271: Sep 16 01:09:00.524: %HA_EM-6-LOG: catchall: vtp mode transparent 
000272: Sep 16 01:09:00.527: %HA_EM-6-LOG: catchall: ip ssh source-interface Vlan101 
000273: Sep 16 01:09:00.528: %HA_EM-6-LOG: catchall: ip tacacs source-interface Vlan101 
000274: Sep 16 01:09:00.529: %HA_EM-6-LOG: catchall: ip radius source-interface Vlan101 
000275: Sep 16 01:09:00.529: %HA_EM-6-LOG: catchall: ip http client source-interface Vlan101 
000276: Sep 16 01:09:00.530: %HA_EM-6-LOG: catchall: ntp source Vlan101 
000277: Sep 16 01:09:00.533: %HA_EM-6-LOG: catchall: ip dhcp snooping 
000278: Sep 16 01:09:00.533: %HA_EM-6-LOG: catchall: ip dhcp snooping vlan 1-4094
000279: Sep 16 03:09:00 CEST: %SYS-5-LOG_CONFIG_CHANGE: Buffer logging: level notifications, xml disabled, filtering disabled, size (102400)
000280: Sep 16 03:09:00 CEST: %SYS-5-CONFIG_P: Configured programmatically by process XEP_pnp-zero-touch from console as vty1
000281: Sep 16 03:09:00 CEST: %PARSER-4-BADCFG: Unexpected end of configuration file.

-Traceback= 1#cb55fc0d6ad0d81f0cf86eb1353e884b  :55BB9B398000+8120F7B :55BB9B398000+8130F4D :55BB9B398000+81312BC :55BB9B398000+88DF002 :55BB9B398000+88D4628 :55BB9B398000+88C8473 :55BB9B398000+88D870C :55BB9B398000+88D766B :55BB9B398000+9F1B0A3 :55BB9B398000+9F35AAB :55BB9B398000+9F36B92 :55BB9B398000+AAC575A :55BB9B398000+9F55BA8 :55BB9B398000+AA7FE10
000282: Sep 16 01:09:00.596: %HA_EM-6-LOG: catchall: aaa new-model 
000283: Sep 16 01:09:00.614: %HA_EM-6-LOG: catchall: aaa authentication attempts login 3
000284: Sep 16 01:09:00.614: %HA_EM-6-LOG: catchall: netconf-yang 
000285: Sep 16 01:09:00.616: %HA_EM-6-LOG: catchall: logging buffered 4000000
000286: Sep 16 01:09:00.617: %HA_EM-6-LOG: catchall: logging buffered notifications 
000287: Sep 16 01:09:00.619: %HA_EM-6-LOG: catchall: pnp profile pnp-zero-touch
000288: Sep 16 01:09:00.620: %HA_EM-6-LOG: catchall: transport https ipv4 10.10.8.10 port 443
000289: Sep 16 03:09:00 CEST: %PSD_MOD-5-DMI_NOTIFY_NETCONF_START: Switch 1 R0/0: psd: PSD/DMI: netconf-yang server has been notified to start
000290: Sep 16 03:09:01 CEST: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan101, changed state to down
000291: Sep 16 03:09:02 CEST: %LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to administratively down
000292: Sep 16 03:09:03 CEST: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to down
000293: Sep 16 03:09:04 CEST: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan101, changed state to up
000294: Sep 16 03:09:10 CEST: %HMANRP-6-EMP_ELECTION_INFO: EMP active switch 1 elected: EMP_RELAY: Mgmt port status DOWN, reelecting EMP active switch

The name-server is missing but if I provision the device after the initial Day0 provisioning, the name-server is pushed according to my design.

This should be fixed by CSCvz08038 - "Cisco DNA Center - Template System Variables don't work without brackets" in the next release, but there is a workaround using __dnsserver[0].primaryIPAddress.

If this is just a bug then that makes sense. Thanks Preston.