State-based Infrastructure Automation