Skip to content

Commit

Permalink
fix(falcon_install): fixes issue where failure to download wasn't app…
Browse files Browse the repository at this point in the history
…arent

Fixes #577

This PR adds better failure message when a user uses
falcon_sensor_version_decrement on newly supported linux OS's. Before,
it would just fail when trying to download a sensor with an incorrect
list index value.
  • Loading branch information
carlosmmatos committed Dec 13, 2024
1 parent f990d27 commit fa9ee91
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions roles/falcon_install/tasks/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,23 @@
register: falcon_api_installer_list
delegate_to: localhost

- name: CrowdStrike Falcon | Validate Sensor request
- name: CrowdStrike Falcon | Validate sensor request
ansible.builtin.fail:
msg: "No Falcon Sensor was found! If passing in falcon_sensor_version, ensure it is correct!"
msg: "No Falcon sensor was found! If passing in falcon_sensor_version, ensure it is correct!"
when: falcon_api_installer_list.installers[0] is not defined

- name: CrowdStrike Falcon | Validate available sensor count > decrement (if applicable)
ansible.builtin.assert:
that:
- falcon_api_installer_list.installers | length > falcon_sensor_version_decrement
fail_msg:
"Not enough sensor versions available for the specified decrement value: N-{{ falcon_sensor_version_decrement }}.
This may occur if your OS distribution/version is newly supported and fewer
historical sensor versions exist."
when:
- falcon_sensor_version_decrement is defined
- falcon_sensor_version_decrement > 0

- name: CrowdStrike Falcon | Ensure download path exists (local)
ansible.builtin.file:
path: "{{ falcon_api_sensor_download_path }}"
Expand Down

0 comments on commit fa9ee91

Please sign in to comment.