Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(role): LinuxGameServerManager #321

Merged
merged 8 commits into from
Jan 23, 2024
Merged

Conversation

DevScarabyte
Copy link
Contributor

Description

Role to install game servers using docker-gameserver to manage the servers. It depends on using the multi-instance configuration to set the correct image, directory, ports, and any other settings.

The lgsm instance will be ignored since it will throw errors saying there is no such docker image.

How Has This Been Tested?

These are the instances i used to test in my inventory config

lgsm_instances: ["lgsm","lgsm_valheim", "lgsm_rust"]
# Example setting image version to correct shortcode from https://github.com/GameServerManagers/LinuxGSM/blob/master/lgsm/data/serverlist.csv
lgsm_valheim_docker_image_tag: "vh"
lgsm_valheim_docker_ports_defaults: ["2456:2456/udp","2457:2457/udp"]
lgsm_rust_docker_ports_defaults: ["28015:28015/udp","28017:28017/udp","28082:28082/udp"]

The configs for servers are in /opt/CONTAINERNAME/config-lgsm/LGSMSERVERNAME/
For example my valheim config would be /opt/lgsm_valheim/config-lgsm/vhserver/vhserver.cfg which is the lgsm instance config for that server.

/opt/lgsm_valheim/config-lgsm/vhserver/common.cfg works too. Can read more here

  • Instances are created correctly and run without issue.
  • Can connect to servers to verify they work (thanks to salty on discord)

@owine
Copy link
Collaborator

owine commented Jan 21, 2024

jinja[spacing]: Jinja2 spacing could be improved: {{ lgsm_name | replace('lgsm_','') }} -> {{ lgsm_name | replace('lgsm_', '') }} (warning)
roles/lgsm/defaults/main.yml:50 Jinja2 template rewrite recommendation: `{{ lgsm_name | replace('lgsm_', '') }}`.

yaml[trailing-spaces]: Trailing spaces
roles/lgsm/tasks/main.yml:32

roles/lgsm/defaults/main.yml Outdated Show resolved Hide resolved
roles/lgsm/tasks/main.yml Outdated Show resolved Hide resolved
roles/lgsm/tasks/main.yml Outdated Show resolved Hide resolved
@DevScarabyte DevScarabyte requested a review from owine January 23, 2024 05:22
@owine owine merged commit 144c0ae into saltyorg:master Jan 23, 2024
174 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants