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 domain FROM domain WHERE domain='%s' and backupmx = true