Skip to content

Commit fa4e27e

Browse files
committed
Use longer lines in README
1 parent 6de2c7c commit fa4e27e

File tree

1 file changed

+46
-67
lines changed

1 file changed

+46
-67
lines changed

README.md

Lines changed: 46 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
PostgreSQL
22
==========
33

4-
An [Ansible][ansible] role for installing and managing [PostgreSQL][postgresql]
5-
servers. This role works with both Debian and RedHat based systems, and
6-
provides backup scripts for [PostgreSQL Continuous Archiving and Point-in-Time
4+
An [Ansible][ansible] role for installing and managing [PostgreSQL][postgresql] servers. This role works with both
5+
Debian and RedHat based systems, and provides backup scripts for [PostgreSQL Continuous Archiving and Point-in-Time
76
Recovery][postgresql_pitr].
87

9-
On RedHat-based platforms, the [PostgreSQL Global Development Group (PGDG)
10-
packages][pgdg_yum] packages will be installed. On Debian-based platforms, you
11-
can choose from the distribution's packages (from APT) or the [PGDG
8+
On RedHat-based platforms, the [PostgreSQL Global Development Group (PGDG) packages][pgdg_yum] packages will be
9+
installed. On Debian-based platforms, you can choose from the distribution's packages (from APT) or the [PGDG
1210
packages][pgdg_apt].
1311

1412
[ansible]: http://www.ansible.com/
@@ -17,38 +15,32 @@ packages][pgdg_apt].
1715
[pgdg_yum]: http://yum.postgresql.org/
1816
[pgdg_apt]: http://apt.postgresql.org/
1917

20-
**Changes that require a restart will not be applied unless you manually
21-
restart PostgreSQL.** This role will reload the server for those configuration
22-
changes that can be updated with only a reload because reloading is a
23-
non-intrusive operation, but options that require a full restart will not cause
24-
the server to restart.
18+
**Changes that require a restart will not be applied unless you manually restart PostgreSQL.** This role will reload the
19+
server for those configuration changes that can be updated with only a reload because reloading is a non-intrusive
20+
operation, but options that require a full restart will not cause the server to restart.
2521

2622
Requirements
2723
------------
2824

29-
This role requires Ansible 1.8+
25+
This role requires Ansible 2.4+
3026

3127
Role Variables
3228
--------------
3329

3430
### All variables are optional ###
3531

36-
- `postgresql_user_name`: System username to be used for PostgreSQL (default:
37-
`postgres`).
32+
- `postgresql_user_name`: System username to be used for PostgreSQL (default: `postgres`).
3833

39-
- `postgresql_version`: PostgreSQL version to install. On Debian-based
40-
platforms, the default is whatever version is pointed to by the `postgresql`
41-
metapackage). On RedHat-based platforms, the default is `9.4`.
34+
- `postgresql_version`: PostgreSQL version to install. On Debian-based platforms, the default is whatever version is
35+
pointed to by the `postgresql` metapackage). On RedHat-based platforms, the default is `9.4`.
4236

43-
- `postgresql_flavor`: On Debian-based platforms, this specifies whether you
44-
want to use PostgreSQL packages from pgdg or the distribution's apt
45-
repositories. Possible values: `apt`, `pgdg` (default: `apt`).
37+
- `postgresql_flavor`: On Debian-based platforms, this specifies whether you want to use PostgreSQL packages from pgdg
38+
or the distribution's apt repositories. Possible values: `apt`, `pgdg` (default: `apt`).
4639

47-
- `postgresql_conf`: A hash (dictionary) of `postgresql.conf` options and
48-
values. These options are not added to `postgresql.conf` directly - the role
49-
adds a `conf.d` subdirectory in the configuration directory and an include
50-
statement for that directory to `postgresql.conf`. Options set in
51-
`postgresql_conf` are then set in `conf.d/25ansible_postgresql.conf`.
40+
- `postgresql_conf`: A hash (dictionary) of `postgresql.conf` options and values. These options are not added to
41+
`postgresql.conf` directly - the role adds a `conf.d` subdirectory in the configuration directory and an include
42+
statement for that directory to `postgresql.conf`. Options set in `postgresql_conf` are then set in
43+
`conf.d/25ansible_postgresql.conf`.
5244

