{"id":25127646,"url":"https://github.com/brikis98/devops-book-nginx-role","last_synced_at":"2026-05-02T04:41:11.457Z","repository":{"id":275802821,"uuid":"927232175","full_name":"brikis98/devops-book-nginx-role","owner":"brikis98","description":"An Ansible role that deploys nginx. This is a code sample for the book and blog post series \"Fundamentals of DevOps and Software Delivery\" by Yevgeniy Brikman.","archived":false,"fork":false,"pushed_at":"2025-02-27T14:44:03.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-27T20:48:35.169Z","etag":null,"topics":["ansible","ansible-role","devops","infrastructure-as-code","orchestration"],"latest_commit_sha":null,"homepage":"https://www.fundamentals-of-devops.com/","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/brikis98.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2025-02-04T16:14:15.000Z","updated_at":"2025-02-27T14:43:13.000Z","dependencies_parsed_at":"2025-02-04T17:34:49.391Z","dependency_job_id":"68951486-34fd-4c40-bb67-02de5f400c1d","html_url":"https://github.com/brikis98/devops-book-nginx-role","commit_stats":null,"previous_names":["brikis98/devops-book-nginx-role"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brikis98%2Fdevops-book-nginx-role","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brikis98%2Fdevops-book-nginx-role/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brikis98%2Fdevops-book-nginx-role/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brikis98%2Fdevops-book-nginx-role/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brikis98","download_url":"https://codeload.github.com/brikis98/devops-book-nginx-role/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246892778,"owners_count":20850845,"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","devops","infrastructure-as-code","orchestration"],"created_at":"2025-02-08T11:17:39.201Z","updated_at":"2026-05-02T04:41:11.418Z","avatar_url":"https://github.com/brikis98.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ansible Nginx Role\n\nThis repo contains a simple Ansible role designed to deploy Nginx as a load balancer. This role does the following:\n\n* Install Nginx. This step only works on Linux servers that support `yum` (e.g., Amazon Linux).\n* Configure Nginx to listen on port 80.\n* Configure Nginx to proxy requests to the `/` URL to the servers you pass in via the `servers` variable. \n \nThis is sample code from the book and blog post series [_Fundamentals of DevOps and Software \nDelivery_](https://www.fundamentals-of-devops.com) by Yevgeniy Brikman. Note that the vast majority of the sample\ncode lives in another repo, https://github.com/brikis98/devops-book, and this repo only contains an Ansible role that\nwill work with `ansible-galaxy`. \n\n\u003e [!IMPORTANT]  \n\u003e This repo contains example code for learning and experimenting only, in conjunction with the book and blog post \n\u003e series. This code is _not_ designed for direct production usage. If you're looking for code you can use directly in\n\u003e production, check out the [Gruntwork Library](https://www.gruntwork.io/products/library).\n\n## Quick start\n\nCreate a `requirements.txt` file with the following contents, replacing `\u003cVERSION\u003e` with the latest version from the\n[releases page](https://github.com/brikis98/devops-book-nginx-role/releases):\n\n```yml\n- name: nginx\n  src: https://github.com/brikis98/devops-book-nginx-role\n  version: \u003cVERSION\u003e\n```\n\nRun the following command to install the role:\n\n```console\n$ ansible-galaxy role install -r requirements.yml\n```\n\nNow you can use the role in your playbooks, replacing `\u003cSERVERS\u003e` with the list of servers (list of IPs and ports) to\nproxy:\n\n```yml\n- name: Configure servers to run nginx\n  hosts: nginx_instances\n  gather_facts: true\n  become: true\n  roles:\n    - role: nginx       \n      vars:\n        servers: \u003cSERVERS\u003e \n```\n\nFor example, to proxy several known IPs, such as `1.2.3.4` and `5.6.7.8`, at port 80:\n\n```yml\n- name: Configure servers to run nginx\n  hosts: nginx_instances\n  gather_facts: true\n  become: true\n  roles:\n    - role: nginx       \n      vars:\n        servers:\n          - 1.2.3.4:80\n          - 5.6.7.8:80\n```\n\n## License\n\nThis code is released under the MIT License. See [LICENSE.txt](./LICENSE.txt).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrikis98%2Fdevops-book-nginx-role","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrikis98%2Fdevops-book-nginx-role","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrikis98%2Fdevops-book-nginx-role/lists"}