create linux users for pam auth
This commit is contained in:
parent
3b42430f76
commit
b3e2f11ab2
@ -43,6 +43,7 @@ postgres_users: []
|
||||
# login_unix_socket: # defaults to 1st of postgres_socket_directories
|
||||
# port: # defaults to not set
|
||||
# state: # defaults to 'present'
|
||||
# pam_user: # defaults to not set
|
||||
|
||||
postgres_hba_entries:
|
||||
- {type: local, database: all, user: all, auth_method: peer}
|
||||
|
@ -7,6 +7,13 @@
|
||||
mode: 0600
|
||||
notify: __postgres_restart
|
||||
|
||||
- name: Create local users for pam auth
|
||||
user:
|
||||
name: "{{ item.name }}"
|
||||
password: "{{ item.password }}"
|
||||
with_items: "{{ postgres_users }}"
|
||||
when: item.pam_user | default(False)
|
||||
|
||||
- name: Setup client authentication
|
||||
template:
|
||||
src: postgresql/data/pg_hba.conf.j2
|
||||
|
Loading…
Reference in New Issue
Block a user