{"id":18483663,"url":"https://github.com/lobsters/lobsters-ansible","last_synced_at":"2025-04-05T20:09:28.955Z","repository":{"id":26322713,"uuid":"106195371","full_name":"lobsters/lobsters-ansible","owner":"lobsters","description":"Ansible playbook for lobste.rs","archived":false,"fork":false,"pushed_at":"2025-03-24T19:35:47.000Z","size":300,"stargazers_count":85,"open_issues_count":7,"forks_count":25,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-29T19:07:58.154Z","etag":null,"topics":["ansible","nginx","rails"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lobsters.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":"2017-10-08T17:24:37.000Z","updated_at":"2025-03-24T19:35:51.000Z","dependencies_parsed_at":"2024-06-06T03:24:22.947Z","dependency_job_id":"f0bac44c-18e6-4aa5-8295-e7b009832a57","html_url":"https://github.com/lobsters/lobsters-ansible","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/lobsters%2Flobsters-ansible","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lobsters%2Flobsters-ansible/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lobsters%2Flobsters-ansible/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lobsters%2Flobsters-ansible/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lobsters","download_url":"https://codeload.github.com/lobsters/lobsters-ansible/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247393572,"owners_count":20931813,"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","nginx","rails"],"created_at":"2024-11-06T12:36:49.218Z","updated_at":"2025-04-05T20:09:28.923Z","avatar_url":"https://github.com/lobsters.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lobste.rs Ansible Playbook\n\nAnsible playbook for lobste.rs.\nLobsters is a technology-focused link aggregation site.\n\nSee the notes below if you're using this to set up your own site.\n\nTo run:\n\n    $ ansible-playbook -K prod.yml\n\nWhen working on staging:\n\n    $ ansible-playbook --inventory=inventories/staging.ini -K staging.yml\n\n\n## Inventory\n\nThe following host groups are available:\n\n    db              - SQL server\n    dns             - authoritative DNS\n    mx*             - incoming email\n    smtp*           - outgoing email\n    www*            - http over SSL\n\n  groups marked with an asterisk (*) use public SSL certificates.\n\nThe following variables are available:\n\n    db_server       - SQL server\n    dns_server      - authoritative DNS server\n    mx_server       - incoming mail server\n    smtp_server     - outgoing mail server\n    www_server      - http/s\n\nWhen a host group has more than one hostname, the _server variable contains the authoritative name for the hosted sevice.\nThis playbook tries not to distinguish between host variables and group variables.\n\nhttps://docs.ansible.com/ansible/latest/intro_inventory.html\n\n\n## Roles\n\n    mariadb         - SQL database.\n    lobsters        - web application.\n    nginx           - http proxy and SSL termination.\n    sysadm          - accounts and ssh shell acess for system administrators.\n    postfix         - MX and smtp server.\n    lobsters-puma   - App server\n\nhttps://docs.ansible.com/ansible/latest/playbooks.html\nhttps://docs.ansible.com/ansible/latest/playbooks_reuse_roles.html\n\n\n## SSH Keys\n\nTo use this playbook, you'll need an account in the sysadm role along with an SSH key pair.\n\n\n## Setup Notes\n\nThis is a rough checklist for turning a new Ubuntu LTS VPS into a running instance of Lobsters.\nIf you're familiar with Linux sysadmin and Rails it should be pretty self-explanatory.\nYou can drop by `#lobsters` on irc.libera.chat if you have questions.\n\n\n```\n  ssh root@now box\n   apt update\n   apt full-upgrade\n   reboot # will almost certainly be a new kernel\n   apt-get install certbot\n\n time ansible-playbook -K prod.yml # should get an error about connecting to database\n\n mysql -u root\n   create database lobsters;\n   select sha1(concat('mash keyboard', rand()));\n   create user lobsters@'localhost' identified by \"[hash]\"; # may need to be @'%' for any host, an ip, etc\n   grant all privileges on lobsters.* to 'lobsters'@'localhost'; # match host from prev\n\n create /srv/lobste.rs/http/config/initializers/production.rb\n create /srv/lobste.rs/http/config/database.yml\n create /srv/lobste.rs/http/config/secrets.yml\n\n bundle exec rails credentials:edit to create secret key base\n echo \"your@email.com\" \u003e /root/.forward\n run ansible again to deploy code + build assets\n reboot again # to see everything comes up properly automatically\n\n # probably need to 'systemctl reset-failed lobsters-puma' regularly during setup\n # when puma exits on start due to misconfig\n\n # test puma worker serves pages:\n curl --no-buffer --unix-socket /srv/lobste.rs/run/puma.sock http://localhost/about\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flobsters%2Flobsters-ansible","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flobsters%2Flobsters-ansible","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flobsters%2Flobsters-ansible/lists"}