diff --git a/pillar.example b/pillar.example index f6e0357..37029ce 100644 --- a/pillar.example +++ b/pillar.example @@ -44,7 +44,7 @@ postgres: # Backup extension for configuration files, defaults to ``.bak``. # Set ``False`` to stop creation of backups when config files change. - {%- if 'status.time' in salt.keys() %} + {%- if salt['status.time']|default(none) is callable %} config_backup: ".backup@{{ salt['status.time']('%y-%m-%d_%H:%M:%S') }}" {%- endif %} diff --git a/postgres/manage.sls b/postgres/manage.sls index 66f5865..ab8c703 100644 --- a/postgres/manage.sls +++ b/postgres/manage.sls @@ -1,7 +1,7 @@ {%- from "postgres/map.jinja" import postgres with context -%} {%- from "postgres/macros.jinja" import format_state with context -%} -{%- if not salt.get('postgres.user_create') %} +{%- if salt['postgres.user_create']|default(none) is not callable %} # Salt states for managing PostgreSQL is not available, # need to provision client binaries first