feat: add debian 12 support

This commit is contained in:
Adrien Waksberg 2023-06-29 14:32:37 +02:00
parent 4b97f2fea3
commit a7168840b0
5 changed files with 16 additions and 7 deletions

View file

@ -9,11 +9,12 @@ Install and configure Telegraf
* Ansible >= 2.9
* Debian
* Buster
* Bullseye
* Bookworm
## Role variables
* `telegraf_distribution_release` - set the distribution repository name (default: `ansible_distribution_release`)
* `telegraf_config` - hash with the general configuration (see [telegraf documentation](https://docs.influxdata.com/telegraf/latest/administration/configuration/))
```

View file

@ -1,4 +1,5 @@
---
telegraf_distribution_release: "{{ ansible_distribution_release }}"
telegraf_default_config:
agent:
interval: 10s

View file

@ -11,8 +11,8 @@ galaxy_info:
platforms:
- name: Debian
versions:
- buster
- bullseye
- bookworm
galaxy_tags:
- metrics

View file

@ -2,11 +2,12 @@
driver:
name: docker
platforms:
- name: debian10
image: nishiki/debian10:molecule
- name: debian12
image: nishiki/debian12:molecule
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /sys/fs/cgroup:/sys/fs/cgroup:rw
cgroupns_mode: host
command: /bin/systemd
capabilities:
- SYS_ADMIN
@ -14,10 +15,16 @@ platforms:
image: nishiki/debian11:molecule
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /sys/fs/cgroup:/sys/fs/cgroup:rw
cgroupns_mode: host
command: /bin/systemd
capabilities:
- SYS_ADMIN
provisioner:
inventory:
host_vars:
debian12:
telegraf_distribution_release: bullseye
lint: |
set -e
yamllint .

View file

@ -14,7 +14,7 @@
- name: add influx repository
ansible.builtin.apt_repository:
filename: influx
repo: 'deb https://repos.influxdata.com/debian {{ ansible_distribution_release }} stable'
repo: "deb https://repos.influxdata.com/debian {{ telegraf_distribution_release }} stable"
tags: telegraf
- name: install influxdb package