christophetd / Adaz

:wrench: Deploy customizable Active Directory labs in Azure - automatically.
https://blog.christophetd.fr/automating-the-provisioning-of-active-directory-labs-in-azure/
409 stars 84 forks source link

Error while running Terraform apply. Using WSL to run the scripts. #20

Closed rusticrajp closed 4 years ago

rusticrajp commented 4 years ago

0f158/resourceGroups/ad-hunting-lab/providers/Microsoft.Compute/virtualMachines/DANY-WKS]

Error: Error running command '/bin/bash -c 'source venv/bin/activate && ansible-playbook domain-controllers.yml --tags=common,base -v'': exit status 1. Output: /bin/bash: venv/bin/activate: No such file or directory

Error: Error running command '/bin/bash -c 'source venv/bin/activate && ANSIBLE_HOST_KEY_CHECKING=false ansible-playbook elasticsearch-kibana.yml -v'': exit status 1. Output: /bin/bash: venv/bin/activate: No such file or directory

christophetd commented 4 years ago

Can you confirm that you did create the venv folder, named exactly venv and located in ansible/ as per the readme? It looks like that's what you're missing

Running cd adaz/ansible && source venv/bin/activate should not give you any error

christophetd commented 4 years ago

Did you figure out a solution?

droidforensics commented 4 years ago

Not OP, but I had this issue last night. It was a two parter: I needed to pip install wheel manually as you described in issue #18, and afterwards I executed the command you provided in the above step. Since it worked, I tried to run terraform again and got it past this stage w/o further issue. I'm also on WSLv2 (Ubuntu 20.04 downloaded from the MSFT Store). Other problems seem to crop up with WSL, but probably not best for discussion in this particular thread. 😄

Not sure if it was wheel causing the issue, or if I just needed the terminal to "recognize" the venv/bin/activate location. Hope this helps!

christophetd commented 4 years ago

That's good feedback, thanks! I'll try to run Adaz on a Windows 10 box and update the README

droidforensics commented 4 years ago

That's good feedback, thanks! I'll try to run Adaz on a Windows 10 box and update the README

FWIW, I have a Windows 10 VM (completely clean, only Firefox + WSL installed) and tried on there, once my host machine started giving me issues (that were my own doing). I had the same issue I described above, and those two commands fixed it. Probably something funky with WSL!

Thanks for your hard work on this project! I'm so close to having a functional env, just lack of time and issues that I'm causing myself get in the way. I'm loving it so far.

christophetd commented 4 years ago

See #37 for solution