Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
cd2f4487
Commit
cd2f4487
authored
Jul 29, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #154 from lorin/postgres-docs
Document postgresql_db and postgresql_user modules.
parents
2baf4f2e
840f3c95
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
82 additions
and
1 deletions
+82
-1
rst/modules.rst
+82
-1
No files found.
rst/modules.rst
View file @
cd2f4487
...
@@ -348,7 +348,86 @@ This module does not support change hooks and is informative only - it
...
@@ -348,7 +348,86 @@ This module does not support change hooks and is informative only - it
takes no parameters & does not support change hooks, nor does it make
takes no parameters & does not support change hooks, nor does it make
any changes on the system.
any changes on the system.
.. _service:
.. postgresql_db:
postgresql_db
`````````````
Add or remove PostgreSQL databases from a remote host.
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.
+--------------------+----------+----------+----------------------------------------------------------------------------+
| parameter | required | default | comments |
+====================+==========+==========+============================================================================+
| db | yes | | name of the database to add or remove |
+--------------------+----------+----------+----------------------------------------------------------------------------+
| login_user | no | postgres | user (role) used to authenticate with PostgreSQL |
+--------------------+----------+----------+----------------------------------------------------------------------------+
| login_password | no | | password used to authenticate with PostgreSQL |
+--------------------+----------+----------+----------------------------------------------------------------------------+
| login_host | no | | host running PostgreSQL. Default (blank) implies localhost |
+--------------------+----------+----------+----------------------------------------------------------------------------+
| state | | present | 'absent' or 'present' |
+--------------------+----------+----------+----------------------------------------------------------------------------+
Example action from Ansible :doc:`playbooks`::
postgresql_db db=acme
.. postgresql_user:
postgresql_user
```````````````
Add or remove PostgreSQL users (roles) from a remote host, and grant the users
access to an existing database.
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.
+--------------------+----------+----------+----------------------------------------------------------------------------+
| parameter | required | default | comments |
+====================+==========+==========+============================================================================+
| user | yes | | name of the user (role) to add or remove |
+--------------------+----------+----------+----------------------------------------------------------------------------+
| password | yes | | set the user's password |
+--------------------+----------+----------+----------------------------------------------------------------------------+
| db | yes | | name of an existing database to grant user access to |
+--------------------+----------+----------+----------------------------------------------------------------------------+
| login_user | no | postgres | user (role) used to authenticate with PostgreSQL |
+--------------------+----------+----------+----------------------------------------------------------------------------+
| login_password | no | | password used to authenticate with PostgreSQL |
+--------------------+----------+----------+----------------------------------------------------------------------------+
| login_host | no | | host running PostgreSQL. Default (blank) implies localhost |
+--------------------+----------+----------+----------------------------------------------------------------------------+
| state | | present | 'absent' or 'present' |
+--------------------+----------+----------+----------------------------------------------------------------------------+
Example action from Ansible :doc:`playbooks`::
postgresql_user db=acme user=django password=ceec4eif7ya
.. _raw:
raw
raw
```
```
...
@@ -370,6 +449,8 @@ Example from `/usr/bin/ansible` to bootstrap a legacy python 2.4 host::
...
@@ -370,6 +449,8 @@ Example from `/usr/bin/ansible` to bootstrap a legacy python 2.4 host::
ansible newhost.example.com raw -a "yum install python-simplejson"
ansible newhost.example.com raw -a "yum install python-simplejson"
.. _service:
service
service
```````
```````
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment