You are wrong on all counts here. Salt supports Jinja2 template engine, so you can template your states [1]. You define custom states in python [2]. In the root configuration file (top.sls) you target configuration based on host name, grains (machine specific information) [3].