# Role: crowdsec

## Description

Installs and configures crowdsec.

https://www.crowdsec.net

## Usage

Using in a playbook:

```yaml
- name: Play
  hosts:
    - all
  roles:
    - samuliy.ansible.crowdsec
  vars:
    ...
```

### Vars

`crowdsec_bouncer_packages`:

Bouncers to install along with the crowdsec package.

The list needs to be names of packages provided by the package manager.

`crowdsec_bouncers`:

List of bouncers to configure.

The objects can have fields:

 - 'config_name' - name of the config file, should not include directory of file extension.
 - 'config' - configuration file contents.
 - 'name' - name of the bouncer.
 - 'api_key' - (optional) api key for the bouncer.
 - 'cscli_add' - boolean - add the bouncer via cscli.

`crowdsec_allowlists`:

List of allowlists to configure.

The objects can have fields:

 - 'name' - name of the allowlist.
 - 'description' - (optional) description for the allowlist.
 - 'allows' - list - values to add to the allowlist.

`crowdsec_config`:

Configuration for crowdsec.

`crowdsec_local_api_credentials`:

Local API credentials.

`crowdsec_profiles`:

List of Crowdsec profiles.

`crowdsec_patterns`:

List of Crowdsec patterns.

`crowdsec_notifications`:

List of Crowdsec notification plugins.

`crowdsec_parsers`:

List of Crowdsec parsers.

`crowdsec_collections`:

List of Crowdsec collections to install.

`crowdsec_acquis`:

List of Crowdsec acquis configs.
