initialize

This commit is contained in:
Elouin 2024-11-10 14:34:49 +01:00
commit 154ddca3ba
6 changed files with 55 additions and 0 deletions

8
.gitignore vendored Normal file
View file

@ -0,0 +1,8 @@
cachedir/
etc/
log.txt
.bundle/
.kitchen/
vendor/
Gemfile.lock
venv/

3
README.md Normal file
View file

@ -0,0 +1,3 @@
# VoxeLibre Formula
This is a saltstack formula to deploy a VoxeLibre server via podman quadlet.

9
pillar.example Normal file
View file

@ -0,0 +1,9 @@
voxelibre:
port: 30000
image:
path: codeberg.org/elouin/voxelibre
version: 0.87.2-1
config:
PORT: 1337
SERVER_NAME: Super VoxeLibre server
MOTD: This server was deployed with the voxelibre formula

17
voxelibre/init.sls Normal file
View file

@ -0,0 +1,17 @@
voxelibre-volume-file-is-present:
file.managed:
- name: /etc/containers/systemd/voxelibre.volume
- source: salt://voxelibre/voxelibre.volume.jinja
- template: jinja
voxelibre-container-file-is-present:
file.managed:
- name: /etc/containers/systemd/voxelibre.container
- source: salt://voxelibre/voxelibre.container.jinja
- template: jinja
reload-systemd-units-onchange-of-voxelibre-container-unit-file:
module.run:
- service.systemctl_reload
- onchanges:
- file: /etc/containers/systemd/voxelibre.container

View file

@ -0,0 +1,16 @@
[Unit]
Description=VoxeLibre Server
[Container]
Image={{ salt['pillar.get']('voxelibre:image:path', 'codeberg.org/elouin/voxelibre') }}:{{ salt['pillar.get']('voxelibre:image:version', '0.87.2-1') }}
Volume=voxelibre.volume:/var/lib/minetest/.minetest/worlds
PublishPort={{ salt['pillar.get']('voxelibre:port', "30000") }}:30000/udp
{% for option, value in pillar.get('voxelibre:config', {}).items() %}
Environment={{ option }}={{ value }}
{% endfor %}
[Service]
TimeoutStartSec=900
[Install]
WantedBy=multi-user.target default.target

View file

@ -0,0 +1,2 @@
[Volume]
VolumeName=voxelibre-world