Background: recently I discovered an issue on our servers where zookeeper wouldn't start on one of them. It was caused by the myid file being empty (it requires a number). Executing salt didn't fix it. It turns out that the issue was cause by a recent hostname change. I fixed the sls file, but any such tweak may cause it to break again.
So, my question is: can I use salt to validate that certain changes were correctly applied? In this case, I could check the size of the file or validate that the contents contained a single number. Ideally this would be run as part of the execution of a state, but if there's another way I'd love to hear it.
Just to be specific, I'm not looking to validate or lint the state file themselves. I just want to ensure that the end results are valid to some degree. E.g. the file contains a single number and isn't empty.