{"id":13789502,"url":"https://github.com/punkrockdev/server","last_synced_at":"2025-05-12T06:31:38.236Z","repository":{"id":217269060,"uuid":"77856800","full_name":"punkrockdev/server","owner":"punkrockdev","description":"Ansible playbook making your server practically maintain itself 🛠","archived":false,"fork":false,"pushed_at":"2022-02-16T21:14:52.000Z","size":54,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-18T04:33:10.443Z","etag":null,"topics":["ansible","devops","jupyter","linux","swap","sysadmin","ubuntu","unattended-upgrades"],"latest_commit_sha":null,"homepage":"","language":"Python","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/punkrockdev.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-02T19:29:35.000Z","updated_at":"2022-04-12T22:19:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"637051a8-6f46-469f-8252-caf915145d8e","html_url":"https://github.com/punkrockdev/server","commit_stats":null,"previous_names":["punkrockdev/server"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/punkrockdev%2Fserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/punkrockdev%2Fserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/punkrockdev%2Fserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/punkrockdev%2Fserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/punkrockdev","download_url":"https://codeload.github.com/punkrockdev/server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253687552,"owners_count":21947694,"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","devops","jupyter","linux","swap","sysadmin","ubuntu","unattended-upgrades"],"created_at":"2024-08-03T22:00:25.349Z","updated_at":"2025-05-12T06:31:38.221Z","avatar_url":"https://github.com/punkrockdev.png","language":"Python","readme":"# Server\n\n*Ansible playbook for making your Ubuntu server practically maintain itself 🛠*\n\n## Features\n\nUse *server* to get these lovely features:\n\n- ⛱ [unattended package upgrades][unattended-upgrades] – relax, we got\n  your security patches\n- 🏗 one-command OS distribution upgrades - 16.04 → 18.04 → …\n- 📈 [Jupyter notebook][jupyter] (optional) – analyse all the things\n- 👍 enable swap (optional) – for when something obvious just isn't there\n\n## Usage\n\nThe playbook should generally work on Debian / Ubuntu servers, but it is mainly\nused with the latest Ubuntu LTS server release.\n\nTo run the playbook, install [Ansible](http://docs.ansible.com/) locally.\nAn easy way to install it if you have Python locally is to run:\n\n    pip3 install ansible\n\nPrepare your *hosts* file by adding your servers\nand prepare the *config.yml* file where you can optionally\nchange the global defaults:\n\n    cp hosts.example hosts\n    cp config.yml.example config.yml\n\nMake sure:\n\n - you can ssh into the added servers using only your ssh\n   public key (no password) first. You can push your public key to the server using:\n\n        ssh-copy-id user@host\n\n - the user you ssh as into the servers is on the sudoers list\n\nThere are additional settings in *group_vars/servers* which can be overriden\nfor all the servers. Also, you can override settings for individual servers\nif you create a file in the *host_vars* folder\n(filename must match the server alias from the *hosts* file).\n\nTest that you can access the servers:\n\n    ansible -m ping all\n\n**Finally to run the playbooks execute:**\n\n    ansible-playbook server.yml\n\nOr if you can't remember the command, run:\n\n    ./server.sh\n\n\n## Components\n\nThere are a number of playbook components that are not deployed or run\nby default.\n\n### Distribution upgrades\n\nSince upgrading your OS distribution task can take quite some time, it is\navailable as a separate playbook that you run as:\n\n    ansible-playbook upgrade.yml\n\nNote that depending on what packages you have installed, you might have to\nssh to the server once the process completes to finish some manual steps\n(mostly choosing what to do with config files that were edited).\n\n### Jupyter notebook\n\nTo install the optional [Jupyter notebook][jupyter] either enable it in\n*group_vars/servers* or create an individual server's config file in\n*host_vars/server-alias* ( matching a server alias from your hosts file).\nExample config:\n\n    ---\n    install_notebook: True\n\n    notebook_password: 'sha1:d88452b18fd9:735e6a786d17709a131198f0c0edf217eadc55bf'\n\nIf you don't set the password (you should!) the default is *donthackme*.\nOnce you run the *server.yml* playbook,\nJupyter notebook should be running on port 8888.\n\nYou can use the default password to connect to the notebook and generate\na new password hash from within a notebook if you haven't already:\n\n    In [1]: from notebook.auth import passwd\n\n    In [2]: passwd()\n    Enter password:\n    Verify password:\n    Out[2]: 'sha1:d88452b18fd9:735e6a786d17709a131198f0c0edf217eadc55bf'\n\nYou then set this hash in your host file and rerun the playbook.\nMore info on generating the password and optionally setting up a TLS certificate\n[in the documentation][jupyter-security].\n\n### Enable swap\n\nSimilar to the notebook, override the `enable_swap` setting in the server's\nconfig file.\n\n[unattended-upgrades]: https://github.com/debops/ansible-unattended_upgrades\n[jupyter]: http://jupyter.org/\n[jupyter-security]: http://jupyter-notebook.readthedocs.io/en/latest/public_server.html#securing-a-notebook-server\n","funding_links":[],"categories":["Internet"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpunkrockdev%2Fserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpunkrockdev%2Fserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpunkrockdev%2Fserver/lists"}