From c4f285b83720fdaedc7820ea61ad18f1c33bab3e Mon Sep 17 00:00:00 2001 From: clyhtsuriva Date: Mon, 3 Mar 2025 21:27:21 +0100 Subject: Add page about setting up the lab using opentofu + ansible --- set-up-homelab.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 set-up-homelab.md diff --git a/set-up-homelab.md b/set-up-homelab.md new file mode 100644 index 0000000..6fbcfa9 --- /dev/null +++ b/set-up-homelab.md @@ -0,0 +1,26 @@ +# Set Up Homelab + +## Create the VMs with OpenTofu + +```sh +pushd opentofu/ +./init-validate-plan.sh +tofu apply "plan.out" +popd +``` + +## Configure them with Ansible + +```sh +export ANSIBLE_CONFIG="$HOME/workbench/homelab-iac/ansible/ansible.cfg" +ansible-playbook ~/workbench/homelab-iac/ansible/playbooks/bootstrap.yml +``` + + +## Destroy + +```sh +pushd opentofu/ +tofu destroy +popd +``` -- cgit v1.2.3