Force Salt service.running state to restart the service

If you want to restart a service using salt.states.service.running and you can’t use watch because there is simply nothing to watch for changes, then use the following code:

How to execute SLS files in sorted order

If you need to ensure that your SLS files are executed in a sorted order, then simply use this init.sls file.


Working with lists in Jinja2

Working with lists in Jinja2 is really simple if you are using the following trick.