You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
732 B
YAML

---
- name: Install required packages
apt:
state: present
name:
- nfs-kernel-server
- name: Create exports root directory
file:
state: directory
path: "{{ global_nfs_directory }}"
owner: root
group: root
mode: u=rwx,g=rx,o=rx
- name: Configure exports root
template:
src: root.exports
dest: "{{ exports_config }}"
owner: root
group: root
mode: u=rw,g=r,o=r
notify:
- reload nfs exports
- name: Create exports config directory
file:
state: directory
path: "{{ exports_config_directory }}"
owner: root
group: root
mode: u=rwx,g=rx,o=rx
- name: Allow ports in firewall
ufw:
rule: allow
port: "{{ global_nfs_port }}"
proto: tcp