Skip to content

Commit 86e57fb

Browse files
fix ansible-lint errors
1 parent d043cc0 commit 86e57fb

File tree

9 files changed

+29
-29
lines changed

9 files changed

+29
-29
lines changed

roles/s1_agent_common/handlers/main.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
ansible.builtin.service:
66
name: "{{ s1_service_name }}"
77
state: started
8-
enabled: yes
9-
become: yes
8+
enabled: true
9+
become: true
1010
when:
1111
- (s1_agent_auto_start | default("yes")) | bool
1212

@@ -19,14 +19,14 @@
1919
until: "'Error: receive failed: Connection reset by peer' not in s1_ctl_control.stdout"
2020
retries: 15
2121
delay: 5
22-
become: yes
22+
become: true
2323
when:
2424
- (s1_agent_auto_start | default("yes")) | bool
2525

2626
- name: Reboot Endpoint | Windows
2727
ansible.windows.win_reboot:
2828
reboot_timeout: 3600
29-
become: yes
29+
become: true
3030
listen: Reboot Node | Windows
3131
when:
3232
- not s1_common_skip_reboot
@@ -37,7 +37,7 @@
3737
ansible.windows.win_shell: Start-Sleep -Seconds 5 ; Restart-Computer -Force
3838
async: 1
3939
poll: 0
40-
changed_when: yes
40+
changed_when: true
4141
listen: Reboot Node | Windows | Unit Testing
4242
when:
4343
- not s1_common_skip_reboot

roles/s1_agent_common/meta/main.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ galaxy_info:
1919
# - CC-BY-4.0
2020
license: license (GPL-3.0-or-later)
2121

22-
min_ansible_version: '2.9'
22+
min_ansible_version: "2.9"
2323

2424
# If this a Container Enabled role, provide the minimum Ansible Container version.
2525
# min_ansible_container_version:
@@ -33,9 +33,9 @@ galaxy_info:
3333
platforms:
3434
- name: EL
3535
versions:
36-
- '6'
37-
- '7'
38-
- '8'
36+
- "6"
37+
- "7"
38+
- "8"
3939
- name: Ubuntu
4040
versions:
4141
- trusty # 14.04
@@ -46,9 +46,9 @@ galaxy_info:
4646
- hirsute # 20.04
4747
- name: Windows
4848
versions:
49-
- '2016'
50-
- '2019'
51-
- '2022'
49+
- "2016"
50+
- "2019"
51+
- "2022"
5252

5353
galaxy_tags:
5454
- edr

roles/s1_agent_common/tasks/main.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
- name: Gather required facts
55
ansible.builtin.setup:
6-
gather_subset: '{{ default_gather_subset + (role_gather_subset | default([])) }}'
6+
gather_subset: "{{ default_gather_subset + (role_gather_subset | default([])) }}"
77
tags:
88
- s1_gather_facts
99

@@ -27,11 +27,11 @@
2727
- name: Endpoint details
2828
ansible.builtin.debug:
2929
msg:
30-
- 'Ansible Distribution: {{ ansible_distribution }}'
31-
- 'Ansible Distribution Version: {{ ansible_distribution_version }}'
32-
- 'Ansible Distribution Major Version: {{ ansible_distribution_major_version }}'
33-
- 'Ansible OS Family: {{ ansible_os_family }}'
34-
- 'Ansible System: {{ ansible_system }}'
30+
- "Ansible Distribution: {{ ansible_distribution }}"
31+
- "Ansible Distribution Version: {{ ansible_distribution_version }}"
32+
- "Ansible Distribution Major Version: {{ ansible_distribution_major_version }}"
33+
- "Ansible OS Family: {{ ansible_os_family }}"
34+
- "Ansible System: {{ ansible_system }}"
3535

3636
- name: Variables will be loaded from the first matching file in vars
3737
ansible.builtin.debug:
@@ -44,7 +44,7 @@
4444
- "{{ ansible_system | replace(' ', '_') | lower }}.yml"
4545

4646
- name: Set distribution variables
47-
ansible.builtin.include_vars: '{{ loop_vars }}'
47+
ansible.builtin.include_vars: "{{ loop_vars }}"
4848
with_first_found:
4949
- files:
5050
- "{{ ansible_distribution | lower | replace(' ', '_') }}_{{ ansible_distribution_version }}.yml"
@@ -53,11 +53,11 @@
5353
- "{{ ansible_os_family | replace(' ', '_') | lower }}_{{ ansible_distribution_major_version }}.yml"
5454
- "{{ ansible_os_family | replace(' ', '_') | lower }}.yml"
5555
- "{{ ansible_system | replace(' ', '_') | lower }}.yml"
56-
skip: yes
56+
skip: true
5757
paths:
58-
- 'vars'
58+
- vars
5959
loop_control:
6060
loop_var: loop_vars
61-
label: '{{ loop_vars | basename }}'
61+
label: "{{ loop_vars | basename }}"
6262
tags:
6363
- always

roles/s1_agent_common/vars/debian.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ s1_package_name: sentinelagent
66
# OS service manager name for the SentinelOne service
77
s1_service_name: sentinelone.service
88
# Name of the handler task to start the SentinelOne service
9-
s1_service_handler_name: 'Start SentinelOne service | {{ ansible_system }}'
9+
s1_service_handler_name: Start SentinelOne service | {{ ansible_system }}

roles/s1_agent_common/vars/main.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ apt_pkg_mgrs:
3535

3636
# Facts to gather for all roles
3737
default_gather_subset:
38-
- '!all'
39-
- '!hardware'
38+
- "!all"
39+
- "!hardware"
4040
- min

roles/s1_agent_common/vars/redhat.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ s1_package_name: SentinelAgent
66
# OS service manager name for the SentinelOne service
77
s1_service_name: sentinelone.service
88
# Name of the handler task to start the SentinelOne service
9-
s1_service_handler_name: 'Start SentinelOne service | {{ ansible_system }}'
9+
s1_service_handler_name: Start SentinelOne service | {{ ansible_system }}

roles/s1_agent_common/vars/redhat_6.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ s1_package_name: SentinelAgent
66
# OS service manager name for the SentinelOne service
77
s1_service_name: sentineld
88
# Name of the handler task to start the SentinelOne service
9-
s1_service_handler_name: 'Start SentinelOne service | {{ ansible_os_family }} {{ ansible_distribution_major_version }}'
9+
s1_service_handler_name: Start SentinelOne service | {{ ansible_os_family }} {{ ansible_distribution_major_version }}

roles/s1_agent_common/vars/suse.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ s1_package_name: SentinelAgent
66
# OS service manager name for the SentinelOne service
77
s1_service_name: sentinelone.service
88
# Name of the handler task to start the SentinelOne service
9-
s1_service_handler_name: 'Start SentinelOne service | {{ ansible_system }}'
9+
s1_service_handler_name: Start SentinelOne service | {{ ansible_system }}

roles/s1_agent_common/vars/windows.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ s1_package_name: Sentinel Agent
66
# OS service manager name for the SentinelOne service
77
s1_service_name: SentinelAgent
88
# Name of the handler task to restart the endpoint
9-
s1_reboot_handler_name: "Reboot Node | {{ ansible_os_family }}"
9+
s1_reboot_handler_name: Reboot Node | {{ ansible_os_family }}
1010
# Convert the package version to match the version reported by Windows
1111
s1_agent_win_file_ver: '{{ "v" + (s1_agent_version + "_" + ansible_facts.architecture) | regex_replace("[\.-]", "_") }}'
1212

0 commit comments

Comments
 (0)