Hello all Sorry I just curious, is this normal result for plugin nmap?
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/oss/.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 Parsed /Jaks/test.nmap.yml inventory source with auto plugin all: children: ungrouped: {} On Monday, October 12, 2020 at 6:17:46 PM UTC+7 Mayang Sari wrote: > I tried edit /etc/ansible/ansible.cfg and add ini and auto in > enable_plugins > > On Monday, October 12, 2020 at 3:55:42 PM UTC+7 Mayang Sari wrote: > >> Hello Brain, >> >> Sorry for late replay >> I tried and got this error >> >> 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: {} >> >> how to fix this? >> >> On Thursday, October 8, 2020 at 2:40:06 AM UTC+7 Brian Coca wrote: >> >>> The nmap inventory plugin does not create a file, it uses nmap every >>> time to generate the inventory in memory for ansible. >>> >>> You can however use `ansible-inventory --list --yaml -i test.nmap.yml >>> > inventory.yml` to generate a static inventory >>> >>> it works with any plugin type, so you can do the same with a cloud >>> inventory and others. >>> >>> >>> contents of test.nmap.yml >>> >>> plugin: nmap >>> strict: False >>> address: 172.130.23..0/20 >>> >>> -- >>> ---------- >>> Brian Coca >>> >>> -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/cbe82014-3a4a-4103-a4b7-b18a06e3ad0dn%40googlegroups.com.