From ee49bfe92657ed72f24571e7de72221bbe06c64a Mon Sep 17 00:00:00 2001 From: Elouin Date: Sun, 2 Jun 2024 15:25:59 +0200 Subject: [PATCH] init --- README.md | 3 +++ mumble/docker.sls | 26 ++++++++++++++++++++++++++ mumble/init.sls | 25 +++++++++++++++++++++++++ pillar.example | 0 4 files changed, 54 insertions(+) create mode 100644 README.md create mode 100644 mumble/docker.sls create mode 100644 mumble/init.sls create mode 100644 pillar.example diff --git a/README.md b/README.md new file mode 100644 index 0000000..dcb7f13 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Mumble formula + +Salt formula that sets up mumble, using our [docker image](https://code.flipdot.org/flipdot/mumble-docker). diff --git a/mumble/docker.sls b/mumble/docker.sls new file mode 100644 index 0000000..e726aa9 --- /dev/null +++ b/mumble/docker.sls @@ -0,0 +1,26 @@ +{% set docker = { + 'Debian': + {'pkg': 'docker.io'}, + 'Suse': + {'pkg': 'docker'}, + 'RedHat': + {'pkg': 'docker'} +} %} + +docker installed: + pkg.installed: + - name: {{ docker.pkg }} + +python pip installed: + pkg.installed: + - name: python3-pip + +python docker installed: + pip.installed: + - name: docker-py + - require: + - pkg: python pip installed + +docker service running: + service.running: + - name: docker diff --git a/mumble/init.sls b/mumble/init.sls new file mode 100644 index 0000000..5067230 --- /dev/null +++ b/mumble/init.sls @@ -0,0 +1,25 @@ +include: + - mumble.docker + +Ensure git is installed: + pkg.installed: + - name: git + +mumble docker git repository is available and up to date: + git.latest: + - name: https://code.flipdot.org/flipdot/mumble-docker.git + - target: /opt/mumble-dockerfile + +mumble docker image was build and is available: + docker_image.present: + - name: flipdot/mumble + - tag: latest + - build: /opt/mumble-dockerfile + +mumble docker container is running: + docker_container.running: + - name: flipdot/mumble + - binds: /opt/mumble/data:/data + - port_bindings: + - 64738:64738 + - 64738:64738/udp diff --git a/pillar.example b/pillar.example new file mode 100644 index 0000000..e69de29