{"id":26709520,"url":"https://github.com/holms/ansible-balancer","last_synced_at":"2026-01-06T16:49:56.902Z","repository":{"id":21462271,"uuid":"24780735","full_name":"holms/ansible-balancer","owner":"holms","description":"Ansible role of nginx load balancer","archived":false,"fork":false,"pushed_at":"2016-06-20T07:42:24.000Z","size":7,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-14T20:16:37.983Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/holms.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":"2014-10-04T03:21:52.000Z","updated_at":"2016-03-22T13:56:27.000Z","dependencies_parsed_at":"2022-07-23T09:30:34.864Z","dependency_job_id":null,"html_url":"https://github.com/holms/ansible-balancer","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holms%2Fansible-balancer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holms%2Fansible-balancer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holms%2Fansible-balancer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holms%2Fansible-balancer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/holms","download_url":"https://codeload.github.com/holms/ansible-balancer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245806443,"owners_count":20675298,"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":"2025-03-27T08:17:16.547Z","updated_at":"2026-01-06T16:49:56.864Z","avatar_url":"https://github.com/holms.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# balancer [![Build Status](https://travis-ci.org/holms/ansible-balancer.svg?branch=master)](https://travis-ci.org/holms/ansible-balancer)\n\nLoad Balancer with nginx role.\n\nThis role is only for SSL termination setup. Everything from HTTP will be redirected to HTTPS. You can fork and change that or you can contribute to make this optional.\n\n## Requirements\n\nLatest Ansible from pip\n\n## Platforms\n\n- Ubuntu\n- Debian\n\n## Role Variables\n\nName                     | Default                                                                                                                                              | Value\n:----------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------- | :-----------------------------------------------\nbalancer_vhosts          | - { name: \"example1\",  upstreams: ['myserver1.com', 'myserver2.com' ] } \u003cbr\u003e - { name: \"example2\",  upstreams: ['myserver1.com', 'myserver2.com' ] } | a list of vhosts\nbalancer_ssl_key         | *None*                                                                                                                                               | Path to SSL key\nbalancer_ssl_pem         | *None*                                                                                                                                               | Path to PEM file\nbalancer_ssl_crt         | *None*                                                                                                                                               | Path to CRT file\nbalancer_ssl_trusted_crt | *None*                                                                                                                                               | Path to CRT file of your trusted ssl certificate\nbalancer_ssl_trusted_key | *None*                                                                                                                                               | Path to KEY file of your trusted ssl certificate\n\nYou need to use either trusted certificates or self signed, using will fail your nginx config\n\n## Example\n\n```\n- hosts: localhost\n  remote_user: root\n\n  vars:\n      - balancer_ssl_key: \"/etc/ssl/certs/server.key\"\n      - balancer_ssl_crt: \"/etc/ssl/certs/server.crt\"\n      - balancer_ssl_pem: \"/etc/ssl/certs/server.pem\"\n      - balancer_vhosts:\n        - { name: \"my.project.com\",  \n            upstreams: [\n               'node01.myproject.com',\n               'node02.myproject.com'\n            ]}\n\n  roles:\n      - { role: balancer }\n```\n\nOr generate `upstreams` list from inventory vars group.\n\nInventory file:\n\n```\n[myproject]\nnode[01:02].myproject.com\n```\n\nPlaybook:\n\n```\n- hosts: localhost\n  remote_user: root\n    vars:\n        - balancer_ssl_key: \"/etc/ssl/certs/server.key\"\n        - balancer_ssl_crt: \"/etc/ssl/certs/server.crt\"\n        - balancer_ssl_pem: \"/etc/ssl/certs/server.pem\"\n        - balancer_vhosts:\n            - { name: \"my.project.com\",  upstreams: \"{{ groups.myproject }}\" }\n    roles:\n      - { role: balancer }\n```\n\n## License\n\nMIT\n\n## Author Information\n\nRoman Gorodeckij ([holms@holms.lt](mailto:holms@holms.lt))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fholms%2Fansible-balancer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fholms%2Fansible-balancer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fholms%2Fansible-balancer/lists"}