{"id":27166146,"url":"https://github.com/shricodev/dotfiles","last_synced_at":"2025-10-04T06:21:45.553Z","repository":{"id":214723758,"uuid":"423436181","full_name":"shricodev/dotfiles","owner":"shricodev","description":"🍕 Fully automated dotfiles and system setup with Ansible using one command. Supports Docker container testing without local changes. 💥","archived":false,"fork":false,"pushed_at":"2025-08-07T09:23:27.000Z","size":1058,"stargazers_count":27,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-07T11:25:36.377Z","etag":null,"topics":["ansible","ansible-playbooks","ansible-roles","dotfiles","showcase","system-setup"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shricodev.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":"2021-11-01T11:14:40.000Z","updated_at":"2025-08-07T09:23:30.000Z","dependencies_parsed_at":"2023-12-31T10:20:34.177Z","dependency_job_id":"4036704a-c5a7-40da-bef2-8ac6f5e2b354","html_url":"https://github.com/shricodev/dotfiles","commit_stats":null,"previous_names":["shricodev/my-dotfiles","shricodev/dotfiles"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/shricodev/dotfiles","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shricodev%2Fdotfiles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shricodev%2Fdotfiles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shricodev%2Fdotfiles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shricodev%2Fdotfiles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shricodev","download_url":"https://codeload.github.com/shricodev/dotfiles/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shricodev%2Fdotfiles/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278273940,"owners_count":25959805,"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-10-04T02:00:05.491Z","response_time":63,"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-playbooks","ansible-roles","dotfiles","showcase","system-setup"],"created_at":"2025-04-09T03:38:20.190Z","updated_at":"2025-10-04T06:21:45.548Z","avatar_url":"https://github.com/shricodev.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🛠️ dotfiles \u0026 system setup with Ansible\n\n\u003cp align=\"left\"\u003e\n    \u003ca href=\"https://github.com/shricodev/dotfiles/actions/workflows/ansible-lint.yml\"\u003e\u003cimg align=\"center\" src=\"https://github.com/shricodev/dotfiles/actions/workflows/ansible-lint.yml/badge.svg\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/shricodev/dotfiles/issues\"\u003e\u003cimg align=\"center\" src=\"https://img.shields.io/github/issues/shricodev/dotfiles\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/shricodev/dotfiles/commits/main\"\u003e\u003cimg align=\"center\" src=\"https://img.shields.io/github/commit-activity/m/shricodev/dotfiles\" alt=\"commit frequency\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## 👀 Check Out My Blog Post on this Project!\n\n\u003e I have a blog post about this project [here](https://dev.to/shricodev/how-i-manage-my-system-and-dotfiles-with-ansible-8m1).\n\n## ✨ Why Ansible?\n\nManaging dotfiles and setting up a new system should be **fast**, **reliable**,\nand **reproducible** — without needing to manually install a bunch of things\nevery time.\n\nAnsible provides a **declarative**, **idempotent**, and **powerful** way to\nautomate:\n\n- Installing system packages\n- Configuring user environments\n- Managing dotfiles\n- Setting up development environments across **local machines**, **servers**,\n  and even **containers**.\n\nNo more \"setting up\" — **just run the playbook and go!**\n\n\u003e [!NOTE]\n\u003e Previously, I had stow way of managing my dotfiles, you can find it in the other\n\u003e branch here: [Link](https://github.com/shricodev/dotfiles/tree/old-stow)\n\n## 📽️ Demo\n\n\u003e You can find the demo video setting up this dotfiles configuration on multiple ubuntu homelabs here: [Link](https://www.youtube.com/watch?v=wXHfggMFbS0)\n\n## 📦 Requirements\n\n- [Ansible](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html) installed\n- Git\n- Supported Operating Systems (for now):\n  - Arch Linux\n  - Ubuntu (maybe also for Debian, but some packages names might be different)\n- (Optional) Docker, if you want to test this in a container\n\n## ⚡ Setup\n\n\u003e [!NOTE]\n\u003e Make sure that you have `~/.local/bin` in your `$PATH` variable as that is\n\u003e where the Ansible will symlink all the `bin` scripts.\n\nRun the setup script:\n\n```bash\nbash -c \"$(curl -fsSL https://raw.githubusercontent.com/shricodev/dotfiles/main/bin/dotfiles)\"\n```\n\n\u003e [!NOTE]\n\u003e This `bin/dotfiles` script will **auto-detect your OS**, **install Ansible**,\n\u003e **setup SSH keys**, and **run the main playbook** locally with the following.\n\u003e command: `ansible-playbook main.yml --limit local --ask-become-pass`\n\n## 🚀 Usage\n\nYou can use the dotfiles script to setup everything **locally**.\n\nThe `dotfiles` script is supposed to only run locally, but if you want to configure\ndotfiles on a remote machine, go for the [Taskfile](https://taskfile.dev/) tasks instead.\n\nMake sure you update the `inventory/hosts.yml` file with your hosts if you plan\nto use it to setup multiple systems and not just localhost.\n\n```yaml\n---\nall:\n  children:\n    ubuntu_homelabs:\n      hosts:\n        # \u003cplace_your_hosts_here\u003e\n\n    local:\n      hosts:\n        localhost:\n          ansible_connection: local\n```\n\nAlso, make sure that you update the `group_vars/local.yml`,\n`group_vars/all.yml` and `ubuntu_homelabs.yml` (optional if you only plan to\nrun it locally) file to your liking.\n\n### Using Taskfile tasks\n\nFirst, make sure that you have `task` installed.\n\n| Command                     | Description                                  |\n| --------------------------- | -------------------------------------------- |\n| `task docker_build`         | Build the dotfiles Docker image              |\n| `task docker_run`           | Run the dotfiles Docker container            |\n| `task docker_build_and_run` | Build and run the dotfiles Docker container  |\n| `task local`                | Run Ansible locally (your machine)           |\n| `task ubuntu_homelabs`      | Run Ansible to setup Ubuntu homelab machines |\n\n\u003e [!NOTE]\n\u003e 🏁 PRO TIP: If you want to test the working without installing anything on your system,\n\u003e you can run the project in a docker container.\n\n```bash\ntask docker_build_and_run\n```\n\n\u003e [!NOTE]\n\u003e For running this to setup remote hosts, make sure you setup an SSH key to login\n\u003e to each of the individual remote hosts you plan to manage and place the name in the\n\u003e `ansible.cfg` file.\n\n```ini\n[defaults]\ninventory = inventory/hosts.yml\nprivate_key_file = \u003cplace_ssh_key_path_here\u003e\nroles_path = roles\nretry_files_enabled = false\n\n# Not the very best practice but this project just deals with local changes and\n# mainly just the config changes, so shouldn't really matter.\nhost_key_checking = false\n```\n\n### Using the `dotfiles` script\n\nYou can use the `dotfiles` command **anywhere**:\n\n```bash\nbash dotfiles\n```\n\n\u003e [!NOTE]\n\u003e Logs are stored in the `~/.dotfiles.log` file. Use it to debug any issues.\n\nThis will:\n\n- Verify Ansible is installed\n- Clone (or update) the dotfiles repository\n- Install/update any `ansible-galaxy` dependencies\n- Run the Ansible playbook with your configuration\n\n## 🔥 First Run\n\nAfter the first setup, a small file is created at `~/.dotfiles_first_run_check`\nto detect that you ran it once.\n\nOn first run:\n\n- SSH key for Ansible is automatically generated\n- Dotfiles are cloned into `~/dotfiles`\n- Playbooks configure your system\n\n## 📜 Project Structure\n\n```\n.\n├── bin/                    # Helper scripts (like 'dotfiles')\n├── pre_tasks/              # Pre-setup tasks before full playbook runs\n├── roles/                  # Ansible roles for modular setup\n├── group_vars/             # Group-specific variable configurations\n├── inventory/              # Host inventory definitions\n├── collections/            # Ansible Galaxy collections\n├── configure_dotfiles.yml  # Main playbook for dotfiles setup\n├── configure_system.yml    # Main playbook for system setup\n├── clean_up_system.yml     # Main playbook for system cleanup\n├── ansible.cfg             # Ansible config file\n├── Dockerfile              # Dockerfile\n├── main.yml                # Master playbook entry point\n└── Taskfile.yml            # Task runner file\n```\n\n## 📬 Contributing\n\nPull requests are welcome! Feel free to open issues for feature suggestions or\nbug reports.\n\n## 📜 License\n\nThis project is licensed under the [Apache License, Version 2.0](LICENSE).\n\n# 🙌 Thanks for stopping by!\n\nHappy hacking! 🎉\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshricodev%2Fdotfiles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshricodev%2Fdotfiles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshricodev%2Fdotfiles/lists"}