copr: access for lighttpd worked but other users didn't
This commit is contained in:
parent
dac9137f49
commit
1847ad88bc
1 changed files with 17 additions and 13 deletions
|
@ -25,20 +25,14 @@
|
||||||
- name: enable PostgreSQL service
|
- name: enable PostgreSQL service
|
||||||
service: state=started enabled=yes name=postgresql
|
service: state=started enabled=yes name=postgresql
|
||||||
|
|
||||||
- name: Create PG user
|
- name: allow system users to conenct into the database
|
||||||
postgresql_user: name="resalloc"
|
|
||||||
become: yes
|
|
||||||
become_user: postgres
|
|
||||||
|
|
||||||
- name: Create db
|
|
||||||
postgresql_db: name="resalloc" encoding='UTF-8' owner=resalloc
|
|
||||||
become: yes
|
|
||||||
become_user: postgres
|
|
||||||
|
|
||||||
- name: allow lighttpd user to conenct into the database as resalloc
|
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /var/lib/pgsql/data/pg_ident.conf
|
path: /var/lib/pgsql/data/pg_ident.conf
|
||||||
line: "resalloc lighttpd resalloc"
|
line: "{{ item }}"
|
||||||
|
with_items:
|
||||||
|
- "all postgres postgres"
|
||||||
|
- "all resalloc resalloc"
|
||||||
|
- "all lighttpd resalloc"
|
||||||
owner: postgres
|
owner: postgres
|
||||||
group: postgres
|
group: postgres
|
||||||
mode: 0600
|
mode: 0600
|
||||||
|
@ -50,7 +44,17 @@
|
||||||
databases: all
|
databases: all
|
||||||
users: all
|
users: all
|
||||||
method: peer
|
method: peer
|
||||||
options: map=resalloc
|
options: map=all
|
||||||
|
|
||||||
|
- name: Create PG user
|
||||||
|
postgresql_user: name="resalloc"
|
||||||
|
become: yes
|
||||||
|
become_user: postgres
|
||||||
|
|
||||||
|
- name: Create db
|
||||||
|
postgresql_db: name="resalloc" encoding='UTF-8' owner=resalloc
|
||||||
|
become: yes
|
||||||
|
become_user: postgres
|
||||||
|
|
||||||
- set_fact:
|
- set_fact:
|
||||||
provision_directory: /var/lib/resallocserver/provision
|
provision_directory: /var/lib/resallocserver/provision
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue