commit 9954987968e7b2f5a885eea3809cc5a30a6060c3 Author: Elouin Date: Mon Dec 30 16:12:47 2024 +0100 Init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..480e474 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +cachedir/ +etc/ +log.txt +.bundle/ +.kitchen/ +vendor/ +Gemfile.lock +venv/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..8740b48 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Mumble Podman Formula + +This is a saltstack formula to deploy a mumble murmur server via podman quadlet. diff --git a/mumble/init.sls b/mumble/init.sls new file mode 100644 index 0000000..ea98c6a --- /dev/null +++ b/mumble/init.sls @@ -0,0 +1,23 @@ +mumble-volume-file-is-present: + file.managed: + - name: /etc/containers/systemd/mumble.volume + - source: salt://mumble/mumble.volume.jinja + - template: jinja + +mumble-container-file-is-present: + file.managed: + - name: /etc/containers/systemd/mumble.container + - source: salt://mumble/mumble.container.jinja + - template: jinja + +reload-systemd-units-onchange-of-mumble-container-unit-file: + module.wait: + - service.systemctl_reload: + - watch: + - file: mumble-container-file-is-present + +mumble-service-running: + service.running: + - name: mumble + - watch: + - module: reload-systemd-units-onchange-of-mumble-container-unit-file diff --git a/mumble/mumble.container.jinja b/mumble/mumble.container.jinja new file mode 100644 index 0000000..a20be95 --- /dev/null +++ b/mumble/mumble.container.jinja @@ -0,0 +1,14 @@ +[Unit] +Description=Mumble Server + +[Container] +Image={{ salt['pillar.get']('mumble:image:path', 'code.flipdot.org/flipdot/mumble') }}:{{ salt['pillar.get']('mumble:image:version', 'latest') }} +Volume=mumble.volume:/data +PublishPort={{ salt['pillar.get']('mumble:port', "64738") }}:64738/tcp +PublishPort={{ salt['pillar.get']('mumble:port', "64738") }}:64738/udp + +[Service] +TimeoutStartSec=900 + +[Install] +WantedBy=multi-user.target default.target diff --git a/mumble/mumble.volume.jinja b/mumble/mumble.volume.jinja new file mode 100644 index 0000000..aa6b135 --- /dev/null +++ b/mumble/mumble.volume.jinja @@ -0,0 +1,2 @@ +[Volume] +VolumeName=mumble-data diff --git a/pillar.example b/pillar.example new file mode 100644 index 0000000..6ad04e0 --- /dev/null +++ b/pillar.example @@ -0,0 +1,5 @@ +mumble: + port: 30000 + image: + path: code.flipdot.org/flipdot/mumble + version: latest