add nfs-host role for plumbum.n39.eu

This commit is contained in:
David Kilias 2023-10-09 21:23:32 +02:00 committed by Stefan Haun
parent ffa3b5d975
commit 9887e40fba
4 changed files with 16 additions and 6 deletions

11
host-plumbum.yml Normal file
View file

@ -0,0 +1,11 @@
---
- hosts: plumbum.n39.eu
become: true
roles:
- role: nfs-host
vars:
nfs_host_exports:
- directory: "/srv/nfs"
hosts: "k3s-w[0-9]+.n39.eu"
options: rw,sync,no_subtree_check

View file

@ -1,7 +1,3 @@
---
server_admin: "admin+plumbum@netz39.de"
mac: "32:A3:94:A0:23:77"
nfs_host_exports:
- directory: "/srv/nfs"
hosts: "k3s-w[0-9]+.n39.eu"
options: rw,sync,no_subtree_check

View file

@ -39,3 +39,6 @@
- name: Hobbes specific setup
import_playbook: host-hobbes.yml
- name: Plumbum specific setup
import_playbook: host-plumbum.yml

View file

@ -20,7 +20,7 @@
owner: nobody
group: nogroup
mode: '0000'
loop: "{{ nfs_host_exports | dict2items }}"
with_items: "{{ nfs_host_exports }}"
- name: template /etc/exports
ansible.builtin.template:
@ -29,5 +29,5 @@
notify: reload nfs
- name: Ensure nfs is running.
ansible.builtin.service: "name={{ nfs_server_daemon }} state=started enabled=yes"
ansible.builtin.service: "name=nfs-kernel-server state=started enabled=yes"
when: nfs_host_exports|length