mirror of
https://github.com/geerlingguy/ansible-role-postgresql.git
synced 2024-10-27 05:23:03 -04:00
21 lines
918 B
YAML
21 lines
918 B
YAML
---
|
|
- name: Ensure PostgreSQL users are present.
|
|
postgresql_user:
|
|
name: "{{ item.name }}"
|
|
password: "{{ item.password | default(omit) }}"
|
|
priv: "{{ item.priv | default(omit) }}"
|
|
role_attr_flags: "{{ item.role_attr_flags | default(omit) }}"
|
|
db: "{{ item.db | default(omit) }}"
|
|
login_host: "{{ item.login_host | default('localhost') }}"
|
|
login_password: "{{ item.login_password | default(omit) }}"
|
|
login_user: "{{ item.login_user | default(postgresql_user) }}"
|
|
login_unix_socket: "{{ item.login_unix_socket | default(postgresql_unix_socket_directories[0]) }}"
|
|
port: "{{ item.port | default(omit) }}"
|
|
state: "{{ item.state | default('present') }}"
|
|
with_items: "{{ postgresql_users }}"
|
|
no_log: true
|
|
become: yes
|
|
become_user: "{{ postgresql_user }}"
|
|
# See: https://github.com/ansible/ansible/issues/16048#issuecomment-229012509
|
|
vars:
|
|
ansible_ssh_pipelining: true
|