Feat: add network share to nas

This commit is contained in:
2022-06-02 15:31:12 +02:00
parent 8f96cf6028
commit 9221790ca0
12 changed files with 96 additions and 30 deletions

View File

@@ -0,0 +1,7 @@
---
- name: Debian - Install nfs
apt:
name:
- nfs-common
- nfs-kernel-server
state: present

View File

@@ -0,0 +1,23 @@
---
# tasks file for nfs_server
- name: Install os-specific packages
include_tasks: "{{ ansible_os_family | lower }}.yml"
- name: Ensure directories to export exist
file: # noqa 208
path: "{{ item.src }}"
state: directory
with_items: "{{ nfs_exports }}"
- name: Copy exports file.
template:
src: exports.j2
dest: /etc/exports
owner: root
group: root
mode: 0644
notify: reload nfs
- name: Ensure nfs is running.
service: "name=nfs-kernel-server state=started enabled=yes"
when: nfs_exports|length