Skip to content

Ansible plugin

Ansible is a powerful automation tool used by system administrators and developers to manage and deploy software configurations across multiple hosts. By using plugins, Ansible's capabilities can be significantly extended.

Vulners Ansible Plugin enhances Ansible by adding vulnerability scanning feature for Linux hosts, utilizing the comprehensive Vulners database.

This guide assumes a basic understanding of Ansible operations.

Getting Started with Vulners Ansible Plugin

  1. Generate API key
  2. Specify the API key in .vulners.ansible.env or any other way. Module help:

    options:
            vulners_api_key:
                description: You key for Vulners API (obtain one at https://vulners.com/)
                vars:
                  - name: api_key
            vulners_api_key_file:
                description: Location of your file with your key for Vulners API (obtain one at https://vulners.com/)
                vars:
                  - name: api_key_file
    

  3. Use the Ansible Galaxy command to install the Vulners Ansible plugin:

    ansible-galaxy collection install vulnerscom.vulners_ansible_plugin:0.0.1
    
    Vulners plugin start

  4. Edit the list of hosts to be monitored by the plugin in /etc/ansible/hosts:

    vi /etc/ansible/hosts
    
    10.0.10.3
    10.0.10.6
    10.0.10.9
    webgoat.io:2222 ansible_user=test
    127.0.0.1:2223 ansible_user=test
    

  5. Launch the Vulners Ansible plugin to begin the vulnerability scan across your configured hosts: Vulners plugin start

  6. The scanning results are saved in JSON and HTML formats for comprehensive review and analysis::

    /tmp/vulners_ansible_result.json
    /tmp/vulners_ansible_result.html
    
    Vulners plugin json 1 Vulners plugin json 2

Back to top