Skip to content

Commit

Permalink
Merge pull request #21 from redhatrises/role_updates
Browse files Browse the repository at this point in the history
Update Falcon role and Collection
  • Loading branch information
redhatrises authored Feb 5, 2021
2 parents c8358af + 0cf41fe commit dfd0279
Show file tree
Hide file tree
Showing 16 changed files with 149 additions and 63 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Release to Galaxy

on:
release:
types:
- created

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install pip
run: |
python -m pip install --upgrade pip
pip install ansible
- name: Create release artifacts
run: |
ansible-galaxy collection build
ansible-galaxy collection publish *.tar.gz --api-key ${{ secrets.GALAXY_API_KEY }}
- name: Release artifacts to Git Hub
uses: ncipollo/release-action@v1
with:
artifacts: ./crowdstrike-falcon*.tar.gz
allowUpdates: true
name: Release ${{ github.ref }}
token: ${{ secrets.GITHUB_TOKEN }}
34 changes: 32 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
# Ansible Collection - crowdstrike.crowdstrike
# Ansible Collection - crowdstrike.falcon

Documentation for the collection.
This collection is focused on downloading, installing, and removing, CrowdStrike's Falcon sensor on Linux platforms. Windows and OSX coming soon.

# Installation

To install the collection from Ansible Galaxy:

```
ansible-galaxy collection install crowdstrike.falcon
```

# Example Playbooks

This example uninstalls the Falcon Sensor:

```yaml
---
- hosts: all
vars:
falcon_uninstall: true
tasks:
- import_role:
name: crowdstrike.falcon.falcon_installation
```
# Contributing
All contributions are welcome!
# License
See the [Unlicense](LICENSE) for more information.
8 changes: 4 additions & 4 deletions galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
namespace: crowdstrike

# The name of the collection. Has the same character restrictions as 'namespace'
name: crowdstrike
name: falcon

# The version of the collection. Must be compatible with semantic versioning
version: 0.0.1
version: 1.0.0

# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md
Expand All @@ -26,8 +26,8 @@ description: >
# Either a single license or a list of licenses for content inside of a collection. Ansible Galaxy currently only
# accepts L(SPDX,https://spdx.org/licenses/) licenses. This key is mutually exclusive with 'license_file'
license:
- Unlicense
#license:
#- Unlicense

# The path to the license file for the collection. This path is relative to the root of the collection. This key is
# mutually exclusive with 'license'
Expand Down
48 changes: 0 additions & 48 deletions roles/falcon/README.md

This file was deleted.

2 changes: 0 additions & 2 deletions roles/falcon/handlers/main.yml

This file was deleted.

73 changes: 73 additions & 0 deletions roles/falcon_installation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
Installation
=========

This role will install or uninstall the CrowdStrike Falcon Sensor.

Requirements
------------

Ansible 2.10 or higher

Role Variables
--------------

Currently the following variables are supported:

### Falcon Installation

* `falcon_cid` - Your Falcon Customer ID (CID) (string, default: null)
* `falcon_provisioning_token` - Falcon Installation Token (string, default: null)
* `falcon_install_method` - The installation method for installing the sensor (string, default: api)
* `falcon_gpg_key` - Location of the Falcon GPG Key file (string, default: null)
* `falcon_remove_agent_id` - Remote the Falcon Agent ID (AID) (bool, default: false)
* `falcon_api_url` - CrowdStrike API URL for downloading the Falcon sensor (string, default: `api.crowdstrike.com`)
* `falcon_api_client_id` - CrowdStrike OAUTH Client ID (string, default: null)
* `falcon_api_client_secret` - CrowdStrike OAUTH Client Secret (string, default: null)
* `falcon_install_tmp_dir` - Temporary download and installation directory for the Falson Sensor (string, default: null)
* `falcon_download_url` - URL for downloading the sensor (string, default: null)
* `falcon_retries` - Number of attempts to download the sensor (int, default: 3)
* `falcon_delay` - Number of seconds before trying another download attempt (int, default: 3)
* `falcon_uninstall` - Uninstall the Falcon Sensor (bool, default: false)

See [default/main.yaml](default/main.yaml) for more details on these variables.

Dependencies
------------

Privilege escalation (sudo) is required for this role to function properly.

Example Playbooks
----------------

This example installs the Falcon Sensor:

```yaml
---
- hosts: all
roles:
- role: falcon_installation
vars:
falcon_api_client_id: <Falcon_UI_OAUTH_client_id>
falcon_api_client_secret: <Falcon_UI_OAUTH_client_secret>
```
This example uninstalls the Falcon Sensor:
```yaml
---
- hosts: all
roles:
- role: falcon_installation
vars:
falcon_uninstall: true
```
License
-------
[Unlicense](LICENSE)
Author Information
------------------
CrowdStrike Solutions Architects
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
# defaults file for crowdstrike-falcon-role
# defaults file for falcon_installation

# Your Falcon Customer ID (CID). Optional when using 'api' as an install method.
# Required for any other installation method.
Expand Down
2 changes: 2 additions & 0 deletions roles/falcon_installation/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
# handlers file for falcon_installation
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
galaxy_info:
role_name: falcon-installer
role_name: falcon_installation
author: CrowdStrike Solution Architecture
description: --CURRENTLY IN DEVELOPMENT -- Install and configure CrowdStrike's Falcon sensor on Linux using Ansible.
description: Install and configure CrowdStrike's Falcon sensor on Linux using Ansible.
company: CrowdStrike

issue_tracker_url: https://github.com/CrowdStrike/ansible-role-crowdstrike-falcon
issue_tracker_url: https://github.com/CrowdStrike/ansible_collection_falcon

# This Ansible role is free and unencumbered software released into the
# public domain. For additional details on The Unlicense, please visit
# https://spdx.org/licenses/Unlicense.html
license: Unlicense

min_ansible_version: 2.9
min_ansible_version: 2.10

#
# The list of officially supported operating systems is documented within
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
# tasks file for crowdstrike-falcon-role
# tasks file for falcon_installation
- block:
- include_tasks: uninstall.yml
when: falcon_uninstall
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
# vars file for crowdstrike-falcon-role
# vars file for falcon_installation
linux_packagers: "{{ rpm_packagers + dpkg_packagers }}"

rpm_packagers:
Expand Down

0 comments on commit dfd0279

Please sign in to comment.