Files
homelab/tasks/nfs.yml

17 lines
419 B
YAML
Executable File

---
- name: Install NFS mount utility
ansible.builtin.apt:
update_cache: true
pkg: nfs-common
state: present
when: ansible_os_family == "Debian"
- name: Mount an NFS volume
ansible.posix.mount:
src: "{{ item.src }}"
path: "{{ item.path }}"
opts: "{{ item.opts | default('rw,sync,hard') }}"
state: "{{ item.state | default( 'mounted' ) }}"
fstype: nfs
with_items: "{{ mounts }}"