I am trying to write a template that sets the switch VTP mode 3, configures domain and password and then depending if the hostname contains core or distro, sets the mode to server, and if it's core to also set to primary server.
For the core, via cli this would be done like :
conf t
vtp domain xxxx
vtp password yyyy
vtp ver 3
vtp mode server
exit
vtp primary
(then there is a prompt:)

This system is becoming primary server for feature vlan
No conflicting VTP3 devices found.
Do you want to continue? [confirm]
(hit enter after the prompt)
I am using jinja templates, and it's easy enough to do the first lot of commands, but the enable mode command is tricky as it has a multiline question and the answer is just to hit enter.
From what I gather it's going to be an #IINTERACTIVE inside a #MODE_ENABLE like this.
#MODE_ENABLE
#INTERACTIVE
vtp primary<IQ>This system is becoming primary server for feature vlan
No conflicting VTP3 devices found.
<R> ...something goes here to send and enter...
#ENDS_INTERACTIVE
#MODE_END_ENABLE
I can't work out how to get it firstly to recognise multiline prompt (if it even needs to? Or does it just need to see the last line 'Do you want to continue? [confirm]' and secondly how to tell it to just sent an 'enter/return'?