Compare commits

..

1 commit

Author SHA1 Message Date
f1975fb586 Switch label designer to dersimn/brother_ql_web 2023-11-02 22:07:32 +01:00
9 changed files with 2 additions and 81 deletions

View file

@ -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

View file

@ -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

View file

@ -19,7 +19,7 @@
pwr_meter_pulse_gw_image: netz39/power-meter-pulse-gateway:0.3.0
brotherql_host_port: 9004
brotherql_web_image: pklaus/brother_ql_web:alpine_9e20b6d
brotherql_web_image: dersimn/brother_ql_web:2.1-alpine
roles:
# role 'docker_setup' applied through group 'docker_host'
@ -187,7 +187,7 @@
state: started
ports:
- "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
env:
TZ: "{{ timezone }}"

View file

@ -1,3 +1,2 @@
---
server_admin: "admin+plumbum@netz39.de"
mac: "32:A3:94:A0:23:77"

View file

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

View file

@ -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"

View file

@ -1,3 +0,0 @@
---
- name: reload nfs
command: 'exportfs -ra'

View file

@ -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

View file

@ -1,3 +0,0 @@
{% for export in nfs_host_exports %}
{{ export.directory }} {{ export.hosts }}({{ export.options }})
{% endfor %}