{"id":13583855,"url":"https://github.com/M0NsTeRRR/Homelab-infra","last_synced_at":"2025-04-06T21:33:18.921Z","repository":{"id":43375949,"uuid":"221749123","full_name":"M0NsTeRRR/Homelab-infra","owner":"M0NsTeRRR","description":"Homelab management infrastructure (Packer / Terraform / Ansible)","archived":true,"fork":false,"pushed_at":"2023-06-24T17:56:49.000Z","size":1311,"stargazers_count":17,"open_issues_count":5,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-02T15:53:58.549Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/M0NsTeRRR.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"governance":null,"roadmap":null,"authors":null},"funding":{"github":"M0NsTeRRR"}},"created_at":"2019-11-14T17:12:51.000Z","updated_at":"2024-01-23T12:55:35.000Z","dependencies_parsed_at":"2024-01-24T13:08:02.012Z","dependency_job_id":null,"html_url":"https://github.com/M0NsTeRRR/Homelab-infra","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/M0NsTeRRR%2FHomelab-infra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/M0NsTeRRR%2FHomelab-infra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/M0NsTeRRR%2FHomelab-infra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/M0NsTeRRR%2FHomelab-infra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/M0NsTeRRR","download_url":"https://codeload.github.com/M0NsTeRRR/Homelab-infra/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223264989,"owners_count":17116262,"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":[],"created_at":"2024-08-01T15:03:51.044Z","updated_at":"2024-11-06T00:30:52.758Z","avatar_url":"https://github.com/M0NsTeRRR.png","language":"Jinja","funding_links":["https://github.com/sponsors/M0NsTeRRR"],"categories":["Jinja"],"sub_categories":[],"readme":"## This project has been replaced by -\u003e https://github.com/M0NsTeRRR/homelabv3-infra\n\nThis is my Homelab infrastructure.\n\n![Ansible Lint](https://github.com/M0NsTeRRR/Homelab-infra/workflows/Ansible%20Lint/badge.svg)\n![Packer Lint](https://github.com/M0NsTeRRR/Homelab-infra/workflows/Packer%20Lint/badge.svg)\n![Terraform Lint](https://github.com/M0NsTeRRR/Homelab-infra/workflows/Terraform%20Lint/badge.svg)\n\n# Requirements\n\n- Ansible core (version \u003e= 2.14)\n  - Python3 and Pip\n- Packer (version \u003e= 1.8)\n  - Packer builder arm\n- Terraform (version \u003e= 1.3)\n  - Terragrunt (version \u003e= 0.42)\n\n# Ansible\n\n`cd ansible`  \n\nFill certs folders\n\nInstall python dependencies `pip3 install -r requirements.txt`\n\nInstall ansible galaxy dependencies `ansible-galaxy install -r requirements.yml`\n\nfill all `secrets.yml` based on `secrets.example` in each subdirectory of `groups_vars`\n\n#### Set environment variable `ANSIBLE_VAULT_PASS` like `export ANSIBLE_VAULT_PASS='password'`\n\n### Playbooks to add fingerprint on know_hosts\n\n`ansible-playbook -i hosts playbooks/add-ssh-keys.yml`\n\n### Playbooks to create client certificate signed by a CA\n\n`ansible-playbook -i hosts playbooks/generate-certs.yml`\n\n### Playbooks to deploy a zone\n\n`ansible-playbook -i hosts deploy_\u003czone\u003e.yml`  \nReplace `\u003czone\u003e` by the appropriate zone name\n\n# Packer\n`cd packer`\n\nInit packer plugins  \n`packer init packer/templates/debian`\n\nPort 8888 used for debian build  \nPort 8889 used for ubuntu build  \n\nOpen both ports on windows firewall  \nStart powershell prompt with admin right `netsh interface portproxy add v4tov4 listenaddress=\u003cWINDOWS IP\u003e connectaddress=\u003cWSL IP\u003e listenport=\u003cWINDOWS PORT\u003e connectport=\u003cWSL PORT\u003e`  \nReplace \u003cIP\u003e with the LAN IP of your PC and \u003cPORT\u003e with [8888, 8889]  \nTo delete the rules `netsh interface portproxy del v4tov4 listenaddress=\u003cIP\u003e listenport=\u003cPORT\u003e`\n\nSupported distributions :\n\n**VM**\n\n- Debian (11.3.0) - [iso](https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-11.3.0-amd64-netinst.iso)\n- Ubuntu (20.04.4) - [iso](https://releases.ubuntu.com/20.04/ubuntu-20.04.4-live-server-amd64.iso)\n\n**Raspberry Pi (v3/v4)**\n\n- Ubuntu (20.04.4) - [iso](https://cdimage.ubuntu.com/releases/20.04.4/release/ubuntu-20.04.4-preinstalled-server-arm64+raspi.img.xz)\n\n### Create template\n\n`./build.sh` (sudo permission required for Raspberry Pi choice only)\n\n# Terraform\n\n`cd terraform`  \n\nInstall dependencies `pip3 install paramiko`\n\nfill `account.hcl` based on `account.example`\n\n**Command must be run in one of this directories (dmz/lab/vpn)**\n\n### Create an execution plan\n\n`terragrunt run-all plan`\n\n### Deploy/update infrastructure\n\n`terragrunt run-all apply`\n\n# Licence\n\nThe code is under CeCILL license.\n\nYou can find all details here: https://cecill.info/licences/Licence_CeCILL_V2.1-en.html\n\n# Credits\n\nCopyright © Ludovic Ortega, 2021\n\nContributor(s):\n\n-Ortega Ludovic - ludovic.ortega@adminafk.fr\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FM0NsTeRRR%2FHomelab-infra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FM0NsTeRRR%2FHomelab-infra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FM0NsTeRRR%2FHomelab-infra/lists"}