{"id":21664421,"url":"https://github.com/wayofdev/ansible-role-dotfiles","last_synced_at":"2025-04-12T00:16:38.420Z","repository":{"id":39885137,"uuid":"487632916","full_name":"wayofdev/ansible-role-dotfiles","owner":"wayofdev","description":"Installs chezmoi and your preferred dotfiles repository using Ansible role on macOS or Linux.","archived":false,"fork":false,"pushed_at":"2023-09-04T13:51:15.000Z","size":106,"stargazers_count":11,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T00:16:32.632Z","etag":null,"topics":["ansible","ansible-role","automation","chezmoi","dotfiles","linux","macos","mdm","osx","osx-setup","provisioning"],"latest_commit_sha":null,"homepage":"https://wayof.dev","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wayofdev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"wayofdev"}},"created_at":"2022-05-01T20:13:00.000Z","updated_at":"2025-03-06T01:37:09.000Z","dependencies_parsed_at":"2022-07-06T09:00:31.333Z","dependency_job_id":null,"html_url":"https://github.com/wayofdev/ansible-role-dotfiles","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wayofdev%2Fansible-role-dotfiles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wayofdev%2Fansible-role-dotfiles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wayofdev%2Fansible-role-dotfiles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wayofdev%2Fansible-role-dotfiles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wayofdev","download_url":"https://codeload.github.com/wayofdev/ansible-role-dotfiles/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248497818,"owners_count":21113984,"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","ansible-role","automation","chezmoi","dotfiles","linux","macos","mdm","osx","osx-setup","provisioning"],"created_at":"2024-11-25T10:38:34.040Z","updated_at":"2025-04-12T00:16:38.391Z","avatar_url":"https://github.com/wayofdev.png","language":"Makefile","funding_links":["https://github.com/sponsors/wayofdev"],"categories":[],"sub_categories":[],"readme":"\u003cbr\u003e\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg width=\"456\" src=\"https://raw.githubusercontent.com/wayofdev/ansible-role-dotfiles/master/assets/logo.gh-light-mode-only.png#gh-light-mode-only\"\u003e\n\u003cimg width=\"456\" src=\"https://raw.githubusercontent.com/wayofdev/ansible-role-dotfiles/master/assets/logo.gh-dark-mode-only.png#gh-dark-mode-only\"\u003e\n\u003c/div\u003e\n\n\n\n\u003cbr\u003e\n\n\u003cbr\u003e\n\n\u003cdiv align=\"center\"\u003e\n\u003ca href=\"https://actions-badge.atrox.dev/wayofdev/ansible-role-dotfiles/goto\"\u003e\u003cimg alt=\"Build Status\" src=\"https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fwayofdev%2Fansible-role-dotfiles%2Fbadge\u0026style=flat-square\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://galaxy.ansible.com/wayofdev/dotfiles\"\u003e\u003cimg alt=\"Ansible Role\" src=\"https://img.shields.io/ansible/role/59603?style=flat-square\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/wayofdev/ansible-role-dotfiles/tags\"\u003e\u003cimg src=\"https://img.shields.io/github/v/tag/wayofdev/ansible-role-dotfiles?sort=semver\u0026style=flat-square\" alt=\"Latest Version\"\u003e\u003c/a\u003e\n\u003ca href=\"https://galaxy.ansible.com/wayofdev/dotfiles\"\u003e\u003cimg alt=\"Ansible Quality Score\" src=\"https://img.shields.io/ansible/quality/59603?style=flat-square\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://galaxy.ansible.com/wayofdev/dotfiles\"\u003e\u003cimg alt=\"Ansible Role\" src=\"https://img.shields.io/ansible/role/d/59603?style=flat-square\"/\u003e\u003c/a\u003e\n\u003ca href=\"LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/wayofdev/ansible-role-dotfiles.svg?style=flat-square\u0026color=blue\" alt=\"Software License\"/\u003e\u003c/a\u003e\n\u003ca href=\"#\"\u003e\u003cimg alt=\"Commits since latest release\" src=\"https://img.shields.io/github/commits-since/wayofdev/ansible-role-dotfiles/latest?style=flat-square\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n\n\n\u003cbr\u003e\n\n# Ansible Role: Chezmoi for macOS\n\nRole is used to automate installation and setup of [chezmoi](https://thekelleys.org.uk/dnsmasq/doc.html) on macOS, Ubuntu and Debian systems.\n\nIf you **like/use** this role, please consider **starring** it. Thanks!\n\n\u003cbr\u003e\n\n### → Why should I use a dotfile manager?\n\n\u003e Dotfile managers give you the combined benefit of a consistent environment everywhere with an undo command and a restore from backup.\n\n\u003e As the core of our development environments become increasingly standardized (e.g. using git at both home and work), and we further customize them, at the same time we increasingly work in ephemeral environments like Docker containers, virtual machines, and GitHub Codespaces.\n\n\u003e In the same way that nobody would use an editor without an undo command, or develop software without a version control system, chezmoi brings the investment that you have made in mastering your tools to every environment that you work in.\n\n\u003cdiv align=\"right\"\u003e\n  \u003ca href=\"https://www.chezmoi.io/why-use-chezmoi/\"\u003ewww.chezmoi.io/why-use-chezmoi\u003c/a\u003e\n\u003c/div\u003e\n\n### → Why Chezmoi for dotfiles?\n\nWhen I decided to develop a role for my dotfiles I did some research over existing dotfile managers. Chezmoi has a great comparison table over other managers. Check this [comparison table](https://www.chezmoi.io/comparison-table/).\n\n\u003cbr\u003e\n\n## 📑 Requirements\n\n  - **Homebrew**: Requires `homebrew` already installed (you can use `wayofdev.homebrew` to install it on your macOS).\n  - Up-to-date version of ansible. During maintenance/development, we stick to ansible versions and will use new features if they are available (and update `meta/main.yml` for the minimum version).\n  - Compatible OS. See [compatibility](#-compatibility) table.\n  - Role has dependencies on third-party roles on different operating systems. See `requirements.yml` and [dependencies](#-dependencies) section.\n\n\u003cbr\u003e\n\n## 🔧 Role Variables\n\nAvailable variables are listed below, along with example values (see `defaults/main.yml`):\n\n\u003cbr\u003e\n\n### → Structure\n\n```yaml\n# From where should we take dotfiles?\n# Example repository: \"https://github.com/benmezger/dotfiles\"\n# By default, my personal is used.\ndotfiles_repository_url: \"https://github.com/lotyp/dotfiles.git\"\ndotfiles_repository_branch: master\n```\n\n\u003cbr\u003e\n\n## 📗 Example Playbook\n\n```yaml\n---\n- hosts: all\n\n  # is needed when running over SSH\n  environment:\n    - PATH: \"/usr/local/bin:/usr/local/sbin:/opt/homebrew/bin:{{ ansible_env.PATH }}\"\n\n  roles:\n    - wayofdev.homebrew\n    - wayofdev.dotfiles\n```\n\n\u003cbr\u003e\n\n## ⚙️ Development\n\nTo install dependencies and start development you can check contents of our `Makefile`\n\n**Install** [poetry](https://github.com/python-poetry/poetry) using [poetry-bin](https://github.com/gi0baro/poetry-bin) and all dev python dependencies:\n\n```bash\n$ make install\n```\n\n**Install** only python dependencies, assuming that you already have poetry:\n\n```bash\n$ make install-deps\n```\n\n**Install** all git hooks:\n\n```bash\n$ make hooks\n```\n\n**Lint** all role files:\n\n```bash\n$ make lint\n```\n\n\u003cbr\u003e\n\n## 🧪 Testing\n\nYou can check `Makefile` to get full list of commands for remote and local testing. For local testing you can use these comands to test whole role or separate tasks:\n\n### → on localhost\n\n\u003e :warning: **Notice**: By defaut all tests are running against your local machine!\n\n```bash\n# run molecule tests on localhost\n$ poetry run molecule test --scenario-name default-macos-on-localhost -- -vvv\n\n# or with make command\n$ make m-local\n\n# choose which tags will be included\n$ export TASK_TAGS=\"dotfiles-install,dotfiles-configure\"; make m-local\n\n# runs molecule with docker driver\n$ poetry run molecule test --scenario-name default -- -vvv\n\n# or with make file\n$ make m-linux\n```\n\n\u003cbr\u003e\n\n### → over SSH\n\n```bash\n# run molecule scenarios against remote machines over SSH\n# this will need VM setup and configuration\n$ poetry run molecule test --scenario-name default-macos-over-ssh -- -vvv\n\n$ make m-remote\n\n# tags also can be passed\n$ export TASK_TAGS=\"dotfiles-install,dotfiles-configure\"\n$ make m-remote\n```\n\n\u003cbr\u003e\n\n## 📦 Dependencies\n\nInstallation handled by `Makefile` and requirements are defined in `requirements.yml`\n\n### → for all\n\n  - [ansible.community.general](https://docs.ansible.com/ansible/latest/collections/community/general/index.html)\n\n### → only macOS\n\n  - [elliotweiser.osx-command-line-tools](https://galaxy.ansible.com/elliotweiser/osx-command-line-tools/)\n  - [wayofdev.homebrew](https://galaxy.ansible.com/wayofdev/homebrew)\n\n### → only Linux\n\n  - [geerlingguy.git](https://galaxy.ansible.com/geerlingguy/git)\n\n\u003cbr\u003e\n\n## 🧩 Compatibility\n\nThis role has been tested on these systems:\n\n| system / container | tag      |\n| :----------------- | -------- |\n| macos              | monterey |\n| macos              | big-sur  |\n| ubuntu             | latest   |\n| debian             | latest   |\n\n\u003cbr\u003e\n\n## 🤝 License\n\n[![Licence](https://img.shields.io/github/license/wayofdev/ansible-role-dotfiles?style=for-the-badge\u0026color=blue)](./LICENSE)\n\n\u003cbr\u003e\n\n## 🙆🏼‍♂️ Author Information\n\nThis role was created in **2022** by [lotyp / wayofdev](https://github.com/wayofdev).\n\n\u003cbr\u003e\n\n## 🫡 Contributors\n\n\u003cimg align=\"left\" src=\"https://img.shields.io/github/contributors-anon/wayofdev/ansible-role-dock?style=for-the-badge\"/\u003e\n\n\u003ca href=\"https://github.com/wayofdev/ansible-role-dotfiles/graphs/contributors\"\u003e\n  \u003cimg src=\"https://opencollective.com/wod/contributors.svg?width=890\u0026button=false\"\u003e\n\u003c/a\u003e\n\n\u003cbr\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwayofdev%2Fansible-role-dotfiles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwayofdev%2Fansible-role-dotfiles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwayofdev%2Fansible-role-dotfiles/lists"}