Skip to content

Commit

Permalink
[PR #6352/0eb33c28 backport][stable-6] Add support env variables for …
Browse files Browse the repository at this point in the history
…nmap inventory plugin (#6394)

Add support env variables for nmap inventory plugin (#6352)

* Add support env variables for nmap inventory plugin

* Add  changelogs/fragments file

* Rename support-env-variables-to-nmap-dynamic-inventoiry to 6351-support-env-variables-to-nmap-dynamic-inventoiry

* Add extension for changelog file

* Fix #6352 (comment)

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

* Fix #6352 (comment)

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

* Fix #6352 (comment)

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

* Fix #6352 (comment)

* Fix linter

* Fix #6352 (comment)

* Fix changelog fragment.

---------

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

Co-authored-by: efrikin <sadeless@gmail.com>
  • Loading branch information
patchback[bot] and efrikin authored Apr 23, 2023
1 parent 57f2625 commit 46a83df
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- nmap inventory plugin - added environment variables for configure ``address`` and ``exclude`` (https://github.com/ansible-collections/community.general/issues/6351).
10 changes: 9 additions & 1 deletion plugins/inventory/nmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,18 @@
address:
description: Network IP or range of IPs to scan, you can use a simple range (10.2.2.15-25) or CIDR notation.
required: true
env:
- name: ANSIBLE_NMAP_ADDRESS
version_added: 6.6.0
exclude:
description: list of addresses to exclude
description:
- List of addresses to exclude.
- For example C(10.2.2.15-25) or C(10.2.2.15,10.2.2.16).
type: list
elements: string
env:
- name: ANSIBLE_NMAP_EXCLUDE
version_added: 6.6.0
port:
description:
- Only scan specific port or port range (C(-p)).
Expand Down

0 comments on commit 46a83df

Please sign in to comment.