config: refactor tmpl resolution fn
config: refactor tmpl resolution fn

scalp42/consul,42wim/consul,hashicorp/consul,kingland/consul,vamage/consul,calgaryscientific/consul,youhong316/consul,youhong316/consul,youhong316/consul,hashicorp/consul,kingland/consul,zeroae/consul,zeroae/consul,scalp42/consul,tugbabodrumlu/consul,hashicorp/consul,i0rek/consul,i0rek/consul,vamage/consul,youhong316/consul,vamage/consul,calgaryscientific/consul,42wim/consul,tugbabodrumlu/consul,i0rek/consul,42wim/consul,scalp42/consul,vamage/consul,zeroae/consul,tugbabodrumlu/consul,tugbabodrumlu/consul,kingland/consul,i0rek/consul,42wim/consul,kingland/consul,youhong316/consul,hashicorp/consul,zeroae/consul,kingland/consul,calgaryscientific/consul,calgaryscientific/consul,i0rek/consul,tugbabodrumlu/consul,42wim/consul,scalp42/consul,vamage/consul,zeroae/consul,scalp42/consul,calgaryscientific/consul