ansible-role-influxdb/README.md

99 lines
2.4 KiB
Markdown
Raw Normal View History

2019-04-12 17:14:25 +00:00
# Ansible role: Influxdb
2021-08-18 14:49:07 +00:00
[![Version](https://img.shields.io/badge/latest_version-2.0.0-green.svg)](https://git.yaegashi.fr/nishiki/ansible-role-influxdb/releases)
2019-04-12 17:14:25 +00:00
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://git.yaegashi.fr/nishiki/ansible-role-influxdb/src/branch/master/LICENSE)
2023-09-07 08:36:42 +00:00
Install and configure InfluxDB 2
2019-04-12 17:14:25 +00:00
## Requirements
2023-09-07 08:36:42 +00:00
* Ansible >= 2.10
2021-08-18 12:38:32 +00:00
* Debian
2023-09-07 08:36:42 +00:00
* Bookworm
2019-04-12 17:14:25 +00:00
## Role variables
2023-09-07 08:36:42 +00:00
- `influxdb_init_username` - user created during the influxdb setup
- `influxdb_init_org` - organization created during the influxdb setup
- `influxdb_init_bucket` - bucket created during the influxdb setup
- `influxdb_api_token` - token to manage influxdb
- `influxdb_orgs` - hash with organizations
```yaml
myorg:
description: it's a test
state: present
```
- `influxdb_buckets` - hash with the buckets
```yaml
mybucket:
description: KFC
retention: 3600
org: neworg
state: present
```
- `influxdb_users` - hash with the users
```yaml
myuser:
status: active
state: present
```
- `influxdb_authorizations` - array with the authorizations
```yaml
- user: myuser
description: write bucket
org: neworg
status: active
state: present
permissions:
- action: write
resource:
type: buckets
org: myorg
name: mybucket
- action: read
resource:
type: buckets
```
2019-04-12 17:14:25 +00:00
## How to use
```
- hosts: server
roles:
- influxdb
```
## Development
2023-09-07 08:36:42 +00:00
### Test with molecule and docker
2019-04-12 17:14:25 +00:00
* install [docker](https://docs.docker.com/engine/installation/)
2023-09-07 08:36:42 +00:00
* install `python3` and `python3-pip`
* install molecule and dependencies `pip3 install molecule molecule-plugins[docker] ansible-lint pytest-testinfra yamllint`
* run `molecule test`
2019-04-12 17:14:25 +00:00
## License
```
Copyright (c) 2019 Adrien Waksberg
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```