29 lines
698 B
YAML
29 lines
698 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: "{{ nfs_host_mount_point }}"
|
|
state: directory
|
|
owner: nobody
|
|
group: nogroup
|
|
mode: '0777'
|
|
|
|
# modify /etc/exports#
|
|
# echo '/srv/nfs 10.0.0.0/24(rw,sync,no_subtree_check)'
|
|
- name: ensure exports file has k3s ips
|
|
ansible.builtin.template:
|
|
src: templates/exports.j2
|
|
dest: "/etc/exports"
|
|
# restart nfs server
|