diff --git a/playbooks/nfs_client.yml b/playbooks/nfs_client.yml new file mode 100644 index 0000000..30680fa --- /dev/null +++ b/playbooks/nfs_client.yml @@ -0,0 +1,20 @@ +--- + +- name: Setup and mount NFS share + hosts: all + become: true + gather_facts: true + + tasks: + - name: Ensure NFS client packages are installed + ansible.builtin.package: + name: "{{ 'nfs-common' if ansible_facts['os_family'] == 'Debian' else 'nfs-utils' }}" + state: present + + - name: Ensure NFS share is mounted and persistent in fstab + ansible.posix.mount: + path: /nfs + src: nfs-v4.int.metaunix.net:/export/nfs + fstype: nfs + opts: rw,vers=4,_netdev,sync,hard,intr,rsize=8192,wsize=8192 + state: mounted diff --git a/playbooks/site.yml b/playbooks/site.yml index 3d94dc2..a9669e0 100644 --- a/playbooks/site.yml +++ b/playbooks/site.yml @@ -6,6 +6,8 @@ import_playbook: base.yml - name: Authentication import_playbook: auth.yml +- name: NFS Client + import_playbook: nfs_client.yml - name: Packages import_playbook: packages.yml - name: Munin