{"id":19646186,"url":"https://github.com/yoctol/ansible-docker-postgres","last_synced_at":"2025-02-27T00:16:17.960Z","repository":{"id":69890806,"uuid":"58031037","full_name":"Yoctol/ansible-docker-postgres","owner":"Yoctol","description":"Ansible role to run postgres container.","archived":false,"fork":false,"pushed_at":"2018-04-08T14:17:09.000Z","size":19,"stargazers_count":6,"open_issues_count":0,"forks_count":6,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-01-09T21:33:11.601Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/Yoctol.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-05-04T07:15:28.000Z","updated_at":"2023-09-04T02:27:50.000Z","dependencies_parsed_at":"2023-04-04T22:47:33.606Z","dependency_job_id":null,"html_url":"https://github.com/Yoctol/ansible-docker-postgres","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yoctol%2Fansible-docker-postgres","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yoctol%2Fansible-docker-postgres/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yoctol%2Fansible-docker-postgres/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yoctol%2Fansible-docker-postgres/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yoctol","download_url":"https://codeload.github.com/Yoctol/ansible-docker-postgres/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240953491,"owners_count":19884024,"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":[],"created_at":"2024-11-11T14:37:12.590Z","updated_at":"2025-02-27T00:16:17.935Z","avatar_url":"https://github.com/Yoctol.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"Role Name\n=========\n\nDocker container running postgresql.\n\nRequirements\n------------\n\n- python \u003e= 2.6\n- docker-py \u003e= 1.7.0\n- Docker API \u003e= 1.20\n- Ansible \u003e= 2.2\n\nRole Variables\n--------------\n\n```yaml\n---\n# Optional, whether to use a separate container to store postgresql data files.\n# Default true.\nuse_datastore_container: true\n\n# Optional, the container name to store data. Default 'postgres-datastore'.\ndatastore_container_name: postgres-datastore\n\n# Optional, the postgres docker image tag name to use. Default 'latest'.\npostgres_docker_tag: ''\n\n# Optional, the container name where postgresql running in. Default 'postgres'.\npostgres_container_name: postgres\n\n# Optional, a dict of env var to be passed into postgresql container.\n# Check [postgres docker page](https://hub.docker.com/_/postgres).\npostgres_docker_env: []\n\n# Optional, the port to expose postgresql to the host.\n# Default not expose postgresql to the host.\nexpose_host_port: 0\n```\n\nDependencies\n------------\n\n\nExample Playbook\n----------------\n\n```yaml\n- hosts: servers\n  roles:\n    - role: ansible-docker-postgres\n      use_datastore_container: true\n      datastore_container_name: dbstore\n      postgres_container_name: postgres\n      expose_host_port: 5432\n      postgres_docker_tag: 9.5\n      postgres_docker_env:\n        POSTGRES_PASSWORD: pg_admin_pw\n        POSTGRES_USER: pg_admin_user\n        PGDATA: /var/lib/postgresql/data/pgdata\n        POSTGRES_DB: pg_default_db\n        POSTGRES_INITDB_ARGS: \"--data-checksums\"\n\n# The address of container is set to the fact `postgres_container_address`.\n# You can use it to connect postgres server.\n- postgres_user:\n    name: foo\n    login_user: postgres\n    login_host: \"{{ postgres_container_address }}\"\n```\n\nLicense\n-------\n\nMIT\n\nAuthor Information\n------------------\n\nYoctolInfo Inc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoctol%2Fansible-docker-postgres","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyoctol%2Fansible-docker-postgres","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoctol%2Fansible-docker-postgres/lists"}