mirror of
https://github.com/dj-wasabi/ansible-telegraf.git
synced 2025-07-17 08:46:37 +00:00
Merge pull request #54 from dj-wasabi/supporting_oses
Fix Deprecation warnings
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
hosts: localhost
|
||||
connection: local
|
||||
gather_facts: False
|
||||
# no_log: "{{ not lookup('env', 'MOLECULE_DEBUG') | bool }}"
|
||||
no_log: "{{ not lookup('env', 'MOLECULE_DEBUG') | bool }}"
|
||||
vars:
|
||||
molecule_file: "{{ lookup('env', 'MOLECULE_FILE') }}"
|
||||
molecule_ephemeral_directory: "{{ lookup('env', 'MOLECULE_EPHEMERAL_DIRECTORY') }}"
|
||||
|
@ -13,8 +13,13 @@ platforms:
|
||||
image: milcom/centos7-systemd
|
||||
privileged: True
|
||||
- name: telegraf-debian
|
||||
image: maint/debian-systemd
|
||||
image: minimum2scp/systemd-stretch
|
||||
privileged: True
|
||||
command: /sbin/init
|
||||
- name: telegraf-ubuntu
|
||||
image: solita/ubuntu-systemd:bionic
|
||||
privileged: True
|
||||
command: /sbin/init
|
||||
|
||||
provisioner:
|
||||
name: ansible
|
||||
|
@ -4,12 +4,19 @@
|
||||
- name: "Installing which on CentOS"
|
||||
yum:
|
||||
name: which
|
||||
state: installed
|
||||
when: ansible_distribution == 'CentOS'
|
||||
state: present
|
||||
when:
|
||||
- ansible_os_family == 'RedHat'
|
||||
|
||||
- name: "Installing wget on Debian"
|
||||
apt:
|
||||
name: wget
|
||||
state: installed
|
||||
when: ansible_distribution == 'Debian'
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
when:
|
||||
- ansible_os_family == 'Debian'
|
||||
with_items:
|
||||
- wget
|
||||
- gpg
|
||||
|
||||
roles:
|
||||
- role: ansible-telegraf
|
||||
|
@ -37,6 +37,6 @@
|
||||
- name: "Install telegraf package | Debian"
|
||||
apt:
|
||||
name: "telegraf"
|
||||
state: installed
|
||||
state: present
|
||||
notify: "Restart Telegraf"
|
||||
become: yes
|
||||
|
@ -21,7 +21,7 @@
|
||||
group: telegraf
|
||||
mode: 0640
|
||||
become: yes
|
||||
when: telegraf_agent_version|version_compare('0.10.0', '<')
|
||||
when: telegraf_agent_version is version_compare('0.10.0', '<')
|
||||
notify: "Restart Telegraf"
|
||||
|
||||
- name: "Copy the template for versions >= 0.10.0"
|
||||
@ -32,7 +32,7 @@
|
||||
group: telegraf
|
||||
mode: 0640
|
||||
become: yes
|
||||
when: telegraf_agent_version|version_compare('0.10.0', '>=')
|
||||
when: telegraf_agent_version is version_compare('0.10.0', '>=')
|
||||
notify: "Restart Telegraf"
|
||||
|
||||
- name: "Copy telegraf extra plugins"
|
||||
|
@ -21,13 +21,13 @@
|
||||
round_interval = {{ telegraf_agent_round_interval | lower }}
|
||||
flush_interval = "{{ telegraf_agent_flush_interval }}s"
|
||||
flush_jitter = "{{ telegraf_agent_flush_jitter }}s"
|
||||
{% if telegraf_agent_version|version_compare('0.13', '>=') %}
|
||||
{% if telegraf_agent_version is version_compare('0.13', '>=') %}
|
||||
collection_jitter = "{{ telegraf_agent_collection_jitter }}s"
|
||||
metric_batch_size = {{ telegraf_agent_metric_batch_size }}
|
||||
metric_buffer_limit = {{ telegraf_agent_metric_buffer_limit }}
|
||||
quiet = {{ telegraf_agent_quiet | lower }}
|
||||
{% endif %}
|
||||
{% if telegraf_agent_version|version_compare('1.1', '>=') %}
|
||||
{% if telegraf_agent_version is version_compare('1.1', '>=') %}
|
||||
logfile = "{{ telegraf_agent_logfile }}"
|
||||
omit_hostname = {{ telegraf_agent_omit_hostname | lower }}
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user