ansible-inventory --list --yaml -i test.nmap.yml > inventory.yml
[WARNING]: * Failed to parse /Jaks/test.nmap.yml with yaml plugin: Plugin configuration YAML file,
not YAML inventory
[WARNING]: * Failed to parse /Jaks/test.nmap.yml with constructed plugin: Incorrect plugin name in
file: nmap
[WARNING]: Unable to parse /Jaks/test.nmap.yml as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
and when I tried with -vvvv
ansible-inventory --list --yaml -i test.nmap.yml -vvvv
ansible-inventory 2.9.12
config file = /etc/ansible/ansible.cfg
configured module search path = [‘/home/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’]
ansible python module location = /opt/anaconda3/lib/python3.8/site-packages/ansible
executable location = /opt/anaconda3/bin/ansible-inventory
python version = 3.8.3 (default, Jul 2 2020, 16:21:59) [GCC 7.3.0]
Using /etc/ansible/ansible.cfg as config file
setting up inventory plugins
host_list declined parsing /Jaks/test.nmap.yml as it did not pass its verify_file() method
virtualbox declined parsing /Jaks/test.nmap.yml as it did not pass its verify_file() method
[WARNING]: * Failed to parse /Jaks/test.nmap.yml with yaml plugin: Plugin configuration YAML file,
not YAML inventory
File “/opt/anaconda3/lib/python3.8/site-packages/ansible/inventory/manager.py”, line 280, in parse_source
plugin.parse(self._inventory, self._loader, source, cache=cache)
File “/opt/anaconda3/lib/python3.8/site-packages/ansible/plugins/inventory/yaml.py”, line 112, in parse
raise AnsibleParserError(‘Plugin configuration YAML file, not YAML inventory’)
[WARNING]: * Failed to parse /Jaks/test.nmap.yml with constructed plugin: Incorrect plugin name in
file: nmap
File “/opt/anaconda3/lib/python3.8/site-packages/ansible/inventory/manager.py”, line 280, in parse_source
plugin.parse(self._inventory, self._loader, source, cache=cache)
File “/opt/anaconda3/lib/python3.8/site-packages/ansible/plugins/inventory/constructed.py”, line 109, in parse
self._read_config_data(path)
File “/opt/anaconda3/lib/python3.8/site-packages/ansible/plugins/inventory/init.py”, line 224, in _read_config_data
raise AnsibleParserError(“Incorrect plugin name in file: %s” % config.get(‘plugin’, ‘none found’))
[WARNING]: Unable to parse /Jaks/test.nmap.yml as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
all:
children:
ungrouped: {}