Skip to content

Commit

Permalink
Add ability to disable GPG check. Add ability to declare customer_id (#9
Browse files Browse the repository at this point in the history
)

* Add ability to disable GPG check. Add ability to declare customer_id

* Rename variable

* Change customer_id item

* Update main.yml

Fix typo

---------

Co-authored-by: Christian Stankowic <[email protected]>
  • Loading branch information
Varrkan82 and stdevel authored Sep 26, 2024
1 parent 41b25c9 commit d4b8a83
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
sentinelone_client_token: ''
sentinelone_client_gpgkey: ''
sentinelone_client_force_new_token: false
sentinelone_client_customer_id: ''
zypper_disable_gpg_check: 'false'
1 change: 1 addition & 0 deletions tasks/install_suse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@
- name: Install package
community.general.zypper:
name: "/tmp/{{ sentinelone_client_filename | basename }}"
disable_gpg_check: {{ zypper_disable_gpg_check }}
become: true
when: sentinelone_client_digest is not defined
7 changes: 7 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@
notify: Create initialization file
when: sentinelone_client_token is defined and sentinelone_client_token != ''

- name: Set SentinelOne customer_id
ansible.builtin.command: "/opt/sentinelone/bin/sentinelctl management customer_id set {{ sentinelone_client_customer_id }}"
register: customer_id_output
changed_when: "'customer id successfully set' in customer_id_output.stdout|lower"
become: true
when: sentinelone_client_customer_id | length > 0

- name: Start agent
ansible.builtin.command: /opt/sentinelone/bin/sentinelctl control start
register: start_output
Expand Down

0 comments on commit d4b8a83

Please sign in to comment.