From 7ff798a27e29f29a29c54c014d4220c777ff776a Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Sun, 27 Oct 2019 20:17:03 +0000 Subject: [PATCH] fix(macros.jinja): use `user` kwarg for schemas (required on FreeBSD) * Not available in `2017.7`: - https://docs.saltstack.com/en/2017.7/ref/states/all/salt.states.postgres_schema.html --- postgres/macros.jinja | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -%}