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,55 @@
---
- import_tasks: ecr/podman-ecr-login.yml
- name: create fulfillr host directory volumes
become: true
ansible.builtin.file:
path: "{{ item }}"
state: directory
owner: "{{ podman_user }}"
group: "{{ podman_user }}"
mode: 0755
notify: restorecon podman
loop:
- "{{ fulfillr_path }}"
- name: template fulfillr config
become: true
ansible.builtin.template:
src: "templates/fulfillr/{{ item }}.j2"
dest: "{{ fulfillr_path }}/{{ item }}"
owner: "{{ podman_user }}"
group: "{{ podman_user }}"
mode: 0644
loop:
- production.json
notify:
- restorecon podman
- name: flush handlers
ansible.builtin.meta: flush_handlers
- import_tasks: podman/podman-check.yml
vars:
container_name: fulfillr
container_image: "{{ image }}"
- name: create fulfillr server container
become: true
become_user: "{{ podman_user }}"
containers.podman.podman_container:
name: fulfillr
image: "{{ image }}"
image_strict: true
command: --config /config/production.json
restart_policy: on-failure:3
log_driver: journald
volumes:
- "{{ fulfillr_path }}:/config"
ports:
- 9054:8080/tcp
- name: create systemd startup job for fulfillr
include_tasks: podman/systemd-generate.yml
vars:
container_name: fulfillr