homelab-ansible/tasks/mount_nfs.yml
2025-03-20 19:59:48 -04:00

22 lines
422 B
YAML

---
- name: Ensure NFS client is installed
ansible.builtin.package:
name: nfs-common
state: present
become: true
- name: Create mount point directory
ansible.builtin.file:
path: "{{ mount_path }}"
state: directory
mode: '0777'
become: true
- name: Mount share
ansible.posix.mount:
src: "{{ mount_source }}"
path: "{{ mount_path }}"
fstype: nfs
state: mounted
become: true