Skip to content

Commit e02d66c

Browse files
committed
fix molecule configuration
1 parent 213fcf9 commit e02d66c

File tree

2 files changed

+30
-4
lines changed

2 files changed

+30
-4
lines changed

molecule/default/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Testing
2+
3+
In order to test the role you'll need Ansible, Molecule and a supported provider such as Vagrant.
4+
5+
If you also want to test registration, add the following line to [`converge.yml`](converge.yml):
6+
7+
```yml
8+
sentinelone_token: "..."
9+
```
10+
11+
Copy the SentinelONE installation files (`sentinelone_latest.deb`, `sentinelone_latest.rpm`) into this directory and run `molecule`:
12+
13+
```shell
14+
$ molecule create
15+
$ molecule converge
16+
```

molecule/default/converge.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
---
22
- name: Converge
33
hosts: all
4-
tasks:
5-
- name: Include sentinelone_client
6-
include_role:
7-
name: sentinelone_client
4+
pre_tasks:
5+
- name: Set SentinelONE client installation file (Debian)
6+
ansible.builtin.set_fact:
7+
file_sentinelone: sentinelone_latest.deb
8+
when: ansible_os_family == 'Debian'
9+
10+
- name: Set SentinelONE client installation file (Red Hat)
11+
ansible.builtin.set_fact:
12+
file_sentinelone: sentinelone_latest.rpm
13+
when: ansible_os_family == 'RedHat'
14+
15+
roles:
16+
- role: stdevel.sentinelone_client
17+
sentinelone_filename: "{{ file_sentinelone }}"

0 commit comments

Comments
 (0)