Refactor to reduce config in group_vars
This commit is contained in:
37
roles/quadlets/unpackerr.yml
Normal file
37
roles/quadlets/unpackerr.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
quadlets:
|
||||
- name: unpackerr
|
||||
type: build
|
||||
image: localhost/unpackerr:latest
|
||||
pull: missing
|
||||
format: oci
|
||||
force_rm: true
|
||||
container_file: |
|
||||
FROM {{ alpine_base_image }}
|
||||
LABEL maintainer="{{ maintainer }}"
|
||||
RUN apk add --no-cache \
|
||||
-X "{{ alpine_mirror }}/v{{ alpine_base_image.split(':')[-1] }}/main" \
|
||||
-X "{{ alpine_mirror }}/v{{ alpine_base_image.split(':')[-1] }}/community" \
|
||||
curl tar jq \
|
||||
&& url=$(curl -sL "https://api.github.com/repos/davidnewhall/Unpackerr/releases/latest" \
|
||||
| jq -r '.assets[] | select(.name == "unpackerr.amd64.linux.gz") | .browser_download_url') \
|
||||
&& [ -n "$url" ] \
|
||||
&& curl -L -o /tmp/unpackerr.gz "$url" \
|
||||
&& mkdir -p /app \
|
||||
&& gunzip -c /tmp/unpackerr.gz > /app/unpackerr \
|
||||
&& chmod +x /app/unpackerr \
|
||||
&& rm /tmp/unpackerr.gz
|
||||
WORKDIR /app
|
||||
|
||||
- name: unpackerr
|
||||
type: container
|
||||
image: localhost/unpackerr:latest
|
||||
volumes:
|
||||
- "{{ config_root }}/unpackerr:/config:Z"
|
||||
- "{{ download_root }}/htpc:/downloads:z"
|
||||
env:
|
||||
TZ: "{{ tz }}"
|
||||
UNPACKERR__LOG__ANALYTICSENABLED: "{{ UNPACKERR__LOG__ANALYTICSENABLED | default(false) }}"
|
||||
UNPACKERR__UPDATE__AUTOMATICALLY: "{{ UNPACKERR__UPDATE__AUTOMATICALLY | default(false) }}"
|
||||
UNPACKERR__LOG__LEVEL: "{{ UNPACKERR__LOG__LEVEL | default('info') }}"
|
||||
command: ["/app/unpackerr"]
|
||||
restart_policy: on-failure
|
||||
Reference in New Issue
Block a user