fix(macros.jinja): apply suggestion from PR

Co-Authored-By: Denys Havrysh <Denys.Gavrysh@gmail.com>
This commit is contained in:
Imran Iqbal 2019-10-28 09:24:04 +00:00 committed by GitHub
parent 7ff798a27e
commit d606b28692
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,7 +18,7 @@
{%- if 'ensure' in kwarg %}
{%- set ensure = kwarg.pop('ensure') %}
{%- endif %}
{%- set user_available = False if (state == 'postgres_schema' and grains.saltversioninfo < [2018, 3]) else True %}
{%- set user_available = not (state == 'postgres_schema' and grains.saltversioninfo < [2018, 3]) %}
{%- if 'user' not in kwarg and user_available %}
{%- do kwarg.update({'user': postgres.user}) %}
{%- endif -%}