{"id":21733918,"url":"https://github.com/wichmann/basic-server-setup-ansible","last_synced_at":"2026-05-06T01:33:37.051Z","repository":{"id":262480413,"uuid":"884958515","full_name":"wichmann/basic-server-setup-ansible","owner":"wichmann","description":"Ansible playbooks for setting up and configuring a server and services.","archived":false,"fork":false,"pushed_at":"2024-11-12T17:12:34.000Z","size":31,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-21T00:16:40.003Z","etag":null,"topics":["ansible","ansible-playbook","docker","docker-compose","traefik"],"latest_commit_sha":null,"homepage":"","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/wichmann.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":"2024-11-07T17:35:01.000Z","updated_at":"2025-02-09T01:10:00.000Z","dependencies_parsed_at":"2024-11-16T18:02:41.961Z","dependency_job_id":null,"html_url":"https://github.com/wichmann/basic-server-setup-ansible","commit_stats":null,"previous_names":["wichmann/basic-server-setup-ansible"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wichmann/basic-server-setup-ansible","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wichmann%2Fbasic-server-setup-ansible","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wichmann%2Fbasic-server-setup-ansible/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wichmann%2Fbasic-server-setup-ansible/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wichmann%2Fbasic-server-setup-ansible/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wichmann","download_url":"https://codeload.github.com/wichmann/basic-server-setup-ansible/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wichmann%2Fbasic-server-setup-ansible/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275226301,"owners_count":25427106,"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","status":"online","status_checked_at":"2025-09-15T02:00:09.272Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-playbook","docker","docker-compose","traefik"],"created_at":"2024-11-26T05:07:00.617Z","updated_at":"2026-05-06T01:33:32.030Z","avatar_url":"https://github.com/wichmann.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Setting up a server - Ansible playbooks\nAnsible playbooks for setting up and configuring a server and services.\n\n## Requirements\nInstall ansible first by following the [official handbook](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html):\n\nAfter that you can install all ansible roles from Ansible Galaxy:\n\n    ansible-galaxy install -r requirements.yml\n\nThese scripts require a virtual machine or a bare metal server running Ubuntu\nLinux (or a similar distribution) and SSH access with authentication by\npassword!\n\n## Usage\nFirst, you have to provide all necessary parameters and settings by editing the\nfiles in the directories \"group_vars\" and \"host_vars\". Then you have to set the\nhostname or IP address of your server in the directory 'inventory/production'.\n\nFor accessing the server, you need to create a SSH key on your host machine:\n\n    ssh-keygen -t ed25519\n\nYou can check the SSH connection with the following command:\n\n    ansible servers -m ping --user xxxxxx --ask-pass\n\nAfter that you can just run the first playbook to configure a admin user and\nupload your SSH key:\n\n    ansible-playbook initial-setup.yml --user xxxxxx --ask-pass --ask-become-pass\n\nAll following playbook run as the admin user, that was created in the first\nplaybook and use the uploaded SSH key.\n\n    ansible-playbook infrastructure.yml\n    ansible-playbook services.yml\n\nBefore you can access the services, the necessary name records have to be\ninserted into the file '/etc/hosts':\n\n    192.168.24.xxx  server.internal\n    192.168.24.xxx  dashboard.server.internal\n    192.168.24.xxx  portainer.server.internal\n    192.168.24.xxx  status.server.internal\n    192.168.24.xxx  pad.server.internal\n    192.168.24.xxx  www.server.internal\n\n## Useful commands\nShow full inventory with all variables:\n\n    ansible-inventory --list\n\nTry to log in to all hosts defined in the group 'servers':\n\n    ansible servers -m ping\n\nSimple tasks can be executed manually as [ad hoc commands](https://docs.ansible.com/ansible/latest/command_guide/intro_adhoc.html):\n\n    ansible server-01 -a \"/sbin/reboot\" -u wichmann\n    ansible server-01 -m ansible.builtin.copy -a \"src=/etc/hosts dest=/tmp/hosts\" -u wichmann\n    ansible servers -m ansible.builtin.apt -a \"force_apt_get: true upgrade: dist\" -u wichmann\n    ansible servers -a \"sudo systemctl reload alloy\" -u wichmann\n    ansible servers -m ansible.builtin.service -a \"name=alloy state=reloaded\" -u wichmann\n    ansible all -m ansible.builtin.setup -u wichmann\n\n## Links\n\n* Best practices for directory layout: https://docs.ansible.com/ansible/2.8/user_guide/playbooks_best_practices.html#content-organization\n* Real world example for complex Ansible setup: https://github.com/ct-Open-Source/telerec-t-base\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwichmann%2Fbasic-server-setup-ansible","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwichmann%2Fbasic-server-setup-ansible","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwichmann%2Fbasic-server-setup-ansible/lists"}