Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding open option to nmap #6200

Merged
merged 4 commits into from
Mar 26, 2023

Conversation

barloff-st
Copy link
Contributor

SUMMARY

This will add in the --open option for the nmap inventory plugin. Currently the port scan (-sP) just scans ports and returns results from all ports, regardless of if they are closed. The open option will all for only open ports to be returned. This will also clarify this by removing the "open ports" mention in the current ports argument.

ISSUE TYPE
  • Docs Pull Request
  • Feature Pull Request
COMPONENT NAME

community.general.nmap --open option

ADDITIONAL INFORMATION
nmap -p 22 --open 192.160.0.0/24

@ansibullbot ansibullbot added docs inventory inventory plugin new_contributor Help guide this first time contributor plugins plugin (any type) labels Mar 16, 2023
@barloff-st barloff-st changed the title Open options Adding open option to nmap Mar 16, 2023
@barloff-st
Copy link
Contributor Author

Sorry, I built this off of a current PR: #6165

So this is dependent on that. Let me know if I should pull out the 6165 PR changes and make this off of this repo's main.

@github-actions
Copy link

github-actions bot commented Mar 16, 2023

Docs Build 📝

Thank you for contribution!✨

This PR has been merged and your docs changes will be incorporated when they are next published.

@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-6 labels Mar 19, 2023
@felixfontein felixfontein marked this pull request as draft March 19, 2023 12:09
@felixfontein
Copy link
Collaborator

Sorry, I built this off of a current PR: #6165

So this is dependent on that. Let me know if I should pull out the 6165 PR changes and make this off of this repo's main.

I have marked this as a draft, it should stay that until it no longer contains #6165.

@felixfontein
Copy link
Collaborator

@barloff-st was it intentional that you closed this one (by pushing an 'empty' branch)?

@barloff-st
Copy link
Contributor Author

@felixfontein No that was not my intention. I synced my main fork and then rebased the branch in the PR. I have the changes in my branch, but I am afraid I do not know enough about how Git is doing things to understand why those changes seem to no longer be in the PR.

@barloff-st barloff-st reopened this Mar 23, 2023
@ansibullbot

This comment was marked as outdated.

@ansibullbot ansibullbot added merge_commit This PR contains at least one merge commit. Please resolve! needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html and removed new_contributor Help guide this first time contributor labels Mar 23, 2023
@ansibullbot ansibullbot removed merge_commit This PR contains at least one merge commit. Please resolve! needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html labels Mar 23, 2023
@ansibullbot

This comment was marked as outdated.

@barloff-st barloff-st marked this pull request as ready for review March 23, 2023 13:01
@barloff-st
Copy link
Contributor Author

@felixfontein issues with rebase have been resolved. Should be good now.

@ansibullbot ansibullbot removed the WIP Work in progress label Mar 23, 2023
barloff-st and others added 2 commits March 24, 2023 05:20
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
@ansibullbot ansibullbot added needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR and removed needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Mar 24, 2023
Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll merge the end of this weekend if nobody objects.

@felixfontein felixfontein removed the check-before-release PR will be looked at again shortly before release and merged if possible. label Mar 26, 2023
@felixfontein felixfontein merged commit 59e5807 into ansible-collections:main Mar 26, 2023
@patchback
Copy link

patchback bot commented Mar 26, 2023

Backport to stable-6: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-6/59e58079cb873057378fa076a2079c27bfacdfc8/pr-6200

Backported as #6246

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@felixfontein
Copy link
Collaborator

@barloff-st thanks for your contribution!

patchback bot pushed a commit that referenced this pull request Mar 26, 2023
* Adding nmap `open` option

* Removing accidental copy/paste issue

* Update changelogs/fragments/6200-adding-open-option-to-nmap.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/inventory/nmap.py

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 59e5807)
felixfontein pushed a commit that referenced this pull request Mar 26, 2023
…6246)

Adding `open` option to nmap (#6200)

* Adding nmap `open` option

* Removing accidental copy/paste issue

* Update changelogs/fragments/6200-adding-open-option-to-nmap.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/inventory/nmap.py

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 59e5807)

Co-authored-by: barloff-st <42866449+barloff-st@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs inventory inventory plugin plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants