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 * Ansible >= 2.9
* Debian * Debian
* Buster
* Bullseye * Bullseye
* Bookworm
## Role variables ## 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/)) * `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: telegraf_default_config:
agent: agent:
interval: 10s interval: 10s

View file

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

View file

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

View file

@ -14,7 +14,7 @@
- name: add influx repository - name: add influx repository
ansible.builtin.apt_repository: ansible.builtin.apt_repository:
filename: influx 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 tags: telegraf
- name: install influxdb package - name: install influxdb package