mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
Break the modules docs into separate files.
This commit is contained in:
40
rst/modules/postgresql_user.rst
Normal file
40
rst/modules/postgresql_user.rst
Normal file
@@ -0,0 +1,40 @@
|
||||
.. _postgresql_user:
|
||||
|
||||
postgresql_user
|
||||
```````````````
|
||||
|
||||
Add or remove PostgreSQL users (roles) from a remote host, and grant the users
|
||||
access to an existing database.
|
||||
|
||||
The default authentication assumes that you are either logging in as or
|
||||
sudo'ing to the postgres account on the host.
|
||||
|
||||
This module uses psycopg2, a Python PostgreSQL database adapter. You must
|
||||
ensure that psycopg2 is installed on the host before using this module. If
|
||||
the remote host is the PostgreSQL server (which is the default case), then
|
||||
PostgreSQL must also be installed on the remote host. For Ubuntu-based systems,
|
||||
install the postgresql, libpq-dev, and python-psycopg2 packages on the remote
|
||||
host before using this module.
|
||||
|
||||
+--------------------+----------+----------+----------------------------------------------------------------------------+
|
||||
| parameter | required | default | comments |
|
||||
+====================+==========+==========+============================================================================+
|
||||
| name | yes | | name of the user (role) to add or remove |
|
||||
+--------------------+----------+----------+----------------------------------------------------------------------------+
|
||||
| password | yes | | set the user's password |
|
||||
+--------------------+----------+----------+----------------------------------------------------------------------------+
|
||||
| db | yes | | name of an existing database to grant user access to |
|
||||
+--------------------+----------+----------+----------------------------------------------------------------------------+
|
||||
| login_user | no | postgres | user (role) used to authenticate with PostgreSQL |
|
||||
+--------------------+----------+----------+----------------------------------------------------------------------------+
|
||||
| login_password | no | | password used to authenticate with PostgreSQL |
|
||||
+--------------------+----------+----------+----------------------------------------------------------------------------+
|
||||
| login_host | no | | host running PostgreSQL. Default (blank) implies localhost |
|
||||
+--------------------+----------+----------+----------------------------------------------------------------------------+
|
||||
| state | | present | 'absent' or 'present' |
|
||||
+--------------------+----------+----------+----------------------------------------------------------------------------+
|
||||
|
||||
|
||||
Example action from Ansible :doc:`playbooks`::
|
||||
|
||||
postgresql_user db=acme user=django password=ceec4eif7ya
|
||||
Reference in New Issue
Block a user