diff --git a/ansible/roles/nhc/templates/nhc.conf.j2 b/ansible/roles/nhc/templates/nhc.conf.j2 index cefad76a0..393af5aaf 100644 --- a/ansible/roles/nhc/templates/nhc.conf.j2 +++ b/ansible/roles/nhc/templates/nhc.conf.j2 @@ -4,7 +4,9 @@ * || HOSTNAME="$HOSTNAME_S" ## Filesystem checks -{% for mount in ansible_mounts %} +{% for mount in ansible_mounts | rejectattr('mount', 'eq', '/efi') %} +{# /efi is mounted both directly and via systemd1 autofs, which NHC can't cope with #} +{# use `awk '{print $5 " " $10 " " $4 " " $9}' /proc/self/mountinfo | sort -k1` to check that is the only case #} {% set mount_mode = 'rw' if 'rw' in mount.options.split(',') else 'ro' %} {{ ansible_fqdn }} || check_fs_mount_{{ mount_mode }} -t "{{ mount.fstype }}" -s "{{ mount.device }}" -f "{{ mount.mount }}" {% endfor %}