{"id":18783626,"url":"https://github.com/cimon-io/ansible-role-postgresql","last_synced_at":"2026-05-09T10:05:28.384Z","repository":{"id":56027522,"uuid":"112320479","full_name":"cimon-io/ansible-role-postgresql","owner":"cimon-io","description":null,"archived":false,"fork":false,"pushed_at":"2022-05-10T20:49:11.000Z","size":350,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-12-29T11:45:04.260Z","etag":null,"topics":["ansible","ansible-role","postgresql"],"latest_commit_sha":null,"homepage":null,"language":"Jinja","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/cimon-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-28T10:22:18.000Z","updated_at":"2022-05-08T14:15:50.000Z","dependencies_parsed_at":"2022-08-15T11:40:48.814Z","dependency_job_id":null,"html_url":"https://github.com/cimon-io/ansible-role-postgresql","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cimon-io%2Fansible-role-postgresql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cimon-io%2Fansible-role-postgresql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cimon-io%2Fansible-role-postgresql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cimon-io%2Fansible-role-postgresql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cimon-io","download_url":"https://codeload.github.com/cimon-io/ansible-role-postgresql/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239699579,"owners_count":19682574,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","postgresql"],"created_at":"2024-11-07T20:39:56.415Z","updated_at":"2025-12-20T17:30:21.765Z","avatar_url":"https://github.com/cimon-io.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ansible PostgreSQL role [![Build Status](https://travis-ci.org/cimon-io/ansible-role-postgresql.svg?branch=master)](https://travis-ci.org/cimon-io/ansible-role-postgresql)\n\nThis is a fork of [ANXS/PostgreSQL](https://github.com/ANXS/postgresql).\n\nAn Ansible role that installs and configures PostgreSQL, extensions, databases and users.\n\n## Installation\n\nThe role has been tested on Ansible 2.8 and higher.\n\nTo install, run the ansible-galaxy command:\n\n```\nansible-galaxy install cimon-io.postgresql\n```\n\n## Dependencies\n\n- role: ANXS.monit ([Galaxy](https://galaxy.ansible.com/ANXS/monit/)/[GH](https://github.com/ANXS/monit)) - an Ansible role which installs monit monitoring and management tool (if you want monit protection, you should set `monit_protection: true`).\n\n## Variables\n\nAvailable variables are listed below, along with default values (for more options, see `defaults/main.yml`):\n\n```yaml\n# Basic settings\npostgresql_version: 12\npostgresql_encoding: 'UTF-8'\npostgresql_locale: 'en_US.UTF-8'\npostgresql_ctype: 'en_US.UTF-8'\n\npostgresql_admin_user: \"postgres\"\npostgresql_default_auth_method: \"trust\"\n\npostgresql_service_enabled: false # should the service be enabled, default is true\n\npostgresql_cluster_name: \"main\"\npostgresql_cluster_reset: false\n\n# List of databases to be created (optional)\n# Note: for more flexibility with extensions use the postgresql_database_extensions setting.\npostgresql_databases:\n  - name: foobar\n    owner: baz          # optional; specify the owner of the database\n    hstore: yes         # flag to install the hstore extension on this database (yes/no)\n    uuid_ossp: yes      # flag to install the uuid-ossp extension on this database (yes/no)\n    citext: yes         # flag to install the citext extension on this database (yes/no)\n    encoding: 'UTF-8'   # override global {{ postgresql_encoding }} variable per database\n    lc_collate: 'en_GB.UTF-8'   # override global {{ postgresql_locale }} variable per database\n    lc_ctype: 'en_GB.UTF-8'     # override global {{ postgresql_ctype }} variable per database\n\n# List of database extensions to be created (optional)\npostgresql_database_extensions:\n  - db: foobar\n    extensions:\n      - hstore\n      - citext\n\n# List of users to be created (optional)\npostgresql_users:\n  - name: baz\n    pass: pass\n    encrypted: no       # denotes if the password is already encrypted.\n\n# List of user privileges to be applied (optional)\npostgresql_user_privileges:\n  - name: baz                   # user name\n    db: foobar                  # database\n    priv: \"ALL\"                 # privilege string format: example: INSERT,UPDATE/table:SELECT/anothertable:ALL\n    role_attr_flags: \"CREATEDB\" # role attribute flags\n```\n\n## Testing\n\nThis project comes with a `Vagrantfile`, this is a fast and easy way to test changes to the role, fire it up with `vagrant up`. See [vagrant docs](https://docs.vagrantup.com/v2/) for getting setup with vagrant.\n\nOnce your VM is up, you can reprovision it using either `vagrant provision`, or `ansible-playbook tests/playbook.yml -i vagrant-inventory`.\n\nIf you want to toy with the test play, see [tests/playbook.yml](./tests/playbook.yml), and change the variables in [tests/vars.yml](./tests/vars.yml).\n\nIf you are contributing, please, first test your changes within the vagrant environment (using the targeted distribution), and if possible, ensure your change is covered with the tests found in [.travis.yml](./.travis.yml).\n\n## License\n\nLicensed under the MIT License. See the [LICENSE](./LICENSE) file for details.\n\n## Feedback\n\nFeedback, bug-reports and requests are [welcome](https://github.com/cimon-io/ansible-role-postgresql/issues)!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcimon-io%2Fansible-role-postgresql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcimon-io%2Fansible-role-postgresql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcimon-io%2Fansible-role-postgresql/lists"}