5345
Due to YAML parsing, you must take care when defining values in
5446
`postgresql_conf` to ensure they are properly written to the config file. For
@@ -71,60 +63,49 @@ Role Variables
7163
7264
- `postgresql_pg_hba_conf`: A list of lines to add to `pg_hba.conf`
7365
74-
- `postgresql_pg_hba_local_postgres_user`: If set to `false`, this will remove
75-
the `postgres` user's entry from `pg_hba.conf` that is preconfigured on
76-
Debian-based PostgreSQL installations. You probably do not want to do this
66+
- `postgresql_pg_hba_local_postgres_user`: If set to `false`, this will remove the `postgres` user's entry from
67+
`pg_hba.conf` that is preconfigured on Debian-based PostgreSQL installations. You probably do not want to do this
7768
unless you know what you're doing.
7869
79-
- `postgresql_pg_hba_local_socket`: If set to `false`, this will remove the
80-
`local` entry from `pg_hba.conf` that is preconfigured by the PostgreSQL
81-
package.
70+
- `postgresql_pg_hba_local_socket`: If set to `false`, this will remove the `local` entry from `pg_hba.conf` that is
71+
preconfigured by the PostgreSQL package.
8272
83-
- `postgresql_pg_hba_local_ipv4`: If set to `false`, this will remove the `host
84-
... 127.0.0.1/32` entry from `pg_hba.conf` that is preconfigured by the
85-
PostgreSQL package.
73+
- `postgresql_pg_hba_local_ipv4`: If set to `false`, this will remove the `host ... 127.0.0.1/32` entry from
74+
`pg_hba.conf` that is preconfigured by the PostgreSQL package.
8675
87-
- `postgresql_pg_hba_local_ipv6`: If set to `false`, this will remove the `host
88-
... ::1/128` entry from `pg_hba.conf` that is preconfigured by the PostgreSQL
89-
package.
76+
- `postgresql_pg_hba_local_ipv6`: If set to `false`, this will remove the `host ... ::1/128` entry from `pg_hba.conf`
77+
that is preconfigured by the PostgreSQL package.
9078
91-
- `postgresql_pgdata_dir`: Only set this if you have changed the `$PGDATA`
92-
directory from the package default. Note this does not configure PostgreSQL
93-
to actually use a different directory, you will need to do that yourself, it
94-
just allows the role to properly locate the directory.
79+
- `postgresql_pgdata_dir`: Only set this if you have changed the `$PGDATA` directory from the package default. Note this
80+
does not configure PostgreSQL to actually use a different directory, you will need to do that yourself, it just allows
81+
the role to properly locate the directory.
9582
96-
- `postgresql_conf_dir`: As with `postgresql_pgdata_dir` except for the
97-
configuration directory.
83+
- `postgresql_conf_dir`: As with `postgresql_pgdata_dir` except for the configuration directory.
9884
9985
### Backups ###
10086
101-
- `postgresql_backup_dir`: If set, enables [PITR][postgresql_pitr] backups. Set
102-
this to a directory where your database will be backed up (this can be any
103-
format supported by rsync, e.g. `user@host:/path`). The most recent backup
104-
will be in a subdirectory named `current`.
87+
- `postgresql_backup_dir`: If set, enables [PITR][postgresql_pitr] backups. Set this to a directory where your database
88+
will be backed up (this can be any format supported by rsync, e.g. `user@host:/path`). The most recent backup will be
89+
in a subdirectory named `current`.
10590
106-
- `postgresql_backup_rotate`: Boolean, defaults to `true`, which will cause the
107-
`current` directory to be renamed prior to creating a new backup. If set to
108-
`false`, `current` will be deleted (this is useful if you are using snapshots
109-
or some other means to archive previous backups).
91+
- `postgresql_backup_rotate`: Boolean, defaults to `true`, which will cause the `current` directory to be renamed prior
92+
to creating a new backup. If set to `false`, `current` will be deleted (this is useful if you are using snapshots or
93+
some other means to archive previous backups).
11094
111-
- `postgresql_backup_local_dir`: Filesystem path on the PostgreSQL server where
112-
backup scripts will be placed and working WALs will be written prior to a WAL
113-
archive.
95+
- `postgresql_backup_local_dir`: Filesystem path on the PostgreSQL server where backup scripts will be placed and
96+
working WALs will be written prior to a WAL archive.
11497
115-
- `postgresql_backup_[hour|minute]`: Controls what time the cron job will run
116-
to perform a full backup. Defaults to 1:00 AM.
98+
- `postgresql_backup_[hour|minute]`: Controls what time the cron job will run to perform a full backup. Defaults to 1:00
99+
AM.
117100
118-
- `postgresql_backup_[day|month|weekday]`: Additional cron controls for when
119-
the full backup is performed (default: `*`).
101+
- `postgresql_backup_[day|month|weekday]`: Additional cron controls for when the full backup is performed (default:
102+
`*`).
120103
121-
- `postgresql_backup_mail_recipient`: User or address that should receive mail
122-
from the backup scripts.
104+
- `postgresql_backup_mail_recipient`: User or address that should receive mail from the backup scripts.
123105
124106
- `postgresql_backup_remote_rsync_path`: Path to `rsync` on the remote system.
125107
126-
- `postgresql_backup_post_command`: Arbitrary command to run after successful
127-
completion of a scheduled backup.
108+
- `postgresql_backup_post_command`: Arbitrary command to run after successful completion of a scheduled backup.
128109
129110
Dependencies
130111
------------
@@ -134,8 +115,7 @@ None
134115
Example Playbook
135116
----------------
136117
137-
Standard install: Default `postgresql.conf`, `pg_hba.conf` and default version
138-
for the OS:
118+
Standard install: Default `postgresql.conf`, `pg_hba.conf` and default version for the OS:
139119
140120
```yaml
141121
---
@@ -159,16 +139,15 @@ Use the pgdg packages on a Debian-based host:
159139
- postgresql
160140
```
161141
162-
Use the PostgreSQL 9.3 packages and set some `postgresql.conf` options and
163-
`pg_hba.conf` entries:
142+
Use the PostgreSQL 9.5 packages and set some `postgresql.conf` options and `pg_hba.conf` entries:
164143

165144
```yaml
166145
---
167146
168147
- hosts: dbservers
169148
remote_user: root
170149
vars:
171-
postgresql_version: 9.3
150+
postgresql_version: 9.5
172151
postgresql_conf:
173152
listen_addresses: "''" # disable network listening (listen on unix socket only)
174153
max_connections: 50 # decrease connection limit

0 commit comments

Comments
 (0)