From 538f433e39a532f748a57f46ca15e760a145d283 Mon Sep 17 00:00:00 2001 From: Thomas Maurice Date: Wed, 6 Dec 2023 09:28:44 +0100 Subject: [PATCH] askpass --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 000c302..e445971 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,8 @@ $ ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -P '' :warning: In real life, don't use `-P ''` because it creates your SSH key without a passphrase, it is ok for this lab, not for real life. -Lastly, look into `group_vars/all.yml`, go at the end of the file and add the created _public_ key in the root_user.default_root_keys (from ~/.ssh/id_ed25519.pub, or any other keys you created before hand). When this is done, add it to the `~/.ssh/authorized_keys` in the `root` home folder on every one of your virtual machines. +Lastly, look into `group_vars/all.yml`, go at the end of the file and add the created _public_ key in the root_user.default_root_keys (from ~/.ssh/id_ed25519.pub, or any other keys you created before hand). + ### One more thing, update your inventory @@ -90,6 +91,16 @@ $ ansible-playbook -vi inventory -l all playbooks/base.yml The `-i` flag specifies the inventory file to use, the `-l` file limits which hosts it applies to, either by hostname or group name, here we apply it to all the hosts. +If you cannot connect to the host with a `permission denied` error, rerun the command using the `-k` flag, to make ansible ask you for the host password. + +``` +# make sure the sshpass program is installed on the Zabeth +$ sudo apt install -y sshpass +$ ansible-playbook -vi inventory -k -l all playbooks/base.yml +``` + +If that does not work, add it to the `~/.ssh/authorized_keys` in the `root` home folder on every one of your virtual machines. + While you are at it I would recommend you install docker as well using the `docker.yml` playbook Good, now you are good to go !