noticket - reorganized podman

This commit is contained in:
Bastian de Byl
2024-02-01 15:35:11 -05:00
parent 27942f9178
commit 184cd2574d
25 changed files with 102 additions and 98 deletions

View File

@@ -0,0 +1,56 @@
---
- name: create palworld host directory volumes
become: true
ansible.builtin.file:
path: "{{ item }}"
state: directory
owner: "{{ podman_subuid.stdout }}"
group: "{{ podman_user }}"
mode: 0755
notify: restorecon podman
loop:
- "{{ palworld_path }}"
- name: unshare chown the palworld volumes
become: true
become_user: "{{ podman_user }}"
changed_when: false
ansible.builtin.command: |
podman unshare chown -R 1000:10000 {{ palworld_path }}
- import_tasks: podman/podman-check.yml
vars:
container_name: palworld
container_image: "{{ image }}"
- name: create palworld server container
become: true
become_user: "{{ podman_user }}"
containers.podman.podman_container:
name: palworld
image: "{{ image }}"
image_strict: true
restart_policy: unless-stopped
log_driver: journald
volumes:
- "{{ palworld_path }}:/palworld"
env:
ALWAYS_UPDATE_ON_START: "true"
MAX_PLAYERS: 32
MULTITHREAD_ENABLED: "true"
COMMUNITY_SERVER: "false"
RCON_ENABLED: "true"
RCON_PORT: 25575
PUBLIC_PORT: 8211
SERVER_NAME: Bearbehr and Friends
SERVER_DESCRIPTION: Bearbehr's Dedicated Server for Friends
SERVER_PASSWORD: ""
ADMIN_PASSWORD: "{{ palworld_admin_password }}"
ports:
- 8211:8211/udp
- 25575:25575/udp
- name: create systemd startup job for palworld
include_tasks: podman/systemd-generate.yml
vars:
container_name: palworld