Change in depreciated options
Packages list and comparisons will have a new syntax with future ansible version
This commit is contained in:
parent
29afa42c3d
commit
f57e0e24f0
|
@ -9,9 +9,7 @@
|
||||||
|
|
||||||
- name: Install packages (vim rsync mtr etc)
|
- name: Install packages (vim rsync mtr etc)
|
||||||
openbsd_pkg:
|
openbsd_pkg:
|
||||||
name: "{{ item }}"
|
name:
|
||||||
state: present
|
|
||||||
with_items:
|
|
||||||
- wget
|
- wget
|
||||||
- vim--no_x11
|
- vim--no_x11
|
||||||
- rsync--
|
- rsync--
|
||||||
|
|
|
@ -1,17 +1,15 @@
|
||||||
---
|
---
|
||||||
- name: Install nrpe
|
- name: Install nrpe
|
||||||
openbsd_pkg:
|
openbsd_pkg:
|
||||||
name: "{{ item }}"
|
name:
|
||||||
|
- nrpe--
|
||||||
state: present
|
state: present
|
||||||
with_items:
|
|
||||||
- nrpe--
|
|
||||||
|
|
||||||
- name: Install monitoring-plugins
|
- name: Install monitoring-plugins
|
||||||
openbsd_pkg:
|
openbsd_pkg:
|
||||||
name: "{{ item }}"
|
name:
|
||||||
|
- monitoring-plugins
|
||||||
state: present
|
state: present
|
||||||
with_items:
|
|
||||||
- monitoring-plugins
|
|
||||||
|
|
||||||
- name: Create nrpe.d dir
|
- name: Create nrpe.d dir
|
||||||
file:
|
file:
|
||||||
|
|
|
@ -64,7 +64,7 @@ __EOT
|
||||||
# Total memory size (in MB)
|
# Total memory size (in MB)
|
||||||
tot_mem=$(( `/sbin/sysctl -n hw.physmem` / BYTES_IN_MB))
|
tot_mem=$(( `/sbin/sysctl -n hw.physmem` / BYTES_IN_MB))
|
||||||
# Free memory size (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 ))
|
free_mem=$(( `/usr/bin/vmstat | /usr/bin/tail -1 | /usr/bin/awk '{ print $5 }'` / KB_IN_MB ))
|
||||||
{% else %}
|
{% else %}
|
||||||
free_mem=$(/usr/bin/vmstat | /usr/bin/tail -1 | /usr/bin/awk '{ print $4 }' | tr -d 'M')
|
free_mem=$(/usr/bin/vmstat | /usr/bin/tail -1 | /usr/bin/awk '{ print $4 }' | tr -d 'M')
|
||||||
|
|
Loading…
Reference in a new issue