Allow logging in state files
While currently possible to template pillar data using defaults, there is no mechanism to log or prevent state compilation when a value is not set. An example might be for a Postgres install, forcing the admin to provide a pillar value for username/password before allowing the state file to compile. Could have different levels for warning vs prevent compiling.
This could be as simple as creating a salt state that does nothing but logging/error handling.
Thanks for bringing this up! I'm adding this to the Approved for future release milestone.
I think this can be done by passing in pillar data on the command line and using {{ pillar['mykey'] }} in the sls file so that if mykey doesn't exist state compilation will fail.
I'm going to close this issue. Please comment if more work needs to be done and we can reopen.
Thanks!