Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

falcon_install - add the ability to install from an url link for windows #364

Merged
merged 2 commits into from
Jul 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelogs/fragments/url_ability_for_windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- falcon_install - add the ability to install from an URL for windows (https://github.com/CrowdStrike/ansible_collection_falcon/pull/363)
8 changes: 8 additions & 0 deletions roles/falcon_install/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@
- ansible.builtin.include_tasks: file.yml
# noqa name[missing]

- name: Windows URL block
when:
- falcon_install_method == "url"
- ansible_facts['os_family'] == "Windows"
block:
- ansible.builtin.include_tasks: win_url.yml
# noqa name[missing]

- name: Windows API block
when:
- falcon_install_method == "api"
Expand Down
18 changes: 18 additions & 0 deletions roles/falcon_install/tasks/win_url.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Tasks for Installing CrowdStrike's Falcon Sensor via URL
- name: CrowdStrike Falcon | Downloading Installation Package from URL (Windows)
ansible.windows.win_get_url:
url: "{{ falcon_download_url }}"
dest: "{{ falcon_windows_tmp_dir }}\\falcon-sensor.exe"
url_username: "{{ falcon_download_url_username | default(omit) }}"
url_password: "{{ falcon_download_url_password | default(omit) }}"
when:
- falcon_download_url
- falcon_windows_tmp_dir
register: falcon_sensor_download
retries: "{{ falcon_retries }}"
delay: "{{ falcon_delay }}"
until: falcon_sensor_download is success

- name: CrowdStrike Falcon | Set full file download path
ansible.builtin.set_fact:
falcon_sensor_pkg: "{{ falcon_sensor_download.dest }}"
Loading