|
1 | 1 | ---
|
2 |
| -- debug: |
3 |
| - msg: Deploy CrowdStrike Falcon Sensor |
4 |
| - |
5 |
| - |
6 |
| -- name: Install CrowdStrike Falcon Sensor |
| 2 | +- name: Install CrowdStrike Falcon Sensor (Linux) |
| 3 | + become: true |
7 | 4 | block:
|
8 | 5 | - include_role:
|
9 | 6 | name: newrelic.crowdstrike_provision.install_crowdstrike_falcon
|
10 |
| - become: true |
11 | 7 | vars:
|
12 | 8 | falcon_client_id: "{{ lookup('env', 'CROWDSTRIKE_CLIENT_ID') }}"
|
13 | 9 | falcon_client_secret: "{{ lookup('env', 'CROWDSTRIKE_CLIENT_SECRET') }}"
|
14 | 10 | falcon_customer_id: "{{ lookup('env', 'CROWDSTRIKE_CUSTOMER_ID') }}"
|
15 | 11 | api_base_url: "https://api.laggar.gcw.crowdstrike.com"
|
| 12 | + when: ansible_facts['os_family'] != 'Windows' |
16 | 13 |
|
17 |
| -- name: Validate sensor is running |
18 |
| - shell: ps -e | grep falcon-sensor | grep -v grep | wc -l |
19 |
| - register: is_sensor_running |
| 14 | +- name: Install CrowdStrike Falcon Sensor (Windows) |
20 | 15 | become: true
|
21 |
| - |
22 |
| -- name: Ensure Falcon is started |
23 |
| - ansible.builtin.fail: |
24 |
| - msg: falcon-sensor is not running |
25 |
| - when: is_sensor_running.stdout|int == 0 |
| 16 | + become_method: runas |
| 17 | + become_user: SYSTEM |
| 18 | + block: |
| 19 | + - ansible.windows.win_file: |
| 20 | + path: C:\\Users\ansible\Downloads |
| 21 | + state: directory |
| 22 | + - include_role: |
| 23 | + name: newrelic.crowdstrike_provision.install_crowdstrike_falcon |
| 24 | + vars: |
| 25 | + falcon_client_id: "{{ lookup('env', 'CROWDSTRIKE_CLIENT_ID') }}" |
| 26 | + falcon_client_secret: "{{ lookup('env', 'CROWDSTRIKE_CLIENT_SECRET') }}" |
| 27 | + falcon_customer_id: "{{ lookup('env', 'CROWDSTRIKE_CUSTOMER_ID') }}" |
| 28 | + api_base_url: "https://api.laggar.gcw.crowdstrike.com" |
| 29 | + when: ansible_facts['os_family'] == 'Windows' |
0 commit comments