{"id":17681708,"url":"https://github.com/phawk/ansible-server-setup","last_synced_at":"2026-01-07T18:39:39.751Z","repository":{"id":20301873,"uuid":"23575624","full_name":"phawk/ansible-server-setup","owner":"phawk","description":null,"archived":false,"fork":false,"pushed_at":"2014-09-02T11:10:54.000Z","size":143,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-05T21:55:37.236Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"VCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phawk.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-02T11:10:44.000Z","updated_at":"2014-10-19T04:57:01.000Z","dependencies_parsed_at":"2022-09-07T02:21:37.797Z","dependency_job_id":null,"html_url":"https://github.com/phawk/ansible-server-setup","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phawk%2Fansible-server-setup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phawk%2Fansible-server-setup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phawk%2Fansible-server-setup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phawk%2Fansible-server-setup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phawk","download_url":"https://codeload.github.com/phawk/ansible-server-setup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246366224,"owners_count":20765652,"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-10-24T09:11:56.901Z","updated_at":"2026-01-07T18:39:39.693Z","avatar_url":"https://github.com/phawk.png","language":"VCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ansible cluster provisioning\n\nThis is a basic ansible-playbook to provision your cluster of servers, it provides a good scailable starting point for hosting your Ruby applications.\n\n1. Load balancer setup\n2. Application server setup\n3. Database server setup\n\n## Example usage\n\nFirst up run through the individual steps in `initial-setup.sh` to lock down your servers to a single user with rsa key access\n\nEdit all of the files in `./vars` to your requirements.\n\nCopy `./hosts.example` to `./hosts` and enter the details of your hosts.\n\n```sh\n# Ping the hosts to see if they respond\n$ ansible -m ping -i hosts all\n\n# List hosts that roles will run against\n$ ansible-playbook -i hosts cluster.yml --list-hosts\n\n# Run the full playbook\n$ ansible-playbook -i hosts cluster.yml\n\n# Running ad hoc commands - http://docs.ansible.com/intro_adhoc.html\n```\n\n* * *\n\n## Roles\n\n### (All hosts) Common\n\n- Sets locale to en_GB.UTF8\n\n### (load balancers) Varnish\n\n- Installs varnish\n- Provides a decent starting point configuration\n\n### (app servers) Ruby\n\n- Installs Ruby 2.1 package\n\n### (app servers) nginx-passenger\n\n- Installs nginx\n- Removes default site\n- Adds some global configs that can be included in your site configs\n- Installs phusion passenger for use with nginx\n\n### (db servers) postgres\n\n- Installs postgres 9.3\n- Locks down pg_hba.conf\n\n\u003e N.B update your private IP into `templates/postgresql.conf.j2` and update any private IPs you want to have access to the postgreSQL instance in `templates/pg_hba.conf.j2`\n\n### nginx\n\n- Installs standalone nginx\n\n### haproxy\n\n- Installs haproxy\n\n\n## TODO\n\n- Add ipconfigs for all servers\n- add fail2ban with basic config\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphawk%2Fansible-server-setup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphawk%2Fansible-server-setup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphawk%2Fansible-server-setup/lists"}