Skip to content

Commit

Permalink
fix molecule configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
stdevel committed Oct 27, 2022
1 parent 213fcf9 commit e02d66c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 4 deletions.
16 changes: 16 additions & 0 deletions molecule/default/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Testing

In order to test the role you'll need Ansible, Molecule and a supported provider such as Vagrant.

If you also want to test registration, add the following line to [`converge.yml`](converge.yml):

```yml
sentinelone_token: "..."
```
Copy the SentinelONE installation files (`sentinelone_latest.deb`, `sentinelone_latest.rpm`) into this directory and run `molecule`:

```shell
$ molecule create
$ molecule converge
```
18 changes: 14 additions & 4 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
---
- name: Converge
hosts: all
tasks:
- name: Include sentinelone_client
include_role:
name: sentinelone_client
pre_tasks:
- name: Set SentinelONE client installation file (Debian)
ansible.builtin.set_fact:
file_sentinelone: sentinelone_latest.deb
when: ansible_os_family == 'Debian'

- name: Set SentinelONE client installation file (Red Hat)
ansible.builtin.set_fact:
file_sentinelone: sentinelone_latest.rpm
when: ansible_os_family == 'RedHat'

roles:
- role: stdevel.sentinelone_client
sentinelone_filename: "{{ file_sentinelone }}"

0 comments on commit e02d66c

Please sign in to comment.