If this condition is true:
~postgres/data/base/does not exist
then I want to write out an error message.
I call above a “pre-condition” check.
This state should be exist, but if it exists, I want to tell the one executing salt something.
In this particular case “
postgres.conf” was created too early. This means that
initdb will fail.
But my question is not related to postgres. This is just an example.
How to let salt fail with an error message if a pre-condition like above failed?