R3dy / capsulecorp-pentest

Vagrant VirtualBox environment for conducting an internal network penetration test
https://www.manning.com/books/the-art-of-network-penetration-testing?a_aid=royce
784 stars 157 forks source link

for ansible #1

Closed lunat1c1337 closed 4 years ago

lunat1c1337 commented 4 years ago

Although ansible is installed, ansible ignores when I try the "vagrant provision goku" command.

`Windows is not officially supported for the Ansible Control Machine. Please check https://docs.ansible.com/intro_installation.html#control-machine-requirements Vagrant gathered an unknown Ansible version:

                                                                            and falls back on the compatibility mode '1.8'.

Alternatively, the compatibility mode can be specified in your Vagrantfile: https://www.vagrantup.com/docs/provisioning/ansible_common.html#compatibility_mode goku: Running ansible-playbook... The Ansible software could not be found! Please verify that Ansible is correctly installed on your host system.

If you haven't installed Ansible yet, please install Ansible on your host system. Vagrant can't do this for you in a safe and automated way. Please check https://docs.ansible.com for more information.`

R3dy commented 4 years ago

First question I have is do you have ansible accessible to you from a command prompt. What happens if you open up a command prompt and type ansible. If you have ansible installed but it isn't accessible you'll need to modify your global $PATH variable.

Also, I have not yet built installation instructions for Windows but my assumption is for this to work you will need Windows Subsystem for Linux (WSL)

Give this a look https://geekflare.com/ansible-installation-windows/

Skip to the heading

Using Ubuntu on Windows 10

lunat1c1337 commented 4 years ago

I use cygwin for this. When I run the command ansible --version I get such a result.

$ ansible --version ansible 2.8.4 config file = /etc/ansible/ansible.cfg configured module search path = ['/home/usr/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.7/site-packages/ansible executable location = /usr/bin/ansible python version = 3.7.7 (default, Apr 10 2020, 07:59:19) [GCC 9.3.0]

But when i try to run vagrant provision goku command i get such a result;

`Windows is not officially supported for the Ansible Control Machine. Please check https://docs.ansible.com/intro_installation.html#control-machine-requirements Vagrant gathered an unknown Ansible version:

                                                                        and falls back on the compatibility mode '1.8'.

Alternatively, the compatibility mode can be specified in your Vagrantfile: https://www.vagrantup.com/docs/provisioning/ansible_common.html#compatibility_mode goku: Running ansible-playbook... The Ansible software could not be found! Please verify that Ansible is correctly installed on your host system.

If you haven't installed Ansible yet, please install Ansible on your host system. Vagrant can't do this for you in a safe and automated way. Please check https://docs.ansible.com for more information.` ``

R3dy commented 4 years ago

Try this for me.

Modify the Vagrantfile entry for Goku to look like this

  system.vm.provision "ansible" do |ansible|
      ansible.playbook = "goku.yml"
      ansible.compatibility_mode = "2.0"
    end
R3dy commented 4 years ago

Any luck @lunat1c1337?

R3dy commented 4 years ago

Closing due to inactivity