Change in depreciated options

Packages list and comparisons will have a new syntax with future ansible version
This commit is contained in:
Jérémy Dubois 2020-04-21 11:35:45 +02:00
parent 29afa42c3d
commit f57e0e24f0
3 changed files with 6 additions and 10 deletions

View file

@ -9,9 +9,7 @@
- name: Install packages (vim rsync mtr etc)
openbsd_pkg:
name: "{{ item }}"
state: present
with_items:
name:
- wget
- vim--no_x11
- rsync--

View file

@ -1,17 +1,15 @@
---
- name: Install nrpe
openbsd_pkg:
name: "{{ item }}"
name:
- nrpe--
state: present
with_items:
- nrpe--
- name: Install monitoring-plugins
openbsd_pkg:
name: "{{ item }}"
name:
- monitoring-plugins
state: present
with_items:
- monitoring-plugins
- name: Create nrpe.d dir
file:

View file

@ -64,7 +64,7 @@ __EOT
# Total memory size (in MB)
tot_mem=$(( `/sbin/sysctl -n hw.physmem` / BYTES_IN_MB))
# Free memory size (in MB)
{% if ansible_distribution_version | version_compare("6.2",'<') %}
{% if ansible_distribution_version is version_compare("6.2",'<') %}
free_mem=$(( `/usr/bin/vmstat | /usr/bin/tail -1 | /usr/bin/awk '{ print $5 }'` / KB_IN_MB ))
{% else %}
free_mem=$(/usr/bin/vmstat | /usr/bin/tail -1 | /usr/bin/awk '{ print $4 }' | tr -d 'M')