Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
stdevel committed Oct 27, 2022
1 parent 89b025f commit 213fcf9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
- name: Create initialization file
file:
ansible.builtin.file:
path: /opt/sentinelone/.INITIALIZATION_COMPLETE
owner: root
group: root
Expand Down
2 changes: 1 addition & 1 deletion tasks/install_debian.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
- name: Install package
apt:
ansible.builtin.apt:
deb: "/tmp/{{ sentinelone_filename | basename }}"
update_cache: true
become: true
2 changes: 1 addition & 1 deletion tasks/install_redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Yep, we really need to use rpm directly as yum/dnf
# won't install packages without digests
- name: Install package
command: "rpm -ivh --nodigest /tmp/{{ sentinelone_filename | basename }}"
ansible.builtin.command: "rpm -ivh --nodigest /tmp/{{ sentinelone_filename | basename }}"
register: rpmout
changed_when:
- "'Updating / installing' in rpmout.stdout"
Expand Down
13 changes: 7 additions & 6 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,33 @@
---
- name: Include distribution-specific variables
include_vars: "{{ ansible_os_family | regex_replace(' ', '_') | lower }}.yml"
ansible.builtin.include_vars: "{{ ansible_os_family | regex_replace(' ', '_') | lower }}.yml"

- name: Download installation package
get_url:
ansible.builtin.get_url:
url: "{{ sentinelone_filename }}"
dest: "/tmp/{{ sentinelone_filename | basename }}"
mode: 0644
when: "'http' in sentinelone_filename"

- name: Copy installation package
copy:
ansible.builtin.copy:
src: "{{ sentinelone_filename }}"
dest: "/tmp/{{ sentinelone_filename | basename }}"
mode: '0644'
when: "'http' not in sentinelone_filename"


- name: Include installation tasks
include_tasks: "install_{{ ansible_os_family | regex_replace(' ', '_') | lower }}.yml"
ansible.builtin.include_tasks: "install_{{ ansible_os_family | regex_replace(' ', '_') | lower }}.yml"

- name: Set Group/Site token
command: "/opt/sentinelone/bin/sentinelctl management token set {{ sentinelone_token }}"
ansible.builtin.command: "/opt/sentinelone/bin/sentinelctl management token set {{ sentinelone_token }}"
args:
creates: /opt/sentinelone/.INITIALIZATION_COMPLETE
become: true
notify: Create initialization file
when: sentinelone_token is defined and sentinelone_token != ''

- name: Start agent
command: /opt/sentinelone/bin/sentinelctl control start
ansible.builtin.command: /opt/sentinelone/bin/sentinelctl control start
become: true

0 comments on commit 213fcf9

Please sign in to comment.