splunk / splunk-platform-automator

Ansible framework providing a fast and simple way to spin up complex Splunk environments.
Apache License 2.0
117 stars 46 forks source link

No inventory was parsed, only implicit localhost is available #20

Closed splunkenizer closed 2 years ago

splunkenizer commented 2 years ago

Hi,

Same issue and when I try to skip the index.html creation, no hosts matched.

$ansible -m ping all
[WARNING]: Ansible is being run in a world writable directory (/mnt/c/Splunkenizer/Vagrant/Splunkenizer), ignoring it as an ansible.cfg source. For more information see
https://docs.ansible.com/ansible/devel/reference_appendices/config.html#cfg-in-world-writable-dir
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

How should I specify the host created with vagrant?

I'm using Vagrant and VirtualBox.

Originally posted by @JuGuSm in https://github.com/splunkenizer/Splunkenizer/issues/18#issuecomment-967321546

splunkenizer commented 2 years ago

I have created a separate issue for this, since it is not related to #18.

splunkenizer commented 2 years ago

The inventory created by vagrant looks good so far. But from the warning in your first output you can see, that ansible is ignoring the ansible.cfg file if the directory is world writable. This means it does not find the inventory which is explaining the issue. You should change the mount options like mentioned here: https://docs.ansible.com/ansible/devel/reference_appendices/config.html#cfg-in-world-writable-dir

The quicker way to resolve this issue is to clone the repository in a non windows shared location inside the WSL virtual machine. So, it should be outside of the '/mnt/c/' directory.

splunkenizer commented 2 years ago

@JuGuSm Could you please tell me, if you were able to solve this issue?

splunkenizer commented 2 years ago

I did not get any feedback so far. So assume this is not an issue anymore.