-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy_crowdstrike.yml
30 lines (30 loc) · 1.05 KB
/
deploy_crowdstrike.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
---
- name: Playbook to deploy crowdstrike
hosts: "{{ match_host }}"
become: yes
handlers:
- name: start and enable falcon-sensor service
service:
name: falcon-sensor
state: started
enabled: yes
tasks:
- name: determine whether crowdstrike is already installed
command: dpkg-query -W falcon-sensor
register: falcon_sensor_check_deb
failed_when: falcon_sensor_check_deb.rc > 1
changed_when: falcon_sensor_check_deb.rc == 1
- name: download crowdstrike installer
get_url:
url: "{{ crowdstrike_http_url }}"
dest: /tmp/
mode: '0755'
register: download
when: falcon_sensor_check_deb.rc == 1
- name: Install falcon-sensor
apt: deb="{{ download.dest }}"
when: falcon_sensor_check_deb.rc == 1
- name: Configure crowdstrike CID
command: "/opt/CrowdStrike/falconctl -s --cid={{ CID }}"
when: falcon_sensor_check_deb.rc == 1
notify: start and enable falcon-sensor service