sva.sentinelone.sentinelone_download_agent module – Download SentinelOne agent from Management Console

Note

This module is part of the sva.sentinelone collection (version 2.0.5).

It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install sva.sentinelone. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: sva.sentinelone.sentinelone_download_agent.

New in sva.sentinelone 1.1.0

Synopsis

  • This module is able to download a SentinelOne agent from Management Console

Requirements

The below requirements are needed on the host that executes this module.

  • deepdiff >= 5.6

Parameters

Parameter

Comments

agent_version

string

Version of the agent to be downloaded.

latest (default) - download latest GA (stable) release for the specified parameters

latest_ea - same as latest, but also includes EA packages

custom - custom_version is required when agent_versioin is custom

Choices:

  • "latest" ← (default)

  • "latest_ea"

  • "custom"

architecture

string

Architecture of the packet which should be downloaded

Windows: Only 32_bit and 64_bit are allowed

Linux: If not set 64 bit agent will be downloaded. If set to aarch64 the ARM agent will be downloaded

Choices:

  • "32_bit"

  • "64_bit" ← (default)

  • "aarch64"

console_url

string / required

Insert your management console URL

custom_version

string

Explicit version of the file to be downloaded

Has to be set when agent_version=custom

Will be ignored if agent_version is not custom

download_dir

string

Set the path where the agent should be downloaded.

If not set the agent will be downloaded to the working directory.

If the directory does not exists it will be created

Default: "./"

os_type

string / required

The type of the OS for which the agent should be downloaded

Choices:

  • "Linux"

  • "Windows"

packet_format

string / required

The format of the packet which should be downloaded

Choices:

  • "rpm"

  • "deb"

  • "msi"

  • "exe"

site

string

Name of the site from which to download the agent

If omitted the scope will be on account level

token

string / required

SentinelOne API auth token to authenticate at the management API

Notes

Note

  • Python module deepdiff. Tested with version >=5.6. Lower version may work too

  • Currently only supported in single-account management consoles

Examples

---
- name: Download latest agent for linux
  sva.sentinelone.sentinelone_download_agent:
    console_url: "https://XXXXX.sentinelone.net"
    token: "XXXXXXXXXXXXXXXXXXXXXXXXXXX"
    os_type: "Linux"
    packet_format: "rpm"
    download_path: "/tmp"
    architecture: "64_bit"
- name: Download latest agent for linux and include EA packages
  sva.sentinelone.sentinelone_download_agent:
    console_url: "https://XXXXX.sentinelone.net"
    token: "XXXXXXXXXXXXXXXXXXXXXXXXXXX"
    os_type: "Linux"
    packet_format: "rpm"
    download_path: "/tmp"
    architecture: "64_bit"
    agent_version: "latest_ea"
- name: Download specific agent version
  sva.sentinelone.sentinelone_download_agent:
    console_url: "https://XXXXX.sentinelone.net"
    token: "XXXXXXXXXXXXXXXXXXXXXXXXXXX"
    os_type: "Windows"
    packet_format: "msi"
    architecture: "64_bit"
    agent_version: "custom"
    custom_version: "23.2.3.358"

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

message

string

Get basic infos about the downloaded package in an human readable format

Returned: on success

Sample: "Downloaded file SentinelInstaller_windows_64bit_v23_2_3_358.msi to ./"

original_message

string

Get detailed infos about the downloaded package

Returned: on success

Sample: "{'download_path': './', 'filename': 'SentinelInstaller_windows_64bit_v23_2_3_358.msi', 'full_path': './SentinelInstaller_windows_64bit_v23_2_3_358.msi'}"

Authors

  • Marco Wester (@mwester117)

  • Erik Schindler (@mintalicious)