Skip to content

Commit fbd8f65

Browse files
authored
Merge pull request #293 from myii/fix/postgres_schema-on-FreeBSD
fix(macros.jinja): use `user` kwarg for schemas (required on FreeBSD)
2 parents 81b2c2e + d606b28 commit fbd8f65

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

kitchen.vagrant.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# -*- coding: utf-8 -*-
2+
# vim: ft=yaml
3+
---
4+
driver:
5+
name: vagrant
6+
7+
platforms:
8+
- name: freebsd-120-2019-2-py3
9+
driver:
10+
box_url: https://freebsd.z.vstack.com/FreeBSD-12.0.box
11+
cache_directory: false
12+
customize:
13+
usbxhci: 'off'
14+
gui: false
15+
linked_clone: true
16+
ssh:
17+
shell: '/bin/sh'

postgres/macros.jinja

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
{%- if 'ensure' in kwarg %}
1919
{%- set ensure = kwarg.pop('ensure') %}
2020
{%- endif %}
21-
{%- if 'user' not in kwarg and state != 'postgres_schema' %}
21+
{%- set user_available = not (state == 'postgres_schema' and grains.saltversioninfo < [2018, 3]) %}
22+
{%- if 'user' not in kwarg and user_available %}
2223
{%- do kwarg.update({'user': postgres.user}) %}
2324
{%- endif -%}
2425

0 commit comments

Comments
 (0)