major cleanup of ansible tasks in podman role

This commit is contained in:
Bastian de Byl
2023-07-24 13:38:34 -04:00
parent 71e9f4590b
commit 4c40a42707
18 changed files with 227 additions and 249 deletions

View File

@@ -10,7 +10,6 @@
notify: restorecon podman
loop:
- "{{ factorio_path }}"
tags: factorio
- name: unshare chown the elastic volume
become: true
@@ -18,20 +17,21 @@
changed_when: false
ansible.builtin.command: |
podman unshare chown -R 845:845 {{ factorio_path }}
tags: factorio
- name: flush handlers
ansible.builtin.meta: flush_handlers
tags: factorio
- import_tasks: podman/podman-check.yml
vars:
container_name: factorio
container_image: "{{ image }}"
- name: create factorio server container
become: true
become_user: "{{ podman_user }}"
containers.podman.podman_container:
name: factorio
image: docker.io/factoriotools/factorio:1.1.80
recreate: true
restart: true
image: "{{ image }}"
restart_policy: on-failure:3
log_driver: journald
volumes:
@@ -39,10 +39,8 @@
ports:
- 34197:34197/udp
- 27015:27015/tcp
tags: factorio
- name: create systemd startup job for factorio
include_tasks: systemd-generate.yml
include_tasks: podman/systemd-generate.yml
vars:
container_name: factorio
tags: factorio