This Ansible Galaxy role installs and configures the Nuclei Scanner, a powerful tool for vulnerability scanning and configuration management.
- Supported Operating Systems: Linux (e.g., Ubuntu, CentOS) , Windows and Mac
- Dependencies:
unzip
package must be available on the system.
Available variables are listed below, along with their default values:
nuclei_download_url: "https://github.com/projectdiscovery/nuclei/releases/latest/download/nuclei.zip"
nuclei_install_path: "/usr/local/bin"
nuclei_data_path: "/opt/nuclei-templates"
This role has no specific dependencies.
---
- name: Install and run nuclei
hosts: target-machines
become: true
roles:
- nuclei
for ansible.cfg
[default]
inventory = ./inventory.ini
remote_user = root
log_path = ./log/ansible.log
[privilege_escalation]
become = true
become_user = root
become_method = sudo
for inventory.ini
file
[target-machines]
192.168.56.10 ansible_user=root
192.168.56.11 ansible_user=root
- Downloads the Nuclei binary ZIP file from the specified URL.
- Extracts the binary to the defined installation path.
- Ensures the installation directory exists.
- Downloads the latest Nuclei templates to the defined data path.
- Updates templates if they already exist.
- Provides a simple wrapper for running the
nuclei
binary with specific options.
After installing the role, you can run Nuclei as follows:
nuclei -u http://example.com -t /opt/nuclei-templates
MIT
This role was created by DannyRavi.