-
Notifications
You must be signed in to change notification settings - Fork 2
/
init.pp
59 lines (58 loc) · 1.67 KB
/
init.pp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#
# @summary Manage an installation of the SentinelOne Agent
#
# @example
# class { 'sentinelone_agent':
# token => 'abc123',
# }
#
# @param logrotate_ensure
# Ensure whether the logrotate file is present or not (default: 'present').
#
# @param manage_logrotate
# Decide whether to manage the logrotate configuration for the service (default: true).
#
# @param manage_package
# Decide whether to manage the package (default: true).
#
# @param manage_service
# Decide whether to manage the service (default: true).
#
# @param package_ensure
# Ensure the state of the package (default: 'installed').
#
# @param package_name
# The name of the SentinelOne agent package (default: 'SentinelAgent').
#
# @param proxy_url
# The URL to use as an HTTP proxy
#
# @param service_enable
# Decide whether to enable the service (default: true).
#
# @param service_ensure
# Ensure the state of the service (default: 'running').
#
# @param service_name
# The name of the SentinelOne agent service (default: 'sentinelone').
#
# @param token
# The token to be used by the SentinelOne agent (no default, but required)
#
class sentinelone_agent (
Enum['absent', 'present'] $logrotate_ensure,
Boolean $manage_logrotate,
Boolean $manage_package,
Boolean $manage_service,
Variant[Enum['absent', 'installed', 'latest'], Pattern[/^(\d+\.){3}\d+$/]] $package_ensure,
String $package_name,
Optional[String] $proxy_url,
Boolean $service_enable,
Enum['running', 'stopped'] $service_ensure,
String $service_name,
String $token,
) {
contain 'sentinelone_agent::install'
contain 'sentinelone_agent::service'
Class['sentinelone_agent::install'] ~> Class['sentinelone_agent::service']
}