paulbsd-salt/states/postgresql/users.sls

15 lines
488 B
Plaintext

---
{%- from "postgresql/map.jinja" import postgresql with context %}
{%- for user in postgresql.users %}
postgresql-user-{{ user.name }}:
postgres_user.present:
- name: {{ user.name }}
{%- if user.password is defined %}
- password: {{ user.password }}
{%- endif %}
- login: {{ user.login|default(true) }}
- superuser: {{ user.superuser|default(false) }}
- encrypted: scram-sha-256
- db_port: {{ postgresql.config.main.port|default(5432) }}
{% endfor %}