mirror of
https://github.com/geerlingguy/ansible-role-postgresql.git
synced 2025-03-10 17:26:20 -04:00
Document ALL THE THINGS
This commit is contained in:
parent
55b9e6a84e
commit
bbfd759545
2 changed files with 66 additions and 41 deletions
68
README.md
68
README.md
|
@ -19,44 +19,66 @@ Available variables are listed below, along with default values (see `defaults/m
|
||||||
|
|
||||||
postgresql_enablerepo: ""
|
postgresql_enablerepo: ""
|
||||||
|
|
||||||
TODO.
|
(RHEL/CentOS only) You can set a repo to use for the PostgreSQL installation by passing it in here.
|
||||||
|
|
||||||
postgresql_user: postgres
|
postgresql_user: postgres
|
||||||
postgresql_group: postgres
|
postgresql_group: postgres
|
||||||
|
|
||||||
TODO.
|
The user and group under which PostgreSQL will run.
|
||||||
|
|
||||||
|
postgresql_unix_socket_directories:
|
||||||
|
- /var/run/postgresql
|
||||||
|
|
||||||
|
The directories (usually one, but can be multiple) where PostgreSQL's socket will be created.
|
||||||
|
|
||||||
|
postgresql_global_config_options:
|
||||||
|
- option: unix_socket_directories
|
||||||
|
value: '{{ postgresql_unix_socket_directories | join(",") }}'
|
||||||
|
|
||||||
|
Global configuration options that will be set in `postgresql.conf`. Note that for RHEL/CentOS 6 (or very old versions of PostgreSQL), you need to at least override this variable and set the `option` to `unix_socket_directory`.
|
||||||
|
|
||||||
|
postgresql_locales:
|
||||||
|
- 'en_US.UTF-8'
|
||||||
|
|
||||||
|
(Debian/Ubuntu only) Used to generate the locales used by PostgreSQL databases.
|
||||||
|
|
||||||
postgresql_databases:
|
postgresql_databases:
|
||||||
- name: example
|
- name: exampledb # required; the rest are optional
|
||||||
lc_collate: 'en_US.UTF-8' # optional
|
lc_collate: # defaults to 'en_US.UTF-8'
|
||||||
lc_ctype: 'en_US.UTF-8' # optional
|
lc_ctype: # defaults to 'en_US.UTF-8'
|
||||||
encoding: 'UTF-8' # optional
|
encoding: # defaults to 'UTF-8'
|
||||||
login_host: example.com # optional, defaults to 'localhost'
|
template: # defaults to 'template0'
|
||||||
login_password: supersecure # optional
|
login_host: # defaults to 'localhost'
|
||||||
login_user: admin # optional, defaults to "{{ postgresql_user }}"
|
login_password: # defaults to not set
|
||||||
port: 5432 # optional
|
login_user: # defaults to 'postgresql_user'
|
||||||
|
login_unix_socket: # defaults to 1st of postgresql_unix_socket_directories
|
||||||
|
port: # defaults to not set
|
||||||
|
state: # defaults to 'present'
|
||||||
|
|
||||||
TODO.
|
A list of databases to ensure exist on the server. Only the `name` is required; all other properties are optional.
|
||||||
|
|
||||||
postgresql_users:
|
postgresql_users:
|
||||||
- name: jdoe
|
- name: jdoe #required; the rest are optional
|
||||||
password: supersecure # optional
|
password: # defaults to not set
|
||||||
login_host: example.com # optional, defaults to 'localhost'
|
priv: # defaults to not set
|
||||||
login_password: supersecure # optional
|
role_attr_flags: # defaults to not set
|
||||||
login_user: admin # optional, defaults to "{{ postgresql_user }}"
|
login_host: # defaults to 'localhost'
|
||||||
port: 1234 # optional, defaults to 5432
|
login_password: # defaults to not set
|
||||||
priv: table:priv1,priv2 # optional
|
login_user: # defaults to '{{ postgresql_user }}'
|
||||||
role_attr_flags: CREATEDB,NOSUPERUSER # optional
|
login_unix_socket: # defaults to 1st of postgresql_unix_socket_directories
|
||||||
state: present # optional
|
port: # defaults to not set
|
||||||
|
state: # defaults to 'present'
|
||||||
|
|
||||||
TODO.
|
A list of users to ensure exist on the server. Only the `name` is required; all other properties are optional.
|
||||||
|
|
||||||
postgresql_version: [OS-specific]
|
postgresql_version: [OS-specific]
|
||||||
|
postgresql_data_dir: [OS-specific]
|
||||||
postgresql_bin_path: [OS-specific]
|
postgresql_bin_path: [OS-specific]
|
||||||
|
postgresql_config_path: [OS-specific]
|
||||||
postgresql_daemon: [OS-specific]
|
postgresql_daemon: [OS-specific]
|
||||||
postgresql_packages: [OS-specific]
|
postgresql_packages: [OS-specific]
|
||||||
|
|
||||||
TODO.
|
OS-specific variables that are set by include files in this role's `vars` directory. These shouldn't be overridden unless you're using a verison of PostgreSQL that wasn't installed using system packages.
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
|
@ -77,7 +99,7 @@ None.
|
||||||
- name: example_db
|
- name: example_db
|
||||||
postgresql_users:
|
postgresql_users:
|
||||||
- name: example_user
|
- name: example_user
|
||||||
password: similarly-secure-password
|
password: supersecure
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|
|
@ -19,24 +19,27 @@ postgresql_locales:
|
||||||
|
|
||||||
# Databases to ensure exist.
|
# Databases to ensure exist.
|
||||||
postgresql_databases: []
|
postgresql_databases: []
|
||||||
# - name: example
|
# - name: exampledb # required; the rest are optional
|
||||||
# lc_collate: 'en_US.UTF-8' # optional
|
# lc_collate: # defaults to 'en_US.UTF-8'
|
||||||
# lc_ctype: 'en_US.UTF-8' # optional
|
# lc_ctype: # defaults to 'en_US.UTF-8'
|
||||||
# encoding: 'UTF-8' # optional
|
# encoding: # defaults to 'UTF-8'
|
||||||
# login_host: example.com # optional, defaults to 'localhost'
|
# template: # defaults to 'template0'
|
||||||
# login_password: supersecure # optional
|
# login_host: # defaults to 'localhost'
|
||||||
# login_user: admin # optional, defaults to "{{ postgresql_user }}"
|
# login_password: # defaults to not set
|
||||||
# port: 5432 # optional
|
# login_user: # defaults to '{{ postgresql_user }}'
|
||||||
# state: present # optional, defaults to 'present'
|
# login_unix_socket: # defaults to 1st of postgresql_unix_socket_directories
|
||||||
|
# port: # defaults to not set
|
||||||
|
# state: # defaults to 'present'
|
||||||
|
|
||||||
# Users to ensure exist.
|
# Users to ensure exist.
|
||||||
postgresql_users: []
|
postgresql_users: []
|
||||||
# - name: jdoe
|
# - name: jdoe #required; the rest are optional
|
||||||
# password: supersecure # optional
|
# password: # defaults to not set
|
||||||
# login_host: example.com # optional, defaults to 'localhost'
|
# priv: # defaults to not set
|
||||||
# login_password: supersecure # optional
|
# role_attr_flags: # defaults to not set
|
||||||
# login_user: admin # optional, defaults to "{{ postgresql_user }}"
|
# login_host: # defaults to 'localhost'
|
||||||
# port: 1234 # optional, defaults to 5432
|
# login_password: # defaults to not set
|
||||||
# priv: table:priv1,priv2 # optional
|
# login_user: # defaults to '{{ postgresql_user }}'
|
||||||
# role_attr_flags: CREATEDB,NOSUPERUSER # optional
|
# login_unix_socket: # defaults to 1st of postgresql_unix_socket_directories
|
||||||
# state: present # optional
|
# port: # defaults to not set
|
||||||
|
# state: # defaults to 'present'
|
||||||
|
|
Loading…
Add table
Reference in a new issue