28 lines
649 B
YAML
28 lines
649 B
YAML
---
|
|
# - name: Create a new ext4 primary partition
|
|
# community.general.parted:
|
|
# device: "{{ nfs_host_storage_device }}"
|
|
# number: 1
|
|
# state: present
|
|
# fs_type: ext4
|
|
|
|
- name: Install nfs-kernel-server
|
|
ansible.builtin.apt:
|
|
state: present
|
|
name:
|
|
- nfs-kernel-server
|
|
|
|
- name: ensure nfs mountpoint is present
|
|
ansible.builtin.file:
|
|
path: "{{ item.directory }}"
|
|
state: directory
|
|
owner: nobody
|
|
group: nogroup
|
|
mode: '0000'
|
|
loop: "{{ nfs_host_exports | dict2items }}"
|
|
|
|
- name: template /etc/exports
|
|
ansible.builtin.template:
|
|
src: templates/exports.j2
|
|
dest: "/etc/exports"
|
|
# restart nfs server
|