Skip to content
Snippets Groups Projects
Unverified Commit 538f433e authored by Thomas Maurice's avatar Thomas Maurice
Browse files

askpass

parent c7c040a7
Branches
No related tags found
No related merge requests found
...@@ -66,7 +66,8 @@ $ ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -P '' ...@@ -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. :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 ### One more thing, update your inventory
...@@ -90,6 +91,16 @@ $ ansible-playbook -vi inventory -l all playbooks/base.yml ...@@ -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. 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 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 ! Good, now you are good to go !
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment