Skip to content
Snippets Groups Projects
Commit df566382 authored by nimrod's avatar nimrod
Browse files

Fix for btrfs check.

The Nagios plugin doesn't work on the device, it needs a mountpoint.
parent 62973fbd
No related branches found
No related tags found
No related merge requests found
--- ---
- name: Find a mountpoint for {{ device }}
# There can be multiple once with bind mounts or subvolumes, we only need
# one.
set_fact:
# yamllint disable rule:line-length
btrfs_mountpoint: |-
{{ (ansible_facts.mounts|selectattr("device", "equalto", device)|first)["mount"] }}
# yamllint enable rule:line-length
- name: Install btrfs packages - name: Install btrfs packages
apt: apt:
cache_valid_time: 3600 cache_valid_time: 3600
......
...@@ -6,4 +6,4 @@ After=network-online.target ...@@ -6,4 +6,4 @@ After=network-online.target
[Service] [Service]
Type=exec Type=exec
ExecStart=mnpw --warn -- /usr/lib/nagios-btrfs/plugins/check_btrfs --mountpoint {{ device }} ExecStart=mnpw --warn -- /usr/lib/nagios-btrfs/plugins/check_btrfs --mountpoint {{ btrfs_mountpoint }}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment