Skip to content

Commit 60d5ef6

Browse files
Documentation updates (#19)
* chore(docs): update RBAC permission names * fix(win): molecule vm timing out during creation * chore(win): add latest windows versions, update return codes * chore(win): use agent versions defined in `s1_product_id` for automated tests
1 parent a19d969 commit 60d5ef6

File tree

15 files changed

+116
-49
lines changed

15 files changed

+116
-49
lines changed

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -80,19 +80,19 @@ The various roles in this collection access the SentinelOne Management Console v
8080

8181
Create a `Ansible Service Accounts` role in the SentinelOne Management console and grant it the permissions:[^2]
8282

83-
* Accounts View
84-
* Endpoints Show Passphrase
85-
* Endpoints Uninstall
86-
* Endpoints Update Software
87-
* Endpoints View
88-
* Groups View
89-
* Local Upgrade Authorization Edit
90-
* Local Upgrade Authorization View
91-
* Packages
92-
* Roles View
93-
* Sites View
94-
95-
[^1]: See the SentinelOne KnowledgeBase article [Generating API Tokens](https://support.sentinelone.com/hc/en-us/articles/360004195934).
83+
* Endpoints > Show Passphrase
84+
* Endpoints > Uninstall
85+
* Endpoints > Update Software
86+
* Endpoints > View
87+
* Accounts > View
88+
* Agent Packages > View
89+
* Groups > View
90+
* Local Upgrade Authorization > Edit
91+
* Local Upgrade Authorization > View
92+
* Roles > View
93+
* Sites > View
94+
95+
[^1]: See the SentinelOne KnowledgeBase article [Generating API Tokens](https://community.sentinelone.com/s/article/000005262).
9696
[^2]: This is a cumulative list of permissions required by the collection as a whole. If you wish to use a separate Service Account for each Ansible Role, see that role's README for a list of required permissions.
9797

9898
Then add your Service Users to the `Ansible Service Accounts` role and scope it to the appropriate Site/Account/Group.
@@ -165,4 +165,4 @@ Endpoints need to trust the management console's self-signed certificate before
165165
* For domain joined systems, Group Policy can be used to add custom certificates to the trusted store.
166166
* The official [ansible.windows.win_certificate_store](https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_certificate_store_module.html) module can manage certificates in the trusted store.
167167

168-
[^3]: See the [Release Notes](https://support.sentinelone.com/hc/en-us/articles/10814416011543-22-4-Linux-Agent-Release-Notes)
168+
[^3]: See the [Release Notes](https://community.sentinelone.com/s/article/000005011)

extensions/molecule/common/templates/prepare-basic.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,9 @@
1212
file: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/molecule/common/templates/tasks/prepare_package_manager.yml"
1313
when:
1414
- ansible_system == 'Linux'
15+
16+
- name: Include tasks to set agent version | Windows
17+
ansible.builtin.include_tasks:
18+
file: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/molecule/common/templates/tasks/set_agent_version.yml"
19+
when:
20+
- ansible_os_family == 'Windows'

extensions/molecule/common/templates/prepare-install-agent.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@
1313
when:
1414
- ansible_system == 'Linux'
1515

16+
- name: Include tasks to set agent version | Windows
17+
ansible.builtin.include_tasks:
18+
file: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/molecule/common/templates/tasks/set_agent_version.yml"
19+
vars:
20+
s1_product_id_index: 1
21+
when:
22+
- ansible_os_family == 'Windows'
23+
1624
- name: Include tasks to install agent
1725
ansible.builtin.include_tasks:
1826
file: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/molecule/common/templates/tasks/install_s1_agent.yml"
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
- name: Include Windows vars | Windows
3+
ansible.builtin.include_vars:
4+
file: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/../roles/s1_agent_common/vars/windows.yml"
5+
6+
- name: Set s1_agent_version to a version supported by the collection | Windows
7+
set_fact:
8+
s1_agent_version: >-
9+
{{
10+
(
11+
s1_product_id
12+
| dict2items
13+
| selectattr('key', 'search', ansible_facts.architecture | replace('-','_'))
14+
| map(attribute="key")
15+
| map('regex_replace', '^v', '')
16+
| map('regex_replace', '_(64|32)_bit$', '')
17+
| map('regex_replace', '_', '.')
18+
| sort(reverse=true)
19+
| list
20+
)[s1_product_id_index | default(0)]
21+
}}
22+
cacheable: true
23+
24+
- name: Desired Agent Version | Windows
25+
ansible.builtin.debug:
26+
var: s1_agent_version

extensions/molecule/default/molecule.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ platforms:
2020
box: ${S1_VAGRANT_REPO:-roboxes}/${S1_VAGRANT_DISTRO:-rocky8}
2121
memory: 4096
2222
cpus: 2
23+
instance_raw_config_args:
24+
- "vm.boot_timeout = 1800"
2325
config_options:
2426
synced_folder: false
2527
provider_options:

extensions/molecule/upgrade/prepare.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,20 @@
1515
when:
1616
- ansible_system == 'Linux'
1717

18+
- name: Include tasks to set agent version | Windows
19+
ansible.builtin.include_tasks:
20+
file: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/molecule/common/templates/tasks/set_agent_version.yml"
21+
vars:
22+
s1_product_id_index: 1
23+
1824
- name: Include tasks to install agent
1925
ansible.builtin.include_tasks:
2026
file: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/molecule/common/templates/tasks/install_s1_agent.yml"
27+
28+
- name: Include tasks to set agent version | Windows
29+
ansible.builtin.include_tasks:
30+
file: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/molecule/common/templates/tasks/set_agent_version.yml"
31+
vars:
32+
s1_product_id_index: 0
33+
when:
34+
- ansible_os_family == 'Windows'

roles/s1_agent_common/vars/windows.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,15 @@ s1_reboot_handler_name: Reboot Node | {{ ansible_os_family }}
1111
s1_agent_win_file_ver: '{{ "v" + (s1_agent_version + "_" + ansible_facts.architecture) | regex_replace("[\.-]", "_") }}'
1212

1313
# Return codes from SentinelOneInstaller.exe that indicate a successful install or upgrade (a reboot may still be required)
14+
# See: https://community.sentinelone.com/s/article/000008704
1415
s1_new_exe_return_codes:
1516
- 0
1617
- 12
1718
- 100
1819
- 101
20+
- 102
1921
- 103
22+
- 104
2023
- 1000
2124

2225
s1_msi_return_codes:
@@ -25,6 +28,13 @@ s1_msi_return_codes:
2528

2629
# The same Product ID is used for MSI and SentinelOneInstaller packages
2730
s1_product_id:
31+
v24_2_3_471_64_bit: "{A5AF5827-A2A0-4C8B-8ED1-48A148346399}"
32+
v24_1_5_277_64_bit: "{38CCB1A1-E333-4D19-A6FA-C4CE60A2EAD3}"
33+
v24_1_4_257_64_bit: "{EA080DF7-C45B-4BAF-AAD7-16FB66D11F92}"
34+
v23_4_6_347_64_bit: "{9627E5DD-DA35-4A04-B2D6-A996A5A112C9}"
35+
v23_4_6_347_32_bit: "{33FBF92A-8041-42F8-84EE-985FC9E4F418}"
36+
v23_4_5_337_64_bit: "{7A1543A2-CF5C-45B2-855F-EA52A2D96B39}"
37+
v23_4_5_337_32_bit: "{8D06246A-6F57-470F-83D0-F26048983874}"
2838
v23_4_4_223_64_bit: "{40CB8880-CA0E-416E-8C0D-9C3015E0EEA8}"
2939
v23_4_4_223_32_bit: "{5EAD8636-B65F-469B-BB60-E1FB33B1C8DC}"
3040
v23_3_4_320_64_bit: "{25F6C9CB-D50A-474B-9358-E94A6C444BAC}"

roles/s1_agent_download/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ A valid SentinelOne license, access to the SentinelOne Management Console and an
1414

1515
In order to successfully query and download packages via the API, the account associated with the API token, `s1_api_token`, must be granted the permissions:
1616

17-
* Accounts View
18-
* Groups View
19-
* Packages
20-
* Roles View
21-
* Sites View
17+
* Accounts > View
18+
* Groups > View
19+
* Agent Packages > View
20+
* Roles > View
21+
* Sites > View
2222

2323
Best practice is to create a new "Download packages via API" role with these permissions. Then create a **Service User** and add them to the role.
2424

@@ -36,7 +36,7 @@ s1_api_token:
3636
3737
This is mandatory and is the API token[^1] associated with the user which will running the role.
3838
39-
[^1]: See the SentinelOne KnowledgeBase article [Generating API Tokens](https://support.sentinelone.com/hc/en-us/articles/360004195934).
39+
[^1]: See the SentinelOne KnowledgeBase article [Generating API Tokens](https://community.sentinelone.com/s/article/000005262).
4040
4141
### Configuring the version of the agent
4242

roles/s1_agent_install/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The `s1_agent_install` role installs the SentinelOne Agent on endpoints.
99

1010
A valid SentinelOne license, access to the SentinelOne Management Console and access to the SentinelOne installation packages are required.
1111

12-
Inventory hosts on which the agent is being installed must be running on a supported Operating System and meet its [minimum system requirements](https://support.sentinelone.com/hc/en-us/articles/360004196614-System-Requirements).
12+
Inventory hosts on which the agent is being installed must be running on a supported Operating System and meet its [minimum system requirements](https://community.sentinelone.com/s/topic/0TO69000000as1iGAA/system-requirements).
1313

1414
## Role Variables
1515

@@ -25,7 +25,7 @@ s1_api_token:
2525
2626
This is mandatory and is the API token[^1] associated with the user which will running the role.
2727
28-
[^1]: See the SentinelOne KnowledgeBase article [Generating API Tokens](https://support.sentinelone.com/hc/en-us/articles/360004195934).
28+
[^1]: See the SentinelOne KnowledgeBase article [Generating API Tokens](https://community.sentinelone.com/s/article/000005262).
2929
3030
```yaml
3131
s1_agent_site_token:
@@ -112,7 +112,8 @@ s1_no_config_failures: false
112112
Set the SentinelOneInstaller package `--dont_fail_on_config_preserving_failures` flag for the upgrade.
113113

114114
When set to true set the installer packages VDI flag to true and install the SentinelOne agent for a "cold clone".
115-
Note: See [https://support.sentinelone.com/hc/en-us/articles/360035087333](https://support.sentinelone.com/hc/en-us/articles/360035087333.).
115+
Note: See [https://community.sentinelone.com/s/article/000005519](https://community.sentinelone.com/s/article/000005519.).
116+
Note: See [https://community.sentinelone.com/s/article/000005519(https://community.sentinelone.com/s/article/000005519).
116117

117118
### Variables from dependencies
118119

roles/s1_agent_install/defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ s1_agent_site_token: "{{ undef(hint='You must specify your agent Site Token') }}
5151
# s1_no_config_failures: no
5252

5353
# If true set the installer's VDI flag to true and install the SentinelOne agent for a "cold clone".
54-
# Note: See https://support.sentinelone.com/hc/en-us/articles/360035087333.
54+
# Note: See https://community.sentinelone.com/s/article/000005519
5555
# Default: False
5656
# Windows Only
5757
# s1_enable_vdi: false

0 commit comments

Comments
 (0)