mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Added DOCUMENTATION to postgresql_db module.
This commit is contained in:
parent
6184a0a313
commit
a4620920b2
1 changed files with 49 additions and 0 deletions
|
@ -16,6 +16,55 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: postgresql_db
|
||||
short_description: Add or remove PostgreSQL databases from a remote host.
|
||||
description:
|
||||
- Add or remove PostgreSQL databases from a remote host.
|
||||
version_added: "0.6"
|
||||
options:
|
||||
name:
|
||||
description:
|
||||
- name of the database to add or remove
|
||||
required: true
|
||||
default: null
|
||||
login_user:
|
||||
description:
|
||||
- The username used to authenticate with
|
||||
required: false
|
||||
default: null
|
||||
login_password:
|
||||
description:
|
||||
- The passwordused to authenticate with
|
||||
required: false
|
||||
default: null
|
||||
login_host:
|
||||
description:
|
||||
- Host running the database
|
||||
required: false
|
||||
default: localhost
|
||||
owner:
|
||||
description:
|
||||
- Name of the role to set as owner of the database
|
||||
required: false
|
||||
default: null
|
||||
state:
|
||||
description:
|
||||
- The database state
|
||||
required: false
|
||||
default: present
|
||||
choices: [ "present", "absent" ]
|
||||
examples:
|
||||
- code: postgresql_db db=acme
|
||||
description: create a new database with name 'acme'
|
||||
notes:
|
||||
- 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.
|
||||
requirements: [ psycopg2 ]
|
||||
author: Lorin Hochstein
|
||||
'''
|
||||
|
||||
try:
|
||||
import psycopg2
|
||||
except ImportError:
|
||||
|
|
Loading…
Reference in a new issue