From a4620920b2804ad0da21eec31e17d940115d03dc Mon Sep 17 00:00:00 2001 From: Marco Vito Moscaritolo Date: Sat, 29 Sep 2012 16:46:13 +0200 Subject: [PATCH] Added DOCUMENTATION to postgresql_db module. --- library/postgresql_db | 49 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/library/postgresql_db b/library/postgresql_db index fdccd14ddb..65c0d0685d 100755 --- a/library/postgresql_db +++ b/library/postgresql_db @@ -16,6 +16,55 @@ # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +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: