#StackBounty: #saltstack Salt: Better error message if pre-condition failed

Bounty: 50

If this condition is true:

  • ~postgres/data/postgres.conf exists
  • and ~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?


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.