diff --git a/postgres/macros.jinja b/postgres/macros.jinja index e61754a..1374553 100644 --- a/postgres/macros.jinja +++ b/postgres/macros.jinja @@ -18,7 +18,8 @@ {%- if 'ensure' in kwarg %} {%- set ensure = kwarg.pop('ensure') %} {%- endif %} - {%- if 'user' not in kwarg and state != 'postgres_schema' %} + {%- set user_available = False if (state == 'postgres_schema' and grains.saltversioninfo < [2018, 3]) else True %} + {%- if 'user' not in kwarg and user_available %} {%- do kwarg.update({'user': postgres.user}) %} {%- endif -%}