Open EnsuingRequiem opened 1 year ago
Files identified in the description:
If these files are incorrect, please update the component name
section of the description or use the !component
bot command.
Additionally, while looking at the dns_resolve
option: https://github.com/ansible-collections/community.general/blob/7bf24eeb84bcd66b4bcdee832204cb4e2500be7f/plugins/inventory/nmap.py#L225-L226
I see there is an incorrect flag being used per nmap
's help output:
Nmap 7.80 ( https://nmap.org )
Usage: nmap [Scan Type(s)] [Options] (target specification)
TARGET SPECIFICATION:
[...]
HOST DISCOVERY:
[..:]
-n/-R: Never do DNS resolution/Always resolve [default: sometimes]
dns_resolve
should append -n
if false
and -R
if true
I created a PR to fix the get_option
calls (#7323).
The -n
should be fixed in a separate PR since it should be backported even further (get_option
was only changed in stable-7).
Summary
When trying to run nmap inventory plugin with basic configuration, it fails to parse. It appears when the code was changed from
_options
subscripting toget_option
method, the brackets were not converted to parenthesis.Issue Type
Bug Report
Component Name
nmap
Ansible Version
Community.general Version
Configuration
OS / Environment
Steps to Reproduce
Expected Results
I expected the nmap inventory to run and return a list of hosts
Actual Results
Code of Conduct