badsectorlabs.ludus_elastic_agent

Ansible Role: Elastic Agent Deployment

This Ansible role installs Elastic Agents on Windows, Debian, and Ubuntu systems.

Description

  • The role checks if the Elastic Agents are already downloaded to the Ludus host. If not, it will try to download them based on the ludus_elastic_agent_version variable.
  • You can find agent versions here.
  • The role supports Windows, Debian, and Ubuntu systems.
  • This role works alongside the ludus_elastic_container.

Warning:

  • The --force flag is used during installation. It replaces any existing installation and doesn’t ask for confirmation.
  • The --insecure flag ignores any self-signed certificates during installation.

Requirements

No additional requirements.

Role Variables

Here are the available variables with their default values (found in defaults/main.yml):

  • ludus_elastic_enrollment_token: Used for console output and accessible via Kibana UI and /opt/{{ ludus_elastic_container_install_path }}/enrollment_token.txt. Default is empty.
  • ludus_elastic_fleet_server: IP address and port of your Elastic server (default is 8220). You can get the IP address from ludus range status. Default is empty.
  • ludus_elastic_agent_version: Specify a valid version of the agent to download and install. Default is empty.

Dependencies

No dependencies.

Example Playbook

- hosts: elastic-agent
  roles:
    - badsectorlabs.ludus_elastic_agent
  role_vars:
    ludus_elastic_enrollment_token: "<TOKEN>"
    ludus_elastic_fleet_server: "https://<IP>:8220" # default port is 8220
    ludus_elastic_agent_version: "8.12.2"

Example Ludus Range Config

ludus:
  - vm_name: "{{ range_id }}-jumpbox01"
    hostname: "{{ range_id }}-jumpbox01"
    template: debian-12-x64-server-template
    vlan: 20
    ip_last_octet: 25
    ram_gb: 4
    cpus: 2
    linux: true
    testing:
      snapshot: false
      block_internet: false
    roles:
      - badsectorlabs.ludus_elastic_agent # role_vars are not needed with ludus

Ludus Setup Steps

  1. Add the role to your Ludus host:

    ludus ansible roles add badsectorlabs.ludus_elastic_agent
    
  2. Get your configuration into a file:

    ludus range config get > config.yml
    
  3. Edit the configuration file to add the role to the VMs you want to set up as Elastic servers.

  4. Deploy the range using the user-defined roles only:

    ludus range deploy -t user-defined-roles
    

License

GPLv3

Author Information

This role was created by Bad Sector Labs for Ludus. Contributions are welcome.

Informazioni sul progetto

Installs an Elastic Agent on a windows, debian or ubuntu target

Installa
ansible-galaxy install badsectorlabs.ludus_elastic_agent
Licenza
gpl-3.0
Download
1.1k
Proprietario