Compare commits
1 commit
feat/k3s-s
...
master
Author | SHA1 | Date | |
---|---|---|---|
f1975fb586 |
9 changed files with 2 additions and 81 deletions
|
@ -1,9 +0,0 @@
|
||||||
---
|
|
||||||
- hosts: k3s
|
|
||||||
become: true
|
|
||||||
|
|
||||||
tasks:
|
|
||||||
- name: Ensure nfs-common is installed on k3s VMs
|
|
||||||
ansible.builtin.apt:
|
|
||||||
pkg: nfs-common
|
|
||||||
state: present
|
|
|
@ -1,11 +0,0 @@
|
||||||
---
|
|
||||||
- hosts: plumbum.n39.eu
|
|
||||||
become: true
|
|
||||||
|
|
||||||
roles:
|
|
||||||
- role: nfs-host
|
|
||||||
vars:
|
|
||||||
nfs_host_exports:
|
|
||||||
- directory: "/srv/nfs"
|
|
||||||
hosts: "*.n39.eu"
|
|
||||||
options: rw,sync,no_subtree_check
|
|
|
@ -19,7 +19,7 @@
|
||||||
pwr_meter_pulse_gw_image: netz39/power-meter-pulse-gateway:0.3.0
|
pwr_meter_pulse_gw_image: netz39/power-meter-pulse-gateway:0.3.0
|
||||||
|
|
||||||
brotherql_host_port: 9004
|
brotherql_host_port: 9004
|
||||||
brotherql_web_image: pklaus/brother_ql_web:alpine_9e20b6d
|
brotherql_web_image: dersimn/brother_ql_web:2.1-alpine
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
# role 'docker_setup' applied through group 'docker_host'
|
# role 'docker_setup' applied through group 'docker_host'
|
||||||
|
@ -187,7 +187,7 @@
|
||||||
state: started
|
state: started
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{ brotherql_host_port }}:8013"
|
- "127.0.0.1:{{ brotherql_host_port }}:8013"
|
||||||
command: " ./brother_ql_web.py --model QL-720NW tcp://{{ brotherql_printer_ip }}"
|
command: "--default-label-size 62 --model QL-720NW tcp://{{ brotherql_printer_ip }}"
|
||||||
detach: yes
|
detach: yes
|
||||||
env:
|
env:
|
||||||
TZ: "{{ timezone }}"
|
TZ: "{{ timezone }}"
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
---
|
---
|
||||||
server_admin: "admin+plumbum@netz39.de"
|
|
||||||
mac: "32:A3:94:A0:23:77"
|
mac: "32:A3:94:A0:23:77"
|
||||||
|
|
3
main.yml
3
main.yml
|
@ -39,6 +39,3 @@
|
||||||
|
|
||||||
- name: Hobbes specific setup
|
- name: Hobbes specific setup
|
||||||
import_playbook: host-hobbes.yml
|
import_playbook: host-hobbes.yml
|
||||||
|
|
||||||
- name: Plumbum specific setup
|
|
||||||
import_playbook: host-plumbum.yml
|
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
# Defaults for nfs-host
|
|
||||||
---
|
|
||||||
nfs_host_exports: []
|
|
||||||
# - directory: "/srv/nfs"
|
|
||||||
# hosts: "k3s-w[0-9]+.n39.eu"
|
|
||||||
# options: rw,sync,no_subtree_check
|
|
||||||
|
|
||||||
nfs_host_storage_device: "/dev/sdb"
|
|
|
@ -1,3 +0,0 @@
|
||||||
---
|
|
||||||
- name: reload nfs
|
|
||||||
command: 'exportfs -ra'
|
|
|
@ -1,41 +0,0 @@
|
||||||
---
|
|
||||||
- name: Install required packages
|
|
||||||
ansible.builtin.apt:
|
|
||||||
state: present
|
|
||||||
name:
|
|
||||||
- nfs-kernel-server
|
|
||||||
- nfs-common
|
|
||||||
- parted
|
|
||||||
|
|
||||||
- name: Create a new ext4 primary partition
|
|
||||||
community.general.parted:
|
|
||||||
device: "{{ nfs_host_storage_device }}"
|
|
||||||
number: 1
|
|
||||||
state: present
|
|
||||||
fs_type: ext4
|
|
||||||
|
|
||||||
- name: ensure nfs mountpoints exist
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ item.directory }}"
|
|
||||||
state: directory
|
|
||||||
owner: nobody
|
|
||||||
group: nogroup
|
|
||||||
mode: '0777'
|
|
||||||
with_items: "{{ nfs_host_exports }}"
|
|
||||||
|
|
||||||
- name: Mount up device by label
|
|
||||||
ansible.posix.mount:
|
|
||||||
path: "{{ nfs_host_exports[0].directory }}"
|
|
||||||
src: /dev/sdb1
|
|
||||||
fstype: ext4
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: template /etc/exports
|
|
||||||
ansible.builtin.template:
|
|
||||||
src: templates/exports.j2
|
|
||||||
dest: "/etc/exports"
|
|
||||||
notify: reload nfs
|
|
||||||
|
|
||||||
- name: Ensure nfs is running.
|
|
||||||
ansible.builtin.service: "name=nfs-kernel-server state=started enabled=yes"
|
|
||||||
when: nfs_host_exports|length
|
|
|
@ -1,3 +0,0 @@
|
||||||
{% for export in nfs_host_exports %}
|
|
||||||
{{ export.directory }} {{ export.hosts }}({{ export.options }})
|
|
||||||
{% endfor %}
|
|
Loading…
Reference in a new issue