homelab-ansible/tasks/mount_nfs.yml
Javier Feliz f8aa45e2fb cleanup
2025-06-20 20:57:15 -04:00

22 lines
422 B
YAML
Executable File

---
- 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