Skip to content

Commit

Permalink
Add SUSE support (#3)
Browse files Browse the repository at this point in the history
* bump Vagrant boxes
* add openSUSE code
* fix linting
  • Loading branch information
stdevel authored Aug 18, 2023
1 parent 367968c commit 10887cb
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 4 deletions.
6 changes: 4 additions & 2 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ platforms:
- name: s1-ubuntu
box: generic/ubuntu2204
- name: s1-fedora
box: generic/fedora37
box: generic/fedora38
- name: s1-almalinux
box: almalinux/8
box: almalinux/9
- name: s1-opensuse
box: opensuse/Tumbleweed.x86_64
provisioner:
name: ansible
verifier:
Expand Down
19 changes: 19 additions & 0 deletions tasks/install_suse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
- name: Import GPG key
ansible.builtin.rpm_key:
key: "{{ sentinelone_gpgkey }}"
become: true
when: sentinelone_gpgkey

# Yep, we really need to use rpm directly as zypper
# won't install packages without digests
- name: Install package
ansible.builtin.command: "rpm -ivh --nodigest /tmp/{{ sentinelone_filename | basename }}"
register: rpmout
changed_when:
- "'Updating / installing' in rpmout.stdout"
failed_when:
- rpmout.failed
- "'is already installed' not in rpmout.stderr"
ignore_errors: true
become: true
5 changes: 3 additions & 2 deletions tests/test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
- hosts: localhost
- name: Run role
hosts: localhost
remote_user: root
roles:
- sentinelone_client
- role: stdevel.sentinelone_client
1 change: 1 addition & 0 deletions vars/suse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
---

0 comments on commit 10887cb

Please sign in to comment.