mirror of
https://github.com/dj-wasabi/ansible-telegraf.git
synced 2025-07-17 08:46:37 +00:00
For Debian: Use ansible_lsb only if it's defined
This commit is contained in:
@ -25,7 +25,7 @@
|
||||
- telegraf
|
||||
- packages
|
||||
|
||||
- name: Add Influxdb repository.
|
||||
- name: Add Influxdb repository (using LSB).
|
||||
apt_repository:
|
||||
repo: "deb https://repos.influxdata.com/{{ ansible_distribution|lower }} {{ ansible_lsb.codename }} stable"
|
||||
filename: "influxdb"
|
||||
@ -33,6 +33,18 @@
|
||||
tags:
|
||||
- telegraf
|
||||
- packages
|
||||
when: ansible_lsb is defined
|
||||
|
||||
- name: Add Influxdb repository.
|
||||
apt_repository:
|
||||
repo: "deb https://repos.influxdata.com/{{ ansible_distribution|lower }} {{ ansible_distribution_release }} stable"
|
||||
filename: "influxdb"
|
||||
state: present
|
||||
become: yes
|
||||
tags:
|
||||
- telegraf
|
||||
- packages
|
||||
when: ansible_lsb is not defined
|
||||
|
||||
- name: "Install telegraf package | Debian"
|
||||
action: apt
|
||||
|
Reference in New Issue
Block a user