{"id":31962058,"url":"https://github.com/cdesiles/ansible-playbooks","last_synced_at":"2026-04-18T12:02:13.105Z","repository":{"id":311667621,"uuid":"1026344588","full_name":"cdesiles/ansible-playbooks","owner":"cdesiles","description":"Homelab Ansible Playbooks and Roles","archived":false,"fork":false,"pushed_at":"2025-08-25T20:13:58.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-25T22:12:32.095Z","etag":null,"topics":["ansible","ansible-role","nas","selfhosting","zfs"],"latest_commit_sha":null,"homepage":"https://gitlab.com/cdesiles/ansible-playbooks","language":"Shell","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/cdesiles.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":"2025-07-25T18:11:16.000Z","updated_at":"2025-08-25T20:14:02.000Z","dependencies_parsed_at":"2025-08-25T22:12:39.223Z","dependency_job_id":"a720b903-6381-49fd-b12d-af69abdb6525","html_url":"https://github.com/cdesiles/ansible-playbooks","commit_stats":null,"previous_names":["cdesiles/ansible-playbooks"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/cdesiles/ansible-playbooks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdesiles%2Fansible-playbooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdesiles%2Fansible-playbooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdesiles%2Fansible-playbooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdesiles%2Fansible-playbooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cdesiles","download_url":"https://codeload.github.com/cdesiles/ansible-playbooks/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdesiles%2Fansible-playbooks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279019565,"owners_count":26086750,"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-14T02:00:06.444Z","response_time":60,"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-role","nas","selfhosting","zfs"],"created_at":"2025-10-14T16:14:30.890Z","updated_at":"2026-04-18T12:02:13.098Z","avatar_url":"https://github.com/cdesiles.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Homelab Ansible Playbooks\n\nThis repository contains Ansible playbooks and roles I use to manage my NAS and some VMs 👨‍💻.\n\nThis project is designed for personal/familial scale maintenance, if you find this useful for your use, want to share advises or security concerns, feel free to drop me a line.\n\nThis is a good playground to learn and I encourage you to adapt these roles to your needs. While they might not be production-ready for all environments, I'm open to adapting them for [Ansible Galaxy](\u003c(https://galaxy.ansible.com)\u003e) if there's community interest!\n\n## Architecture Overview\n\n**Platform Support:** Arch Linux, Debian/Ubuntu\n\n**Core Design:**\n\n- A unique system administrator (`{{ ansible_user }}`)\n- Security hardened sshd\n- Shared services pattern: Single PostgreSQL and Valkey (Redis) instances serve all services\n- Rootless Podman: Containers run as `{{ ansible_user }}` (daemonless, `sudo podman ps` shows nothing)\n- User systemd services: `systemctl --user status \u003cservice\u003e` with lingering enabled\n- Nginx reverse proxy for web services\n- IP Freebind when available (e.g. unbound does not wait for wireguard to be up to start resolving DNS)\n\n**Available Services:**\n\n| Service     | Description                                              |\n| ----------- | -------------------------------------------------------- |\n| dns         | Unbound caching DNS + Pi-hole ad blocking + VPN resolver |\n| nfs         | Network file system server                               |\n| zfs         | ZFS installation and management                          |\n| uptime-kuma | Uptime monitoring                                        |\n| ntfy        | Notification server                                      |\n| gitea       | Git server                                               |\n| immich      | Photo management                                         |\n| static-web  | Static website hosting                                   |\n| vpn         | WireGuard server                                         |\n\n## Requirements\n\nBase tools:\n\n```sh\n# linux\napt-get install ansible ansible-lint ansible-galaxy\npacman -Syu ansible ansible-lint ansible-galaxy\n# macos\nbrew install ansible ansible-lint ansible-galaxy\n# windows\nchoco install ansible ansible-lint ansible-galaxy\n```\n\nOther roles:\n\n```sh\nansible-galaxy collection install -r requirements.yml\n```\n\n## Usage\n\nIf you have a password on your ssh key `--ask-pass` is recommended, `--ask-become-pass` is always asked in these roles, as most tasks require elevated privileges. These are dropped time to time when the default user privilege is enough.\n\n```sh\nansible-playbook -i inventory/hosts.yml playbook.yml \\\n--ask-pass \\\n--ask-become-pass\n```\n\nYou can also call you ssh agent to unlock your key prior to simplify your calls:\n\n```sh\nssh-add ~/.ssh/my_key\n# unlock it\nansible-playbook -i inventory/hosts.yml playbook.yml \\\n--ask-become-pass\n```\n\n## Bootstrapping a new host\n\nFor fresh hosts (only `root` available, no admin user yet):\n\n```sh\nansible-playbook playbooks/bootstrap.yml -l \u003chostname\u003e --ask-pass\n```\n\nThis installs Python and sudo, creates `{{ ansible_user }}` with sudo rights, and copies your local `~/.ssh/id_ed25519.pub`. Supports Arch Linux and Debian/Ubuntu.\n\nTo use a different SSH key:\n\n```sh\nansible-playbook playbooks/bootstrap.yml -l \u003chostname\u003e --ask-pass \\\n  --extra-vars 'bootstrap_ssh_public_key=\"ssh-ed25519 AAAA...\"'\n```\n\nThen set a password for the new user (required for sudo `--ask-become-pass`):\n\n```sh\nssh root@\u003chostname\u003e passwd jambon\n```\n\nAfter that, run the host playbook normally:\n\n```sh\nansible-playbook playbooks/\u003chostname\u003e.yml --ask-become-pass\n```\n\n## Developping\n\nLinting:\n\n```sh\nansible-lint\nnpx prettier --write .\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdesiles%2Fansible-playbooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdesiles%2Fansible-playbooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdesiles%2Fansible-playbooks/lists"}