spurin / diveintoansible-lab

Dive Into Ansible Lab
788 stars 498 forks source link

cannot login to ansible Lab #67

Closed morothebest closed 2 years ago

morothebest commented 2 years ago

cannot login to ansible Lab using : ansible and password for password. i did all steps but could not login in

spurin commented 2 years ago

Hi @morothebest

Please share with me some more information and we'll get this resolved. What OS are you on, whats your userid and can you also provide a copy of your .env file.

Thanks!

morothebest commented 2 years ago

Hi @spurin

OS

morothebest commented 2 years ago

@spurin image

morothebest commented 2 years ago

user is ansible Password is : password

spurin commented 2 years ago

Hi @morothebest

Hopefully you have this resolved, if not, you need to change your paths so they start with /host_mnt/c/users

Let me know if you're still having any problems 👍

morothebest commented 2 years ago

hi @spurin

I did the below as per your request:- image

gave the below error :

image

spurin commented 2 years ago

Hi @morothebest

Rename your folder from diveintoansible-lab-master to diveintoansible-lab and you should be good 👍

morothebest commented 2 years ago

i did

image

it gave the same error image

morothebest commented 2 years ago

when i change the .env back to image

did not give error as shown below but still cannot login

image

image

spurin commented 2 years ago

Okay great. Can you please share the contents of the config directory in your diveintoansible-lab

A screenshot will be fine 👍

morothebest commented 2 years ago

image

guest name : ansible guest password: password root password: password guest_shell: /bin/bash

spurin commented 2 years ago

Just noted the previous comments, can you please change your .env file back to starting with /host_mnt/c/users for both entries.

It was failing before because the folder was diveintoansible-lab-master instead of diveintoansible-lab

Then, try doing a docker-compose up, after that it should be okay. If it fails please share a new screenshot

morothebest commented 2 years ago

actually i did change the folder name first then the .env as you told me but it gave the same error

image

spurin commented 2 years ago

Thanks for the update @morothebest

Can you please try running all of the following and share screenshots -

docker run --rm -v /host_mnt/c/users/mourad/diveintoansible-lab/config:/config ubuntu cat /config/guest_name

docker run --rm -v /mnt/c/users/mourad/diveintoansible-lab/config:/config ubuntu cat /config/guest_name

docker run --rm -v /c/users/mourad/diveintoansible-lab/config:/config ubuntu cat /config/guest_name
morothebest commented 2 years ago

image

morothebest commented 2 years ago

sorry should be the below

image

spurin commented 2 years ago

Thanks @morothebest

This helped, I'm surprised to see that the third variation worked for you, i.e. /c/users

I haven't seen this in a while and typically it relates to older versions of Windows. Would you please share a screenshot of the output from start/run/winver

We could try switching your config to /c/users at the start and seeing how it goes. If it is an older version of Windows it can be a bit hit/miss.

If it is an older version and updating Windows isn't practical/viable or something you don't want to do (understandably), then there is also the option to run the lab using Google's free cloudshell. You just need a Google account. For this you just press the button to launch on the repo, sign in with Google and follow the short tutorial on the right hand side. This is here - https://github.com/spurin/diveintoansible-lab-gcp-cloudshell

Let me know how you get on and your thoughts

morothebest commented 2 years ago

image

am using VM with windows 10 is that can cause an issue ?

spurin commented 2 years ago

Hi @morothebest

I mean, click start, choose run and then type winver.

When you say you're running a Windows 10 VM, can you elaborate?

What's the main system that the VM is running on?

morothebest commented 2 years ago

this is the windows 10 on the VM (VMware) image

and the below is the main windows 10 that i have on my computer 👎 image

spurin commented 2 years ago

Hi @morothebest

I really don't recommend running the course inside a VM and most likely, this relates to the issue you're seeing.

You will end up with multiple layers of virtualisation

i.e. Windows -> VMware -> Docker Desktop (which internally uses -> VirtualBox)

The Windows version itself should be fine but, the virtualisation appears to be screwing the volumes mounts.

I recommend at this point that either you install Docker Desktop directly on your Windows system, or, you go with the Google Cloudshell version (online) that I shared the link for.

The Cloudshell experience is great, it's free with a Google account and you'll be up and running without much effort in a few minutes.

If you go down the direct desktop route instead, let me know also.

morothebest commented 2 years ago

Ok noted

i used this GCC and i got the below

image

is that normal ?

morothebest commented 2 years ago

@spurin it worked now, found that Malwarbytes prevent it from start

thanks lot

spurin commented 2 years ago

@morothebest I think that sometimes Google also refresh their cloudshell image and this can cause problems. I just updated the image, if you try it, it will be fine now.