ansible/roles/coller/README.md
Julien Riou 8f1bf16c08
Some checks failed
/ ansible-docsmith (push) Failing after 19s
Initial commit
2026-02-16 14:04:29 +01:00

159 lines
3.7 KiB
Markdown

# Ansible Role Coller
Ansible role to manage a [coller](https://git.riou.xyz/jriou/coller) instance.
## Configuration
See [Variable
precedence](https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_variables.html#ansible-variable-precedence)
to find where you should put your own variables.
Then define at least `coller_db_password` with a strong and secure password,
encrypted using
[ansible-vault](https://docs.ansible.com/ansible/latest/cli/ansible-vault.html).
## Table of content
<!-- ANSIBLE DOCSMITH TOC START -->
* [Role variables](#variables)
* [`coller_version`](#variable-coller_version)
* [`coller_config_dir`](#variable-coller_config_dir)
* [`coller_port`](#variable-coller_port)
* [`coller_manage_iptables`](#variable-coller_manage_iptables)
* [`coller_allowed_sources`](#variable-coller_allowed_sources)
* [`coller_db_name`](#variable-coller_db_name)
* [`coller_db_user`](#variable-coller_db_user)
* [`coller_db_password`](#variable-coller_db_password)
<!-- ANSIBLE DOCSMITH TOC END -->
<!-- ANSIBLE DOCSMITH MAIN START -->
## Role variables<a id="variables"></a>
The following variables can be configured for this role:
| Variable | Type | Required | Default | Description (abstract) |
|----------|------|----------|---------|------------------------|
| `coller_version` | `str` | No | `"1.3.1"` | Version of the binary. |
| `coller_config_dir` | `path` | No | `"/etc/coller"` | Directory of the configuration files. |
| `coller_port` | `int` | No | `8080` | Port to listen. |
| `coller_manage_iptables` | `bool` | No | `false` | Create iptables rule to allow the service. |
| `coller_allowed_sources` | `list` | No | N/A | List of allowed networks to allow.<br><br>Enabled when `coller_manage_iptables` is enabled. |
| `coller_db_name` | `str` | No | `"coller"` | Name of the database to connect. |
| `coller_db_user` | `str` | No | `"coller"` | User to connect to the database. |
| `coller_db_password` | `str` | Yes | N/A | Password to connect to the database. |
### `coller_version`<a id="variable-coller_version"></a>
[*⇑ Back to ToC ⇑*](#toc)
Version of the binary.
- **Type**: `str`
- **Required**: No
- **Default**: `"1.3.1"`
### `coller_config_dir`<a id="variable-coller_config_dir"></a>
[*⇑ Back to ToC ⇑*](#toc)
Directory of the configuration files.
- **Type**: `path`
- **Required**: No
- **Default**: `"/etc/coller"`
### `coller_port`<a id="variable-coller_port"></a>
[*⇑ Back to ToC ⇑*](#toc)
Port to listen.
- **Type**: `int`
- **Required**: No
- **Default**: `8080`
### `coller_manage_iptables`<a id="variable-coller_manage_iptables"></a>
[*⇑ Back to ToC ⇑*](#toc)
Create iptables rule to allow the service.
- **Type**: `bool`
- **Required**: No
- **Default**: `false`
### `coller_allowed_sources`<a id="variable-coller_allowed_sources"></a>
[*⇑ Back to ToC ⇑*](#toc)
List of allowed networks to allow.
Enabled when `coller_manage_iptables` is enabled.
- **Type**: `list`
- **Required**: No
### `coller_db_name`<a id="variable-coller_db_name"></a>
[*⇑ Back to ToC ⇑*](#toc)
Name of the database to connect.
- **Type**: `str`
- **Required**: No
- **Default**: `"coller"`
### `coller_db_user`<a id="variable-coller_db_user"></a>
[*⇑ Back to ToC ⇑*](#toc)
User to connect to the database.
- **Type**: `str`
- **Required**: No
- **Default**: `"coller"`
### `coller_db_password`<a id="variable-coller_db_password"></a>
[*⇑ Back to ToC ⇑*](#toc)
Password to connect to the database.
- **Type**: `str`
- **Required**: Yes
<!-- ANSIBLE DOCSMITH MAIN END -->
## Usage
Example of a basic coller.yml playbook:
```yaml
- hosts: coller
roles:
- coller
```
Then run the playbook:
```
ansible-playbook coller.yml
```