sva.sentinelone.sentinelone_sites module – Manage SentinelOne Sites

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_sites.

New in sva.sentinelone 1.0.0

Synopsis

  • This module is able to create, update and delete sites in SentinelOne

Requirements

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

  • deepdiff >= 5.6

Parameters

Parameter

Comments

console_url

string / required

Insert your management console URL

description

string

Description for the site

Default: ""

expiration_date

string

Sets the expiration date

Use -1 (default) to set to max expiration available. This is either unlimited or account expiration date.

Format is ISO 8601 without microseconds

Examples:

2022-03-15T10:20+00:00

2022-03-15T11:21+0100

Default: "-1"

license_type

string

The SKU to use

Choices:

  • "core" ← (default)

  • "control"

  • "complete"

name

string / required

The name of the site

site_type

string

The type of the site

Choices:

  • "Trial"

  • "Paid" ← (default)

state

string

Select the state of the site

Choices:

  • "present" ← (default)

  • "absent"

token

string / required

SentinelOne API auth token to authenticate at the management API

total_agents

integer

Count of total agent licenses to be assigned to site

Use -1 (default) to set to unlimited licenses in site

Default: -1

Notes

Note

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

  • Currently only supported in single-account management consoles

  • Policy is always inherited from Account scope. If you want to change the policy please use sentinelone_policies module

Examples

---
- name: Create / update site
  sva.sentinelone.sentinelone_sites:
    console_url: "https://XXXXX.sentinelone.net"
    token: "XXXXXXXXXXXXXXXXXXXXXXXXXXX"
    name: "test"
    license_type: "control"
    expiration_date: "2022-06-01T12:00+01:00"
    description: "Testsite"
- name: Delete site
  sva.sentinelone.sentinelone_sites:
    state: "absent"
    console_url: "https://XXXXX.sentinelone.net"
    token: "XXXXXXXXXXXXXXXXXXXXXXXXXXX"
    name: "test"

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 changes made

Returned: on success

Sample: "Site exists but is not up-to-date. Updating site."

original_message

string

Get detailed infos about the changes made

Returned: on success

Sample: "{'changes': {'values_changed': {\"root['description']\": {'new_value': 'Test1', 'old_value': 'Test'}, \"root['unlimitedExpiration']\": {'new_value': True, 'old_value': False}}}, 'siteName': 'test'}"

Authors

  • Marco Wester (@mwester117)