1
0
Fork 0
mirror of https://github.com/geerlingguy/ansible-role-postgresql.git synced 2025-03-10 17:26:20 -04:00
postgresql/tasks/users.yml

15 lines
538 B
YAML
Raw Normal View History

---
- name: Ensure PostgreSQL users are present.
postgresql_user:
name: "{{ item.name }}"
2021-02-12 16:27:28 -03:00
password: "{{ item.password | default(omit) }}"
with_items: "{{ postgresql_users }}"
no_log: "{{ postgres_users_no_log }}"
2018-09-30 20:23:32 -05:00
become: true
2016-09-29 20:01:39 -05:00
become_user: "{{ postgresql_user }}"
# See: https://github.com/ansible/ansible/issues/16048#issuecomment-229012509
vars:
ansible_ssh_pipelining: true
2021-02-12 16:27:28 -03:00
environment:
PGOPTIONS: "{{ (postgresql_auth_method == 'scram-sha-256') | ternary('-c password_encryption=scram-sha-256', '') }}"