New in version 2.3.
Parameter | Choices/Defaults | Comments |
---|---|---|
database
-
|
Default: postgres
|
Name of the database to connect to.
|
login_host
-
|
Default: localhost
|
Host running the database.
|
login_password
-
|
The password used to authenticate with.
|
|
login_unix_socket
-
|
Path to a Unix domain socket for local connections.
|
|
login_user
-
|
The username used to authenticate with.
|
|
name
-
/ required
|
Name of the schema to add or remove.
|
|
owner
-
|
Name of the role to set as owner of the schema.
|
|
port
-
|
Default: 5432
|
Database port to connect to.
|
state
-
|
|
The schema state.
|
Note
postgresql
, libpq-dev
, and python-psycopg2
packages on the remote host before using this module.# Create a new schema with name "acme"
- postgresql_schema:
name: acme
# Create a new schema "acme" with a user "bob" who will own it
- postgresql_schema:
name: acme
owner: bob
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
schema
string
|
success, changed |
Name of the schema
Sample:
acme
|
Hint
If you notice any issues in this documentation you can edit this document to improve it.