You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/docs/man/man3/ansible.postgresql_user.3

72 lines
2.8 KiB
Groff

.TH ANSIBLE.POSTGRESQL_USER 5 "2012-10-03" "0.8" "ANSIBLE MODULES"
." generated from library/postgresql_user
.SH NAME
postgresql_user \- Adds or removes a users (roles) from a PostgreSQL database.
." ------ DESCRIPTION
.SH DESCRIPTION
.PP
Add or remove PostgreSQL users (roles) from a remote host and, optionally, grant the users access to an existing database or tables.
.PP
The fundamental function of the module is to create, or delete, roles from a PostgreSQL cluster. Privilege assignment, or removal, is an optional step, which works on one database at a time. This allows for the module to be called several times in the same module to modify the permissions on different databases, or to grant permissions to already existing users.
.PP
A user cannot be removed untill all the privileges have been stripped from the user. In such situation, if the module tries to remove the user it will fail. To avoid this from happening the fail_on_user option signals the module to try to remove the user, but if not possible keep going; the module will report if changes happened and separately if the user was removed or not.
." ------ OPTIONS
."
."
.SH OPTIONS
.IP name
name of the user (role) to add or remove(required)
.IP login_user
User (role) used to authenticate with PostgreSQL (default: postgres)
.IP login_host
Host running PostgreSQL. (default: localhost)
.IP db
name of database where permissions will be granted
.IP state
The database state
.IR Choices :
present,absent. (default: present)
.IP login_password
Password used to authenticate with PostgreSQL
.IP password
set the user's password(required)
.IP fail_on_user
if yes, fail when user can't be removed. Otherwise just log and continue
.IR Choices :
yes,no. (default: True)
.IP priv
PostgreSQL privileges string in the format: \fCtable:priv1,priv2\fR."
."
." ------ NOTES
.SH NOTES
.PP
The default authentication assumes that you are either logging in as or sudo'ing to the postgres account on the host.
.PP
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.
."
."
." ------ EXAMPLES
.SH EXAMPLES
.PP
.nf
postgresql_user db=acme user=django password=ceec4eif7ya priv=CONNECT/products:ALL
.fi
.PP
.nf
postgresql_user db=acme user=test priv=ALL/products:ALL state=absent fail_on_user=no
.fi
.PP
.nf
postgresql_user db=test user=test priv=ALL state=absent
.fi
.PP
.nf
INSERT,UPDATE/table:SELECT/anothertable:ALL
.fi
." ------- AUTHOR
.SH AUTHOR
Lorin Hochstein
.SH SEE ALSO
.IR ansible (1),
.I http://ansible.github.com/modules.html#postgresql-user