capsulecorp-pentest
capsulecorp-pentest copied to clipboard
fauilure on "vagrant provision raditz": Step "placeflag : Place exercise flag "
Hello, I got an error when try to provision raditz host:
~$ vagrant provision raditz
==> raditz: Running provisioner: ansible...
Vagrant has automatically selected the compatibility mode '2.0'
according to the Ansible version installed (2.10.8).
Alternatively, the compatibility mode can be specified in your Vagrantfile:
https://www.vagrantup.com/docs/provisioning/ansible_common.html#compatibility_mode
raditz: Running ansible-playbook...
/home/avi/.local/lib/python2.7/site-packages/ansible/parsing/vault/__init__.py:44: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.
from cryptography.exceptions import InvalidSignature
PLAY [raditz] ******************************************************************
TASK [Gathering Facts] *********************************************************
[WARNING]: ERROR DURING WINRM SEND INPUT - attempting to recover:
WinRMOperationTimeoutError
ok: [raditz]
TASK [joindomain : Point dns to Goku] ******************************************
ok: [raditz]
TASK [joindomain : Enable Remote Desktop] **************************************
changed: [raditz]
TASK [joindomain : Open up port 445 on Windows firewall] ***********************
ok: [raditz]
TASK [joindomain : Open up port 3389 on Windows firewall] **********************
ok: [raditz]
TASK [joindomain : Join the capsulecorp.local domain] **************************
ok: [raditz]
TASK [joindomain : Reboot the server] ******************************************
changed: [raditz]
TASK [placeflag : Place exercise flag] *****************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ConnectionError: ('Connection aborted.', BadStatusLine('No status line received - the server has closed the connection',))
fatal: [raditz]: FAILED! => {"msg": "Unexpected failure during module execution.", "stdout": ""}
PLAY RECAP *********************************************************************
raditz : ok=7 changed=2 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
Error disappear after I restart my VM.
Do I need to run every time the "vagrant provision" command after running "vagrant up"? or after I finished with the provision, every time I want to bring up the lab I just need to run "vagrant up" only?
From the error it looks like just before the placeflag
task it rebooted the server which likely caused the ConnectionError. For now simply rerun vagrant provision raditz
and it should work.
I'll see if the placeflag
task can be placed ahead of the joindomain
task which is what triggers the reboot for a long term solution