From 3557d33afb44903067ce17f3a318ce06cc79d22f Mon Sep 17 00:00:00 2001 From: Julian Schacher Date: Tue, 22 Oct 2024 23:44:17 +0200 Subject: [PATCH] docs: add note on how to add a new Hetzner VM --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index e4dc636..354bba5 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,17 @@ # cit Ansible Infrastructure +## Adding a new Hetzner VM + +1. Add the VM to `inventories/hetzner/hosts.yaml` + Set the correct `ansible_host` and `ansible_user`, add it to the correct Debian groups, but aside from that there's no further configuration needed for now. +2. Initialize the VM using the following command (replace `HOST_NAME_HERE` with the name in the inventory): + ```bash + ansible-playbook -e ansible_user=root -i inventories/hetzner -l HOST_NAME_HERE playbooks/init_hetzer_vm.yaml + ``` +3. Add the VM to the desired groups and set the desired variables. + Do all the work you need to do (like creating new Ansible roles etc.). +4. Run `ansible-playbook -i inventories/hetzner playbooks/deploy.yaml` + ## Open Source Software Used Source code was taken from the [CCCHH/ansible-infra repo](https://git.hamburg.ccc.de/CCCHH/ansible-infra), where it was licensed under the MIT license.