{"id":46274312,"url":"https://github.com/rolehippie/postgresql","last_synced_at":"2026-03-04T04:02:25.994Z","repository":{"id":43249229,"uuid":"344619629","full_name":"rolehippie/postgresql","owner":"rolehippie","description":"Ansible role to install and configure a simple PostgreSQL","archived":false,"fork":false,"pushed_at":"2026-02-26T17:44:57.000Z","size":326,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-26T23:47:39.513Z","etag":null,"topics":["ansible","ansible-role","hacktoberfest","role"],"latest_commit_sha":null,"homepage":"","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rolehippie.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-03-04T21:54:07.000Z","updated_at":"2026-02-26T17:45:01.000Z","dependencies_parsed_at":"2023-10-16T18:23:01.843Z","dependency_job_id":"17beaf4e-14be-4565-a8a5-bdf459d24564","html_url":"https://github.com/rolehippie/postgresql","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/rolehippie/postgresql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rolehippie%2Fpostgresql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rolehippie%2Fpostgresql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rolehippie%2Fpostgresql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rolehippie%2Fpostgresql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rolehippie","download_url":"https://codeload.github.com/rolehippie/postgresql/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rolehippie%2Fpostgresql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30071670,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T03:25:38.285Z","status":"ssl_error","status_checked_at":"2026-03-04T03:25:05.086Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","ansible-role","hacktoberfest","role"],"created_at":"2026-03-04T04:02:22.202Z","updated_at":"2026-03-04T04:02:25.986Z","avatar_url":"https://github.com/rolehippie.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":"# postgresql\n\n[![Source Code](https://img.shields.io/badge/github-source%20code-blue?logo=github\u0026logoColor=white)](https://github.com/rolehippie/postgresql)\n[![General Workflow](https://github.com/rolehippie/postgresql/actions/workflows/general.yml/badge.svg)](https://github.com/rolehippie/postgresql/actions/workflows/general.yml)\n[![Readme Workflow](https://github.com/rolehippie/postgresql/actions/workflows/docs.yml/badge.svg)](https://github.com/rolehippie/postgresql/actions/workflows/docs.yml)\n[![Galaxy Workflow](https://github.com/rolehippie/postgresql/actions/workflows/galaxy.yml/badge.svg)](https://github.com/rolehippie/postgresql/actions/workflows/galaxy.yml)\n[![License: Apache-2.0](https://img.shields.io/github/license/rolehippie/postgresql)](https://github.com/rolehippie/postgresql/blob/master/LICENSE)\n[![Ansible Role](https://img.shields.io/badge/role-rolehippie.postgresql-blue)](https://galaxy.ansible.com/rolehippie/postgresql)\n\nAnsible role to install and configure a postgresql full-text search engine.\n\n## Sponsor\n\nBuilding and improving this Ansible role have been sponsored by my current and previous employers like **[Cloudpunks GmbH](https://cloudpunks.de)** and **[Proact Deutschland GmbH](https://www.proact.eu)**.\n\n## Table of contents\n\n- [Requirements](#requirements)\n- [Default Variables](#default-variables)\n  - [postgresql_backup_addition_script](#postgresql_backup_addition_script)\n  - [postgresql_backup_cron](#postgresql_backup_cron)\n  - [postgresql_backup_enabled](#postgresql_backup_enabled)\n  - [postgresql_backup_formatting](#postgresql_backup_formatting)\n  - [postgresql_backup_ignore](#postgresql_backup_ignore)\n  - [postgresql_backup_path](#postgresql_backup_path)\n  - [postgresql_backup_retention](#postgresql_backup_retention)\n  - [postgresql_ctl_options](#postgresql_ctl_options)\n  - [postgresql_default_hba](#postgresql_default_hba)\n  - [postgresql_exporter_args](#postgresql_exporter_args)\n  - [postgresql_exporter_download](#postgresql_exporter_download)\n  - [postgresql_exporter_enabled](#postgresql_exporter_enabled)\n  - [postgresql_exporter_version](#postgresql_exporter_version)\n  - [postgresql_extra_databases](#postgresql_extra_databases)\n  - [postgresql_extra_environment](#postgresql_extra_environment)\n  - [postgresql_extra_hba](#postgresql_extra_hba)\n  - [postgresql_extra_ident](#postgresql_extra_ident)\n  - [postgresql_extra_users](#postgresql_extra_users)\n  - [postgresql_global_databases](#postgresql_global_databases)\n  - [postgresql_global_environment](#postgresql_global_environment)\n  - [postgresql_global_hba](#postgresql_global_hba)\n  - [postgresql_global_ident](#postgresql_global_ident)\n  - [postgresql_global_users](#postgresql_global_users)\n  - [postgresql_listen_address](#postgresql_listen_address)\n  - [postgresql_max_connections](#postgresql_max_connections)\n  - [postgresql_packages](#postgresql_packages)\n  - [postgresql_port](#postgresql_port)\n  - [postgresql_recursive_perm_enforce](#postgresql_recursive_perm_enforce)\n  - [postgresql_root_password](#postgresql_root_password)\n  - [postgresql_root_username](#postgresql_root_username)\n  - [postgresql_ssl_ca_file](#postgresql_ssl_ca_file)\n  - [postgresql_ssl_cert_file](#postgresql_ssl_cert_file)\n  - [postgresql_ssl_crl_file](#postgresql_ssl_crl_file)\n  - [postgresql_ssl_dh_params_file](#postgresql_ssl_dh_params_file)\n  - [postgresql_ssl_enabled](#postgresql_ssl_enabled)\n  - [postgresql_ssl_key_file](#postgresql_ssl_key_file)\n  - [postgresql_superuser_reserved_connections](#postgresql_superuser_reserved_connections)\n  - [postgresql_version](#postgresql_version)\n- [Discovered Tags](#discovered-tags)\n- [Dependencies](#dependencies)\n- [License](#license)\n- [Author](#author)\n\n---\n\n## Requirements\n\n- Minimum Ansible version: `2.10`\n\n## Default Variables\n\n### postgresql_backup_addition_script\n\nAdditional commands at the end of the script\n\n#### Default value\n\n```YAML\npostgresql_backup_addition_script:\n```\n\n### postgresql_backup_cron\n\nA simple cron timing definition like hourly, daily or weekly\n\n#### Default value\n\n```YAML\npostgresql_backup_cron: daily\n```\n\n### postgresql_backup_enabled\n\nEnable or disable the backup script\n\n#### Default value\n\n```YAML\npostgresql_backup_enabled: false\n```\n\n### postgresql_backup_formatting\n\nDate format for the backup folder name\n\n#### Default value\n\n```YAML\npostgresql_backup_formatting: '%F'\n```\n\n### postgresql_backup_ignore\n\nIgnoring this filter via grep on database selection\n\n#### Default value\n\n```YAML\npostgresql_backup_ignore: (postgres|template0|template1)\n```\n\n### postgresql_backup_path\n\nPath to store the backups\n\n#### Default value\n\n```YAML\npostgresql_backup_path: /var/lib/postgresql/backup\n```\n\n### postgresql_backup_retention\n\nRetention period to keep backups\n\n#### Default value\n\n```YAML\npostgresql_backup_retention: 7\n```\n\n### postgresql_ctl_options\n\nOptions for PostgeSQL ctl\n\n#### Default value\n\n```YAML\npostgresql_ctl_options:\n```\n\n### postgresql_default_hba\n\nList of default hba\n\n#### Default value\n\n```YAML\npostgresql_default_hba:\n  - type: local\n    database: all\n    user: postgres\n    method: peer\n  - type: local\n    database: all\n    user: all\n    method: peer\n  - type: host\n    database: all\n    user: all\n    address: 127.0.0.1/32\n    method: md5\n  - type: host\n    database: all\n    user: all\n    address: ::1/128\n    method: md5\n  - type: local\n    database: replication\n    user: all\n    method: peer\n  - type: host\n    database: replication\n    user: all\n    address: 127.0.0.1/32\n    method: md5\n  - type: host\n    database: replication\n    user: all\n    address: ::1/128\n    method: md5\n```\n\n#### Example usage\n\n```YAML\npostgresql_default_hba:\n  - type: local\n    database: example\n    user: postgresuser1\n    address: 127.0.0.1/32\n    method: md5\n```\n\n### postgresql_exporter_args\n\nOptional list of additional arguments for the postgresql exporter\n\n#### Default value\n\n```YAML\npostgresql_exporter_args: []\n```\n\n### postgresql_exporter_download\n\nURL to the apache exporter to install\n\n#### Default value\n\n```YAML\npostgresql_exporter_download: \n  https://github.com/prometheus-community/postgres_exporter/releases/download/v{{\n  postgresql_exporter_version }}/postgres_exporter-{{ \n  postgresql_exporter_version }}.linux-amd64.tar.gz\n```\n\n### postgresql_exporter_enabled\n\nEnable the installation of the apache exporter\n\n#### Default value\n\n```YAML\npostgresql_exporter_enabled: true\n```\n\n### postgresql_exporter_version\n\nVersion of the apache exporter to install\n\n#### Default value\n\n```YAML\npostgresql_exporter_version: 0.19.1\n```\n\n### postgresql_extra_databases\n\nList of additional databases to create\n\n#### Default value\n\n```YAML\npostgresql_extra_databases: []\n```\n\n#### Example usage\n\n```YAML\npostgresql_extra_databases:\n  - name: example\n    encoding: UTF-8\n    lc_collate: de_DE.UTF-8\n    lc_ctype: de_DE.UTF-8\n    ansible.builtin.template: template0\n    state: present\n  - name: foobar\n    state: absent\n```\n\n### postgresql_extra_environment\n\nDict of extra environment variables\n\n#### Default value\n\n```YAML\npostgresql_extra_environment: {}\n```\n\n#### Example usage\n\n```YAML\npostgresql_extra_environment:\n  FOO: bar\n  EXAMPLE: works\n```\n\n### postgresql_extra_hba\n\nList of extra hba\n\n#### Default value\n\n```YAML\npostgresql_extra_hba: []\n```\n\n#### Example usage\n\n```YAML\npostgresql_extra_hba:\n  - type: local\n    database: example\n    user: postgresuser1\n    address: 127.0.0.1/32\n    method: md5\n```\n\n### postgresql_extra_ident\n\nList of extra identities\n\n#### Default value\n\n```YAML\npostgresql_extra_ident: []\n```\n\n#### Example usage\n\n```YAML\npostgresql_extra_ident:\n  - map: example1\n    system: systemuser1\n    postgres: postgresuser1\n  - map: example2\n    system: systemuser2\n    postgres: postgresuser2\n```\n\n### postgresql_extra_users\n\nList of additional users to create\n\n#### Default value\n\n```YAML\npostgresql_extra_users: []\n```\n\n#### Example usage\n\n```YAML\npostgresql_extra_users:\n  - name: example\n    password: p433w0rd\n    db: test\n    groups:\n      - group1\n      - group2\n    priv: ALL/example:ALL\n    role_attr_flags: CREATEDB,CREATEROLE,SUPERUSER\n    state: present\n  - name: foobar\n    state: absent\n```\n\n### postgresql_global_databases\n\nList of databases to create\n\n#### Default value\n\n```YAML\npostgresql_global_databases: []\n```\n\n#### Example usage\n\n```YAML\npostgresql_global_databases:\n  - name: example\n    encoding: UTF-8\n    lc_collate: de_DE.UTF-8\n    lc_ctype: de_DE.UTF-8\n    ansible.builtin.template: template0\n    state: present\n  - name: foobar\n    state: absent\n```\n\n### postgresql_global_environment\n\nDict of global environment variables\n\n#### Default value\n\n```YAML\npostgresql_global_environment: {}\n```\n\n#### Example usage\n\n```YAML\npostgresql_global_environment:\n  FOO: bar\n  EXAMPLE: works\n```\n\n### postgresql_global_hba\n\nList of global hba\n\n#### Default value\n\n```YAML\npostgresql_global_hba: []\n```\n\n#### Example usage\n\n```YAML\npostgresql_global_hba:\n  - type: local\n    database: example\n    user: postgresuser1\n    address: 127.0.0.1/32\n    method: md5\n```\n\n### postgresql_global_ident\n\nList of global identities\n\n#### Default value\n\n```YAML\npostgresql_global_ident: []\n```\n\n#### Example usage\n\n```YAML\npostgresql_global_ident:\n  - map: example1\n    system: systemuser1\n    postgres: postgresuser1\n  - map: example2\n    system: systemuser2\n    postgres: postgresuser2\n```\n\n### postgresql_global_users\n\nList of users to create\n\n#### Default value\n\n```YAML\npostgresql_global_users: []\n```\n\n#### Example usage\n\n```YAML\npostgresql_global_users:\n  - name: example\n    password: p433w0rd\n    db: test\n    groups:\n      - group1\n      - group2\n    priv: ALL/example:ALL\n    role_attr_flags: CREATEDB,CREATEROLE,SUPERUSER\n    state: present\n  - name: foobar\n    state: absent\n```\n\n### postgresql_listen_address\n\nAddress to listen to\n\n#### Default value\n\n```YAML\npostgresql_listen_address: 0.0.0.0\n```\n\n### postgresql_max_connections\n\nMaximum of allowed connections\n\n#### Default value\n\n```YAML\npostgresql_max_connections: 1000\n```\n\n### postgresql_packages\n\nList of packages to install\n\n#### Default value\n\n```YAML\npostgresql_packages:\n  - postgresql-{{ postgresql_version }}\n  - postgresql-client-{{ postgresql_version }}\n  - python3-psycopg2\n```\n\n### postgresql_port\n\nPort to listen to\n\n#### Default value\n\n```YAML\npostgresql_port: 5432\n```\n\n### postgresql_recursive_perm_enforce\n\nEnforce recursively permissions on data folder\n\n#### Default value\n\n```YAML\npostgresql_recursive_perm_enforce: false\n```\n\n### postgresql_root_password\n\nPassword for the root user\n\n#### Default value\n\n```YAML\npostgresql_root_password:\n```\n\n### postgresql_root_username\n\nUsername for the root user\n\n#### Default value\n\n```YAML\npostgresql_root_username: postgres\n```\n\n### postgresql_ssl_ca_file\n\n#### Default value\n\n```YAML\npostgresql_ssl_ca_file:\n```\n\n### postgresql_ssl_cert_file\n\n#### Default value\n\n```YAML\npostgresql_ssl_cert_file: /etc/ssl/certs/ssl-cert-snakeoil.pem\n```\n\n### postgresql_ssl_crl_file\n\n#### Default value\n\n```YAML\npostgresql_ssl_crl_file:\n```\n\n### postgresql_ssl_dh_params_file\n\n#### Default value\n\n```YAML\npostgresql_ssl_dh_params_file:\n```\n\n### postgresql_ssl_enabled\n\nEnable SSL encryption\n\n#### Default value\n\n```YAML\npostgresql_ssl_enabled: true\n```\n\n### postgresql_ssl_key_file\n\n#### Default value\n\n```YAML\npostgresql_ssl_key_file: /etc/ssl/private/ssl-cert-snakeoil.key\n```\n\n### postgresql_superuser_reserved_connections\n\nReserved connections for superuser\n\n#### Default value\n\n```YAML\npostgresql_superuser_reserved_connections: 3\n```\n\n### postgresql_version\n\n#### Default value\n\n```YAML\npostgresql_version: \"{{ '14' if ansible_distribution_version is version('20.04', '\u003e')\n  else ('12' if ansible_distribution_version is version('18.04', '\u003e') else '10') }}\"\n```\n\n## Discovered Tags\n\n**_postgresql_**\n\n**_postgresql-exporter_**\n\n## Dependencies\n\n- [community.postgresql](https://github.com/ansible-collections/community.postgresql)\n\n## License\n\nApache-2.0\n\n## Author\n\n[Thomas Boerger](https://github.com/tboerger)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frolehippie%2Fpostgresql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frolehippie%2Fpostgresql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frolehippie%2Fpostgresql/lists"}