Skip to content
Snippets Groups Projects
Commit 0e2975fb authored by Peter Nerlich's avatar Peter Nerlich
Browse files

replace shell scripts by ansible playbooks/roles, provide under MIT license

parent 24402460
No related branches found
No related tags found
No related merge requests found
[Unit]
Description=Minetest
[Service]
Type=simple
User=minetest
Group=minetest
ExecStart={{ minetest_base_dir }}/minetest/bin/minetestserver --quiet
WorkingDirectory={{ minetest_base_dir }}/minetest
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=multi-user.target
creative_mode = false
auth_backend = {{ server_auth_backend }}
player_backend = {{ server_player_backend }}
gameid = minetest
enable_damage = {{ server_enable_damage }}
backend = {{ server_backend }}
{% if 'postgresql' in [server_auth_backend, server_player_backend, server_backend] %}
pgsql_connection = host={{ psql_host }} user={{ psql_user }} password={{ psql_password }} dbname={{ psql_db }}
pgsql_player_connection = host={{ psql_host }} user={{ psql_user }} password={{ psql_password }} dbname={{ psql_db }}
{% endif %}
{% for mod in load_mods|sort() %}
load_mod_{{ mod }} = true
{% endfor %}
{% for mod in disabled_mods|sort() %}
load_mod_{{ mod }} = false
{% endfor %}
---
- hosts: all
roles:
- role: kif_minetest_mapserver
vars:
use_production_secrets: true
mapserver_key: "{{ lookup('password', '/dev/null chars=ascii_letters,digits,hexdigits,punctuation length=16') }}"
#!/bin/bash
systemctl restart minetest
systemctl restart mapserver
---
- hosts: all
roles:
- role: kif_minetest_mapserver
vars:
server_player_backend: sqlite3
server_backend: sqlite3
server_announce: false
#!/bin/bash
# This is the directory and version of the main server code
MINETEST_MODS_DIR=/var/lib/minetest/minetest_mods
MINETEST_VERSION=5.2.0
# Mods repo has its own update script, so we just call it!
cd $MINETEST_MODS_DIR
./update.sh
#!/bin/bash
# This is the directory and version of the main server code
MINETEST_TARGET_DIR=/var/lib/minetest/minetest
MINETEST_VERSION=5.2.0
# This is the directory and version of the base game/mod, i.e. the "minetest_game"
MINETEST_GAME_DIR=/var/lib/minetest/minetest_game
MINETEST_GAME_VERSION=5.2.0
# Pull correct version of minetest_game
cd $MINETEST_GAME_DIR
git fetch -t
git checkout $MINETEST_GAME_VERSION
# Pull correct version of minetest
cd $MINETEST_TARGET_DIR
git fetch -t
git checkout $MINETEST_VERSION
# Build it
cmake . -DRUN_IN_PLACE=TRUE -DBUILD_SERVER=TRUE -DBUILD_CLIENT=FALSE -DPostgreSQL_TYPE_INCLUDE_DIR=/usr/include/postgresql/
make -j4
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment