18 lines
405 B
YAML
Executable File
18 lines
405 B
YAML
Executable File
---
|
|
- name: Ensure NFS client is installed
|
|
ansible.builtin.package:
|
|
name: nfs-common
|
|
state: present
|
|
|
|
- name: Create mount point directory
|
|
ansible.builtin.file:
|
|
path: "{{ mount_to }}"
|
|
state: directory
|
|
mode: '0777'
|
|
|
|
- name: Mount share
|
|
ansible.posix.mount:
|
|
src: "{{ lookup('hostip', 'nas') }}:/mnt/main/{{ share }}"
|
|
path: "{{ mount_to }}"
|
|
fstype: nfs
|
|
state: mounted |