diff --git a/README.md b/README.md index c7e3da9a6b49718e35a349399f65b0447e054607..5dcc27a5e73aec778e9e118aab4e5d1c8cf8e2f3 100644 --- a/README.md +++ b/README.md @@ -15,3 +15,36 @@ This repo contains Ansible configs for the Freifunk Lëtzebuerg infra. - `gateway`: Set up a fflux gateway - `api`: api.freifunk.lu - `firmware`: firmware.freifunk.lu + +## Guide + +### Initial Server Setup + +First, add the machine to `hosts` at the top of the file: + +```yml +machine-name-here ansible_host=10.20.30.40 +``` + +Note that `machine-name-here` will be the machine's hostname. + +Then, put the machine under the `[initial]` group: + +```yml +[initial] +machine-name-here ansible_user=root +``` + +Finally, change the default private SSH key under `[all:vars]` if necessary: + +```yml +ansible_ssh_private_key_file=/home/myuser/.ssh/id_ed25519 +``` + +You can now run the playbook: + +```bash +fflux@fflux:~/repos/Ansible-Configuration$ ansible-playbook -i hosts initial_server_setup/initial_setup.yml +``` + +Note that the placement of the repositories might impact the playbook's behaviour, particularly for more advanced setups, incl. web server. diff --git a/hosts b/hosts index 240632de4298927e1aee1f83e3d099710bcc85fc..828fe21a106f105d73677d8eede19151d1649a7b 100644 --- a/hosts +++ b/hosts @@ -18,6 +18,7 @@ fflux-test # all machine variables come here [all:vars] ansible_python_interpreter=/usr/bin/python3 +# Change this to the ssh key you want to use to connect to a server ansible_ssh_private_key_file=/home/fflux/.ssh/fflux_fflux server_config_dir=~/repos/Infrastructure-Intern/server_config server_scripts_dir=~/repos/Infrastructure-Intern/scripts