mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-29 22:01:27 -07:00
Postgresql docs fragments 2 (#55363)
* Postgres to use docsfragments * Postgres to use docsfragments: redefined options in postgresql_user
This commit is contained in:
parent
12d26eceb1
commit
c3cbc39dd9
17 changed files with 96 additions and 597 deletions
|
@ -24,7 +24,7 @@ description:
|
|||
- The lines in the file should be in a typical pg_hba form and lines should be unique per key (type, databases, users, source).
|
||||
If they are not unique and the SID is 'the one to change', only one for C(state=present) or none for C(state=absent) of the SID's will remain.
|
||||
extends_documentation_fragment: files
|
||||
version_added: "2.8"
|
||||
version_added: '2.8'
|
||||
options:
|
||||
address:
|
||||
description:
|
||||
|
@ -119,30 +119,30 @@ author: Sebastiaan Mannem (@sebasmannem)
|
|||
EXAMPLES = '''
|
||||
- name: Grant users joe and simon access to databases sales and logistics from ipv6 localhost ::1/128 using peer authentication.
|
||||
postgresql_pg_hba:
|
||||
dest=/var/lib/postgres/data/pg_hba.conf
|
||||
contype=host
|
||||
users=joe,simon
|
||||
source=::1
|
||||
databases=sales,logistics
|
||||
method=peer
|
||||
create=true
|
||||
dest: /var/lib/postgres/data/pg_hba.conf
|
||||
contype: host
|
||||
users: joe,simon
|
||||
source: ::1
|
||||
databases: sales,logistics
|
||||
method: peer
|
||||
create: true
|
||||
|
||||
- name: Grant user replication from network 192.168.0.100/24 access for replication with client cert authentication.
|
||||
postgresql_pg_hba:
|
||||
dest=/var/lib/postgres/data/pg_hba.conf
|
||||
contype=host
|
||||
users=replication
|
||||
source=192.168.0.100/24
|
||||
databases=replication
|
||||
method=cert
|
||||
dest: /var/lib/postgres/data/pg_hba.conf
|
||||
contype: host
|
||||
users: replication
|
||||
source: 192.168.0.100/24
|
||||
databases: replication
|
||||
method: cert
|
||||
|
||||
- name: Revoke access from local user mary on database mydb.
|
||||
postgresql_pg_hba:
|
||||
dest=/var/lib/postgres/data/pg_hba.conf
|
||||
contype=local
|
||||
users=mary
|
||||
databases=mydb
|
||||
state=absent
|
||||
dest: /var/lib/postgres/data/pg_hba.conf
|
||||
contype: local
|
||||
users: mary
|
||||
databases: mydb
|
||||
state: absent
|
||||
'''
|
||||
|
||||
RETURN = r'''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue