Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stuvusit/postgresql
Set up a PostgreSQL Server with Ansible
https://github.com/stuvusit/postgresql
ansible ansible-role arch debian postgres postgresql ubuntu
Last synced: 4 days ago
JSON representation
Set up a PostgreSQL Server with Ansible
- Host: GitHub
- URL: https://github.com/stuvusit/postgresql
- Owner: stuvusIT
- License: other
- Created: 2017-03-10T10:23:43.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-05-18T11:25:42.000Z (over 2 years ago)
- Last Synced: 2023-12-15T04:38:34.795Z (about 1 year ago)
- Topics: ansible, ansible-role, arch, debian, postgres, postgresql, ubuntu
- Language: Jinja
- Homepage:
- Size: 58.6 KB
- Stars: 0
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# postgresql
This role installs and configures a PostgreSQL server.
It allows to set all configuration variables supported by PostgreSQL.This role also makes PostgreSQL comply more to the FHS.
This is accomplished by moving configuration to /etc, logs to /var/log, and the databases to /var/lib.## Requirements
Debian 11 (Bullseye)
## Role Variables
This role seriously has a ton of variables.
Instead of copying the defaults file here, look it [up there](defaults/main.yml).
All variables from postgresql.conf are called exactly like they are called in the file but with `postgres_` prepended.| Name | Default/Required | Description |
| ------------------------- | :---------------------: | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `postgres_initdb` | `initdb` | Path to the initdb executable. On Ubuntu, the default value is automatically discovered. |
| `postgres_home_directory` | `/var/lib/postgresHome` | Path to the home of the postgres user |
| `postgres_users` | `[]` | List of dicts of [postgresql_user](https://docs.ansible.com/ansible/latest/collections/community/general/postgresql_user_module.html) parameters |
| `postgres_dbs` | `[]` | List of dicts of [postgresql_db](https://docs.ansible.com/ansible/latest/collections/community/general/postgresql_db_module.html) parameters |### roles
| Name | Default/Required | Description |
| ------------ | :--------------: | --------------------- |
| `password` | | The password to set |
| `privileges` | | The privileges to set |## Dependencies
None
## Example Playbook
```yml
- hosts: postgres
roles:
- role: postgresql
postgres_users:
- name: synapse
password: TODO-change-me
postgres_dbs:
- name: synapse
encoding: UTF8
lc_collate: C
lc_ctype: C
template: template0
owner: synapse```
## License
This work is licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-sa/4.0/).
## Author Information
- [Janne Heß](https://github.com/dasJ)