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
|
- telegraf
|
||||||
- packages
|
- packages
|
||||||
|
|
||||||
- name: Add Influxdb repository.
|
- name: Add Influxdb repository (using LSB).
|
||||||
apt_repository:
|
apt_repository:
|
||||||
repo: "deb https://repos.influxdata.com/{{ ansible_distribution|lower }} {{ ansible_lsb.codename }} stable"
|
repo: "deb https://repos.influxdata.com/{{ ansible_distribution|lower }} {{ ansible_lsb.codename }} stable"
|
||||||
filename: "influxdb"
|
filename: "influxdb"
|
||||||
@ -33,6 +33,18 @@
|
|||||||
tags:
|
tags:
|
||||||
- telegraf
|
- telegraf
|
||||||
- packages
|
- 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"
|
- name: "Install telegraf package | Debian"
|
||||||
action: apt
|
action: apt
|
||||||
|
Reference in New Issue
Block a user