From 3be9c40f2b80c97eb7f1537cd4bd02b33d430af8 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Sun, 10 Oct 2021 12:36:42 -0500 Subject: [PATCH] r/vmhost: Install mount helpers Filesystems like NFS and CIFS require "helper" utilities (i.e. `mount.nfs` and `mount.cifs`, respectively). These need to be installed in order for a system to be able to mount those filesystems. The current shared storage system uses NFSv4, and as such, the *nfs-utils* package needs to be installed on the VM hosts. --- group_vars/vm-hosts.yml | 2 ++ roles/vmhost/tasks/main.yml | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/group_vars/vm-hosts.yml b/group_vars/vm-hosts.yml index c3515a9..5910818 100644 --- a/group_vars/vm-hosts.yml +++ b/group_vars/vm-hosts.yml @@ -12,6 +12,8 @@ libvirt_networks: type: bridge bridge_iface: mgmt storage_host: storage0.pyrocufflink.blue +shared_volume_mount_packages: +- nfs-utils mount_shared_volumes: - mountpoint: /var/lib/libvirt/images host: '[{{ lookup("dig", storage_host, "qtype=AAAA") }}]' diff --git a/roles/vmhost/tasks/main.yml b/roles/vmhost/tasks/main.yml index e7316b6..7945929 100644 --- a/roles/vmhost/tasks/main.yml +++ b/roles/vmhost/tasks/main.yml @@ -85,6 +85,11 @@ name: ksm state: started +- name: ensure required mount helper utilities are installed + package: + name: '{{ shared_volume_mount_packages }}' + state: present + tags: install - name: ensure storage volumes are mounted mount: path: '{{ item.mountpoint }}'