From 78d3d2febbdaed097042fabdd1cf7cc5f2810bdd Mon Sep 17 00:00:00 2001 From: Markus Bergholz Date: Wed, 28 Apr 2021 20:34:35 +0200 Subject: [PATCH] update README --- README.md | 44 +++++++++++++++++++++++++++++++++++++---- plugins/modules/task.py | 6 +++++- 2 files changed, 45 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5d21d33..46842cb 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# [WIP] markuman.nessus Ansible Collection +# markuman.nessus Ansible Collection This Ansible Collection brings back Nessus Task Automation ✊ @@ -8,8 +8,8 @@ Since `post` and `put` api requests result in status code `412` using nessus on- ## Status -Currently only update target list of existing tasks is working. -This is helpfull, because you can throw your (dynamic) inventory files on an existing nessus task now. +Only the targets of an existing task (scan) can be modified! +The intention is, that you throw your dynamic inventories into nessus tasks/scans. ```yaml @@ -28,4 +28,40 @@ This is helpfull, because you can throw your (dynamic) inventory files on an exi * `ansible-galaxy collection install markuman.nessus` * `pip3 install selenium --user` - * Gecko Driver https://github.com/mozilla/geckodriver/releases install to `~/.local/bin/` \ No newline at end of file + * Gecko Driver https://github.com/mozilla/geckodriver/releases install to `~/.local/bin/` + +## Auth + +Just use your nessus username and password. + +| **Ansible Parameter** | **ENV Variable** | +| --- | --- | +| `username` | `NESSUS_USERNAME` | +| `password` | `NESSUS_PASSWORD` | + +# Usage + +## task + +| parameters | default | comment | +| --- | --- | --- | +| `name` | - | name of the nessus task | +| `purge` | `true` | Wether a existing targets should be replaced (`true`) or appended (`false`). Alias parameter are: `replace`, `overwrite`, `solo`. | +| `headless` | `true` | If set to (`false`), firefox will spawned. Good for debugging. | +| `host` | - | Host of your nessus installation (_without https://_) | +| `targets` | - | List of targets that should be present in the nessus task | +| `username` | - | Nessus Username. Environment `NESSUS_USERNAME` can be also used. | +| `password` | - | Nessus Password, Environment `NESSUS_PASSWIRD` can be also used. | + +# SCM + +| **host** | **category** | +| --- | --- | +| https://git.osuv.de/m/nessus | origin | +| https://gitlab.com/markuman/nessus | pull mirror, issues, MR | +| https://github.com/markuman/nessus | push mirror, issues, PR | + + +#### License + +GNU General Public License v3.0+ \ No newline at end of file diff --git a/plugins/modules/task.py b/plugins/modules/task.py index 5d484c9..dd90a5e 100644 --- a/plugins/modules/task.py +++ b/plugins/modules/task.py @@ -1,6 +1,10 @@ #!/usr/bin/python # -*- coding: utf-8 -*- +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# Part of ansible markuman.nessus collection + + DOCUMENTATION = ''' module: markuman.nessus.task short_description: create or modify nessus tasks @@ -12,7 +16,7 @@ EXAMPLES = ''' targets: - 10.0.0.1 - 10.0.0.32 - task: "183" + task: nessus task name host: nessus.mydomain.tld username: nessus_user password: nessus_password