Code Monkey home page Code Monkey logo

ansible-nessus-agent's Introduction

Ansible Nessus Agent module

This module, which is really just a script in the library folder, grabs and parses data from Tenable's downloads page to find the latest Nessus Agent package based on host machine info. The idea is that admins shouldn't need to manually download packages locally from Tenable's Downloads page and transfer them, but can instead rely on Ansible facts to automatically install/configure software across their hosts.

It's only been tested on Ubuntu, RHEL, and Amazon hosts, but should work for all of the Linux distributions that Tenable has Nessus Agents packages for. See ./run.yml for an idempotent example which downloads, installs, and configures Nessus Agents on a given inventory. Note, for this playbook you'd want to provide a value to nessus_key somewhere, like in the appropriate group_vars file, and assumes you don't want to force uninstall/install an existing working nessus agent to the latest version.

Example

Say you manage many hetereogenous hosts, all with different linux distributions and you want to configure some of them to use key1, under group1, and the rest to use key2 under group2. Instead of determining which Tenable Nessus Agent package to download and manually installing it on each of them (yuck), you can change the ./inventory/all.yml to define the two groups with the right config, like below, and just run ansible-playbook run.yml in this project's root directory to do all of that automatically. (We're assuming you've already made sure your SSH config and the ansible package is installed, of course.) If it's already installed/configured, no problem, this won't unenroll or disrupt your host's nessus service because it's been written to check if the agent's working already.

all:
  vars:
    agent_host: cloud.tenable.com 
    agent_port: 443
    nessus_key: "supersecretkeygoeshere"
  children:
    nessus1:
    nessus2:
nessus1:
  vars:
    agent_group: "tenablegroup1"
    nessus_key: "key1"
  hosts:
    host11:
    # ...
    host1n:
nessus2:
  vars:
    agent_group: "tenablegroup2"
    nessus_key: "key2"
  hosts:
    host21:
    # ...
    host2n:

Feel free to copy/modify and use the script.

ansible-nessus-agent's People

Contributors

gusmann avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.