hosts = {{ salt['pillar.get']("model:postgres:host") }} user = {{ salt['pillar.get']("model:postgres:user") }} password = {{ salt['pillar.get']("model:postgres:password") }} dbname = {{ salt['pillar.get']("model:postgres:database") }} query = SELECT goto FROM alias WHERE '%s' ILIKE CONCAT('^',address,'$') AND SUBSTRING(address,1,1) != '@' AND is_regexp = true