Reply

Configuration template with Lists

DanS
Techie
Posts: 4
2604     0

Can someone please provide an example of using a list variable in a configuration template?  I cant seem to get it working.  This is what I have:

 

Configuration template: List test

Template Variables:

$reg  string  "aust"
$helper  list  "regional_configs,region,$reg,helper1,NOMATCH"

 

Configuration File Text:

ip helper-address $helper

 

This is what I have in my List named "regional_configs" (in CSV format):

 

region,helper1
aust,1.2.3.4

 

When I run List test and select Text file push mode, this is what gets output:

 

ip helper-address regional_configs,region,$reg,helper1,NOMATCH

 

My goal is to have it output "ip helper-address 1.2.3.4"

 

Any help would be greatly appreciated, thank you

Re: Configuration template with Lists

Adviser
Posts: 406
2605     0

Here is what I have in my example :

 

Variables define:

$sif list "sif_user_list,number,1, location,NOTFOUND"
$sif2 list "sif_user_list,number,1,ntpserver,NOTFOUND"

 

Config:

snmp-server location $sif

ntp-server $sif2

 

CSV aka LIST

Headers

number,ntpserver,location

 

Data

1,10.10.10.1,Colorado

 

It will use 1 as a look up field and then grab the data from that field

 

Sif

Follow me on LinkedIn: https://www.linkedin.com/in/sifbaksh
Twitter: https://twitter.com/sifbaksh

Re: Configuration template with Lists

Adviser
Posts: 353
2605     0

I believe there may be an issue using the lists with a template when using the "text file" option. Please open a case.

Re: Configuration template with Lists

Authority
Posts: 21
2605     0

Hello,

is it possible to use instead constant value (in your script is "1") dynamic value which relates to device which be configured by template (i.e ip address)?

Thank you

Dariusz

Showing results for 
Search instead for 
Do you mean 

Recommended for You