New in version 2.3.
The below requirements are needed on the host that executes this module.
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 |
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
This module is flagged as community which means that it is maintained by the Ansible Community. See Module Maintenance & Support for more info.
For a list of other modules that are also maintained by the Ansible Community, see here.
Hint
If you notice any issues in this documentation you can edit this document to improve it.
© 2012–2018 Michael DeHaan
© 2018 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.7/modules/postgresql_schema_module.html