{"id":26709729,"url":"https://github.com/debovema/ansible_setup","last_synced_at":"2026-04-16T18:33:44.851Z","repository":{"id":94922909,"uuid":"550236968","full_name":"debovema/ansible_setup","owner":"debovema","description":"Quickly configure workstation or server with Ansible","archived":false,"fork":false,"pushed_at":"2025-07-25T14:37:44.000Z","size":43,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-31T02:15:42.511Z","etag":null,"topics":["ansible","config-management","configuration","server","workstation"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/debovema.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,"zenodo":null}},"created_at":"2022-10-12T12:26:00.000Z","updated_at":"2025-07-21T22:08:49.000Z","dependencies_parsed_at":"2024-02-20T00:31:11.838Z","dependency_job_id":"6b4c29e2-cb81-4c04-b192-7f8c58db4b3a","html_url":"https://github.com/debovema/ansible_setup","commit_stats":null,"previous_names":["debovema/ansible_setup"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/debovema/ansible_setup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debovema%2Fansible_setup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debovema%2Fansible_setup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debovema%2Fansible_setup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debovema%2Fansible_setup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/debovema","download_url":"https://codeload.github.com/debovema/ansible_setup/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debovema%2Fansible_setup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31899394,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"ssl_error","status_checked_at":"2026-04-16T18:21:47.142Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","config-management","configuration","server","workstation"],"created_at":"2025-03-27T08:18:44.851Z","updated_at":"2026-04-16T18:33:44.842Z","avatar_url":"https://github.com/debovema.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ansible setup\n\nAnsible setup playbooks for workstation or server.\n\n## Usage\n\nThe playbooks are designed to be used with an Ansible inventory to target one or several *hosts*\nbelonging to one or several *groups*.\n\n### Requirements\n\n* Python 3\n* A Python *virtual environment* configured with Ansible and its requirements\n\n#### Create a Python virtual environment with Ansible\n\nTo create a Python *virtual environment* and install Ansible inside, run:\n\n```shell\npython3 -m venv .venv\nsource .venv/bin/activate\npip install --upgrade pip\npip install ansible\n```\n\n#### Python requirements\n\nTo install the required Python packages, run:\n\n```shell\npip install -r requirements.txt\n```\n\n#### Roles and Collections\n\nBefore running the actual playboook, it is needed to install required roles\nand collections. This can be done with a simple command:\n\n```shell\nansible-galaxy install -r requirements.yml\n```\n\n### Run a Playbook\n\n#### Workstation\n\nFirst create your inventory, for instance:\n\n```shell\ncat \u003e ./inventory.yml \u003c\u003cEOF\nall:\n  vars:\n    timezone: \"Europe/Paris\"                    # the timezone for the workstation\n\n    # Features\n    feature_docker: true                        # add Docker packages (users with docker flag will be able to use it)\n    feature_gnome_applications: true            # install Gnome applications (extensions)\n    feature_gnome_shell: true                   # customize Gnome shell\n    feature_ohmyzsh: true                       # install Oh My Zsh\n    oh_my_zsh_theme: ys                         # the theme for Oh My Zsh\n    users:                                      # users to create (or update) and their configuration\n      - username: root\n      - username: mathieu\n        docker: true\nEOF\n```\n\n```shell\n# Check run and show diffs\nansible-playbook -i inventory.yml --check --diff -K playbooks/workstation/configure.yml -e \"hosts_group=localhost\"\n\nansible-playbook -i inventory.yml -K playbooks/workstation/configure.yml -e \"hosts_group=localhost\"\n```\n\n#### Server\n\nFirst create your inventory, for instance:\n\n```shell\ncat \u003e ./inventory.yml \u003c\u003cEOF\nall:\n  vars:\n    ansible_private_key_file: ~/.ssh/id_ed25519 # the key used to connect to the hosts, not the one to authorize for users\n    ansible_user: root                          # the user to connect to the hosts to configure them, not the one used to connect to them\n    hostname: \"{{ inventory_hostname }}\"        # will use the \"\u003chostname\u003e\" defined at the \"all/children/\u003cgroup\u003e/hosts/\u003chostname\u003e\" inventory path\n    timezone: \"Europe/Paris\"                    # the timezone for the server\n\n    # Features\n    feature_docker: true                        # add Docker packages (users with docker flag will be able to use it)\n    feature_ohmyzsh: true                       # install Oh My Zsh\n    oh_my_zsh_theme: ys                         # the theme for Oh My Zsh\n    users:                                      # users to create (or update) and their configuration\n      - username: root\n      - username: mathieu\n        ssh_authorized_keys: https://github.com/debovema.keys\n        sudoernopassword: true\n        docker: true\n  children:\n    scaleway: # a group to categorize your hosts (e.g. the Cloud provider is 'scaleway')\n      hosts:\n        devno1-3:\n          ansible_host: 163.123.45.67\n    hetzner: # a group to categorize your hosts (e.g. the Cloud provider is 'hetzner')\n      hosts:\n        devno1-4:\n          ansible_host: 2a01:4ff:123:456::2\n          # Hetzner rescue mode installation (optional)\n          hetzner_install_disk_by_id_pattern: \"*SAMSUNG*\"\n          hetzner_install_image: Debian-1202-bookworm-amd64-base.tar.gz\n          # Features\n          feature_wireguard_4in6_tunnel: true # copy wgclient.conf file in ansible/roles/wireguard_4in6_tunnel/files directory\nEOF\n```\n\n```shell\n# Check run and show diffs\nansible-playbook -i inventory.yml --check --diff ansible/playbooks/server/configure.yml\n\n# Execute the playbook\nansible-playbook -i inventory.yml ansible/playbooks/server/configure.yml\n```\n\n#### Hetzner server\n\nIf using Hetzner hosts with rescue mode enabled, install and configure the hosts automatically:\n\n```shell\nansible-playbook -i inventory.yml ansible/playbooks/hetzner/install.yml ansible/playbooks/server/configure.yml --limit 'hetzner'\n```\n\n\u003e If a host is not in rescue mode, the installation playbook will be ignored silently\n\n## Fully remote usage\n\n1. Install this collection and its requirements:\n\n```shell\nansible-galaxy collection install debovema.ansible_setup\nansible-playbook debovema.ansible_setup.meta.requirements\n```\n\n2. Retrieve your inventory from a custom Ansible setup inventory repository (for instance: [debovema/ansible_setup_inventory](https://github.com/debovema/ansible_setup_inventory)), created with the [Ansible setup inventory template](https://github.com/debovema/ansible_setup_inventory_template):\n\n```shell\ngit clone git@github.com:debovema/ansible_setup_inventory.git ~/.ansible_setup_inventory\n```\n\n3. Execute the server configuration playbook:\n\n```shell\ncd ~/.ansible_setup_inventory\nansible-playbook debovema.ansible_setup.server.configure all\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdebovema%2Fansible_setup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdebovema%2Fansible_setup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdebovema%2Fansible_setup/lists"}