first commit

This commit is contained in:
2026-02-02 12:44:10 -05:00
commit f2eee63fb7
11 changed files with 583 additions and 0 deletions

28
roles/nfs/tasks/main.yml Normal file
View File

@@ -0,0 +1,28 @@
---
- name: Install NFS client packages
ansible.builtin.apt:
name:
- nfs-common
state: present
update_cache: true
- name: Create NFS mount directory
ansible.builtin.file:
path: /var/NFSFolder
state: directory
mode: '0755'
- name: Add NFS mount to fstab
ansible.builtin.lineinfile:
path: /etc/fstab
line: "192.168.0.161:/mnt/share1/NFSFolder /var/NFSFolder nfs auto,nofail,noatime,nolock,intr,tcp,actimeo=1800 0 0"
state: present
create: true
- name: Mount NFS share
ansible.posix.mount:
path: /var/NFSFolder
src: "192.168.0.161:/mnt/share1/NFSFolder"
fstype: nfs
opts: "auto,nofail,noatime,nolock,intr,tcp,actimeo=1800"
state: mounted