From 7e0943ab8cfd3fc4ca52e39a9114f4b16df12e9e Mon Sep 17 00:00:00 2001 From: MarcoIeni <11428655+MarcoIeni@users.noreply.github.com> Date: Thu, 26 Sep 2024 14:43:41 +0200 Subject: [PATCH] docs: improve ansible playbook for new server --- ansible/README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ansible/README.md b/ansible/README.md index 7fd7b8916..72278f6b1 100644 --- a/ansible/README.md +++ b/ansible/README.md @@ -44,11 +44,22 @@ aws ec2-instance-connect send-ssh-public-key \ --instance-id $HOST_INSTANCE_ID \ --instance-os-user $USER \ --ssh-public-key file://$PATH_TO_PUBLIC_KEY + --region $REGION ``` You will then have 60 seconds to kick off the `./apply` script before the public key is removed again. +> [!NOTE] +> If the server is an fresh Ubuntu instance, use `ubuntu` as `$USER`, and +> run ansible with the `-u ubuntu` flag. +> E.g.: +> +> ```sh +> $ aws ec2-instance-connect send-ssh-public-key [...] --instance-os-user 'ubuntu' [...] +> $ ./apply prod playground -u ubuntu +> ``` + ## Environments Making changes directly on production is not a great idea: to ease local