version_compare is deprecated

This commit is contained in:
Werner Dijkerman
2020-10-16 16:45:56 +02:00
parent 7eda3206fd
commit a9e6a96183
3 changed files with 5 additions and 9 deletions

View File

@ -10,14 +10,10 @@
- ansible_os_family == 'RedHat'
- name: "Apt get update"
shell: apt-get update && apt-get install -y python-apt
command: apt-get update && apt-get install -y python-apt
when:
- ansible_os_family == 'Debian'
- name: debug
debug:
var: ansible_distribution_major_version
- name: "Installing packages on Debian"
apt:
name:

View File

@ -30,7 +30,7 @@
mode: 0640
become: yes
when:
- telegraf_agent_version is version_compare('0.10.0', '<')
- telegraf_agent_version is version('0.10.0', '<')
notify:
- Restart Telegraf
- Restart Telegraf container
@ -44,7 +44,7 @@
mode: 0640
become: yes
when:
- telegraf_agent_version is version_compare('0.10.0', '>=')
- telegraf_agent_version is version('0.10.0', '>=')
notify:
- Restart Telegraf
- Restart Telegraf container

View File

@ -30,7 +30,7 @@
mode: 0640
become: yes
when:
- telegraf_agent_version is version_compare('0.10.0', '<')
- telegraf_agent_version is version('0.10.0', '<')
notify:
- Restart Telegraf
- Restart Telegraf container
@ -44,7 +44,7 @@
mode: 0640
become: yes
when:
- telegraf_agent_version is version_compare('0.10.0', '>=')
- telegraf_agent_version is version('0.10.0', '>=')
notify:
- Restart MacOS Telegraf
- Restart Telegraf container