Ansible Anisable Nmap清单插件

Ansible Anisable Nmap清单插件,ansible,nmap,inventory,Ansible,Nmap,Inventory,嘿,我正在尝试做一个动态清单,扫描网络,寻找要添加的主机,目前我有点卡住了,我不知道我应该做什么来排除故障我用这个turtorial主要是为了设置这个 在ansbile,我一直犯这个错误 1.646 INFO Updating inventory 10: PXE clients 1.657 DEBUG Using base command: python /usr/bin/ansible-inventory -i /tmp/awx_744__2xl1jk8/project

嘿,我正在尝试做一个动态清单,扫描网络,寻找要添加的主机,目前我有点卡住了,我不知道我应该做什么来排除故障我用这个turtorial主要是为了设置这个

在ansbile,我一直犯这个错误

    1.646 INFO     Updating inventory 10: PXE clients
1.657 DEBUG    Using base command: python /usr/bin/ansible-inventory -i /tmp/awx_744__2xl1jk8/project --playbook-dir /tmp/awx_744__2xl1jk8/project -vvvvv
1.657 INFO     Reading Ansible inventory source: /tmp/awx_744__2xl1jk8/project
1.658 INFO     Using VIRTUAL_ENV: /var/lib/awx/venv/ansible
1.658 INFO     Using PATH: /var/lib/awx/venv/ansible/bin:/var/lib/awx/venv/awx/bin:/usr/pgsql-10/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
1.658 INFO     Using PYTHONPATH: /var/lib/awx/venv/ansible/lib/python3.6/site-packages:
1.970 ERROR    ansible-inventory 2.9.14
1.970 ERROR      config file = /etc/ansible/ansible.cfg
1.970 ERROR      configured module search path = ['/var/lib/awx/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
1.970 ERROR      ansible python module location = /usr/lib/python3.6/site-packages/ansible
1.970 ERROR      executable location = /usr/bin/ansible-inventory
1.970 ERROR      python version = 3.6.8 (default, Apr 16 2020, 01:36:27) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]
1.970 ERROR    Using /etc/ansible/ansible.cfg as config file
1.970 ERROR    setting up inventory plugins
1.970 ERROR    host_list declined parsing /tmp/awx_744__2xl1jk8/project/Nmap.yml as it did not pass its verify_file() method
1.970 ERROR    script declined parsing /tmp/awx_744__2xl1jk8/project/Nmap.yml as it did not pass its verify_file() method
1.970 ERROR    toml declined parsing /tmp/awx_744__2xl1jk8/project/Nmap.yml as it did not pass its verify_file() method
1.970 ERROR    [WARNING]:  * Failed to parse /tmp/awx_744__2xl1jk8/project/Nmap.yml with auto
1.970 ERROR    plugin: failed to parse /tmp/awx_744__2xl1jk8/project/Nmap.yml: expected str,
1.970 ERROR    bytes or os.PathLike object, not NoneType
1.970 ERROR      File "/usr/lib/python3.6/site-packages/ansible/inventory/manager.py", line 280, in parse_source
1.970 ERROR        plugin.parse(self._inventory, self._loader, source, cache=cache)
1.970 ERROR      File "/usr/lib/python3.6/site-packages/ansible/plugins/inventory/auto.py", line 58, in parse
1.970 ERROR        plugin.parse(inventory, loader, path, cache=cache)
1.970 ERROR      File "/var/lib/awx/.ansible/collections/ansible_collections/community/general/plugins/inventory/nmap.py", line 168, in parse
1.970 ERROR        raise AnsibleParserError("failed to parse %s: %s " % (to_native(path), to_native(e)))
1.970 ERROR    [WARNING]:  * Failed to parse /tmp/awx_744__2xl1jk8/project/Nmap.yml with yaml
1.970 ERROR    plugin: Plugin configuration YAML file, not YAML inventory
1.970 ERROR      File "/usr/lib/python3.6/site-packages/ansible/inventory/manager.py", line 280, in parse_source
1.970 ERROR        plugin.parse(self._inventory, self._loader, source, cache=cache)
1.970 ERROR      File "/usr/lib/python3.6/site-packages/ansible/plugins/inventory/yaml.py", line 112, in parse
1.970 ERROR        raise AnsibleParserError('Plugin configuration YAML file, not YAML inventory')
1.970 ERROR    [WARNING]:  * Failed to parse /tmp/awx_744__2xl1jk8/project/Nmap.yml with ini
1.970 ERROR    plugin: Invalid host pattern '---' supplied, '---' is normally a sign this is a
1.970 ERROR    YAML file.
1.970 ERROR      File "/usr/lib/python3.6/site-packages/ansible/inventory/manager.py", line 280, in parse_source
1.970 ERROR        plugin.parse(self._inventory, self._loader, source, cache=cache)
1.970 ERROR      File "/usr/lib/python3.6/site-packages/ansible/plugins/inventory/ini.py", line 138, in parse
1.970 ERROR        raise AnsibleParserError(e)
1.970 ERROR    [WARNING]: Unable to parse /tmp/awx_744__2xl1jk8/project/Nmap.yml as an
1.970 ERROR    inventory source
1.970 ERROR    setting up inventory plugins
1.970 ERROR    host_list declined parsing /tmp/awx_744__2xl1jk8/project/collections/requirments.yml as it did not pass its verify_file() method
1.970 ERROR    script declined parsing /tmp/awx_744__2xl1jk8/project/collections/requirments.yml as it did not pass its verify_file() method
1.971 ERROR    [WARNING]: Skipping 'collections' as this is not a valid group definition
1.971 ERROR    Parsed /tmp/awx_744__2xl1jk8/project/collections/requirments.yml inventory source with yaml plugin
1.971 DEBUG    Finished loading from source: /tmp/awx_744__2xl1jk8/project
1.971 INFO     Processing JSON output...
1.971 DEBUG    Loaded group: all
1.971 INFO     Loaded 0 groups, 0 hosts
1.980 DEBUG    Inventory variables unmodified
我正在使用这个插件:

我的插件文件很小:

    ---
   plugin: community.general.nmap
   strict: False
   ipv4: True
   address: 39.0.0.0/24