21 lines
634 B
YAML
21 lines
634 B
YAML
---
|
|
- name: Get VFS mount tag
|
|
ansible.builtin.set_fact:
|
|
our_vfs_mount_tag: "{{ lookup('dotenv', 'VULTR_VFS_MOUNT_TAG', file='../../../../.env.production') }}"
|
|
|
|
- name: Check if /mnt/vfs is already mounted
|
|
ansible.builtin.command: findmnt -n /mnt/vfs
|
|
register: our_vfs_mounted
|
|
ignore_errors: true
|
|
changed_when: false
|
|
|
|
# there's a bug. we dont want to run this unless needed. https://gitlab.com/virtio-fs/virtiofsd/-/issues/213
|
|
- name: Mount VFS
|
|
ansible.posix.mount:
|
|
src: "{{ our_vfs_mount_tag }}"
|
|
path: /mnt/vfs
|
|
fstype: virtiofs
|
|
opts: defaults,_netdev
|
|
state: mounted
|
|
when: our_vfs_mounted.rc != 0
|