{"id":22628073,"url":"https://github.com/turgon37/ansible-postgresql-server","last_synced_at":"2026-04-18T06:37:05.362Z","repository":{"id":85532913,"uuid":"106457740","full_name":"Turgon37/ansible-postgresql-server","owner":"Turgon37","description":"Ansible role to configure Postgresql service","archived":false,"fork":false,"pushed_at":"2019-08-31T09:14:10.000Z","size":54,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-06T06:27:51.010Z","etag":null,"topics":["ansible","postgresql"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Turgon37.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-10T18:47:41.000Z","updated_at":"2019-08-31T09:13:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"585ece55-f793-480d-a7e5-b24afa4a53e7","html_url":"https://github.com/Turgon37/ansible-postgresql-server","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Turgon37/ansible-postgresql-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Turgon37%2Fansible-postgresql-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Turgon37%2Fansible-postgresql-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Turgon37%2Fansible-postgresql-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Turgon37%2Fansible-postgresql-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Turgon37","download_url":"https://codeload.github.com/Turgon37/ansible-postgresql-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Turgon37%2Fansible-postgresql-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31959881,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","postgresql"],"created_at":"2024-12-09T01:18:00.212Z","updated_at":"2026-04-18T06:37:05.334Z","avatar_url":"https://github.com/Turgon37.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Ansible Role PostgreSQL\n========\n\n[![Build Status](https://travis-ci.org/Turgon37/ansible-postgresql-server.svg?branch=master)](https://travis-ci.org/Turgon37/ansible-postgresql-server)\n[![License](https://img.shields.io/badge/license-MIT%20License-brightgreen.svg)](https://opensource.org/licenses/MIT)\n[![Ansible Role](https://img.shields.io/badge/ansible%20role-Turgon37.postgresql_server-blue.svg)](https://galaxy.ansible.com/Turgon37/postgresql_server/)\n\n## Description\n\n:grey_exclamation: Before using this role, please know that all my Ansible roles are fully written and accustomed to my IT infrastructure. So, even if they are as generic as possible they will not necessarily fill your needs, I advice you to carrefully analyse what they do and evaluate their capability to be installed securely on your servers.\n\nThis roles can install and configure a PostgreSQL database.\n\n## Requirements\n\nRequire Ansible \u003e= 2.4\n\n### Dependencies\n\n## OS Family\n\nThis role is available for Debian\n\n## Features\n\nAt this day the role can be used to :\n\n  * install PostgreSQL\n  * configure main service\n     * configure pg_hba\n\n## Configuration\n\n### Role variables\n\nAll variables which can be overridden are stored in [defaults/main.yml](defaults/main.yml) file as well as in table below. To see default values please refer to this file.\n\n| Name                                     | Types/Values      | Description                                                             |\n| ---------------------------------------- | ------------------|-------------------------------------------------------------------------|\n| `postgresql_server__data_directory`      | Path              | The root database directory                                             |\n| `postgresql_server__listen_addresses`    | List of addresses | List of addresses on which the server will listen for connections       |\n| `postgresql_server__roles`               | Dict of role/user | Dict of user/role to ensure in postgresql server                        |\n| `postgresql_server__databases`           |                   |                                                                         |\n| `postgresql_server__service_restartable` | Boolean           | Allow or not ansible to restart the database on changes that require it |\n\n#### PostgreSQL role/user\n\n## Example\n\n### Playbook\n\n* Install and configure a non built-in exporter type as follows :\n\n```yaml\n- hosts: all\n  roles:\n    - role: turgon37.postgresql_server\n      vars:\n        postgresql_server__listen_addresses:\n          - 10.1.1.2\n          - 127.0.0.1\n        postgresql_server__hba_rules_host:\n          - type: host\n            database: app1\n            user: app1\n            address: 10.1.1.1/32\n            method: md5\n        postgresql_server__roles:\n          admin:\n            password: '{{ vault__admin }}'\n            profile: admin\n\n          app1:\n            password: '{{ vault__app1 }}'\n            profile: simple-applicative-user\n\n          app1ro:\n            password: '{{ vault__app1ro }}'\n            profile: simple-applicative-user\n            privileges:\n              - database: app1\n                type: database\n                privs: CONNECT\n              - database: app1\n                type: schema\n                objs: public\n                privs: USAGE\n              - database: app1\n                objs: ALL_IN_SCHEMA\n                privs: SELECT\n        postgresql_server__databases:\n          app1:\n            owner: app1\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fturgon37%2Fansible-postgresql-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fturgon37%2Fansible-postgresql-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fturgon37%2Fansible-postgresql-server/lists"}