implemented compose by url, parse, local yaml.
This commit is contained in:
1 parent
53695f4fff
commit
784fff8faf
218 files changed
+2271
-640
No files matched your search
@@ -0,0 +1 @@
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
- name: restart arr
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: "{{ arr_dir }}"
|
||||
state: restarted
|
||||
|
||||
+19
-40
@@ -23,43 +23,22 @@
|
||||
loop: "{{ arr_services | dict2items }}"
|
||||
tags: [arr, config]
|
||||
|
||||
- name: Render Arr environment
|
||||
ansible.builtin.template:
|
||||
src: env.j2
|
||||
dest: "{{ arr_dir }}/.env"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
tags: [arr, config]
|
||||
|
||||
- name: Ensure Arr proxy network exists
|
||||
community.docker.docker_network:
|
||||
name: "{{ arr_traefik_network }}"
|
||||
state: present
|
||||
when: arr_routing_mode == "traefik"
|
||||
tags: [arr, docker]
|
||||
|
||||
- name: Render Arr Compose file
|
||||
ansible.builtin.template:
|
||||
src: compose.yaml.j2
|
||||
dest: "{{ arr_dir }}/compose.yaml"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
notify: restart arr
|
||||
tags: [arr, compose]
|
||||
|
||||
- name: Allow Arr ports
|
||||
community.general.ufw:
|
||||
rule: allow
|
||||
port: "{{ item }}"
|
||||
proto: tcp
|
||||
loop: "{{ arr_tcp_ports }}"
|
||||
when: arr_routing_mode == "host"
|
||||
tags: [arr, firewall]
|
||||
|
||||
- name: Start Arr stack
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: "{{ arr_dir }}"
|
||||
state: present
|
||||
tags: [arr, compose]
|
||||
- name: Deploy Arr Compose project
|
||||
ansible.builtin.include_role:
|
||||
name: compose_project
|
||||
vars:
|
||||
compose_project_dir: "{{ arr_dir }}"
|
||||
compose_project_directories:
|
||||
- "{{ arr_dir }}"
|
||||
- "{{ arr_config_root }}"
|
||||
- "{{ arr_media_root }}"
|
||||
- "{{ arr_downloads_root }}"
|
||||
compose_project_env_template_src: "{{ playbook_dir }}/../roles/arr/templates/env.j2"
|
||||
compose_project_env_mode: "0644"
|
||||
compose_project_compose_template_src: "{{ playbook_dir }}/../roles/arr/templates/compose.yaml.j2"
|
||||
compose_project_override_template_src: "{{ playbook_dir }}/../roles/arr/templates/compose.override.yaml.j2"
|
||||
compose_project_create_proxy_network: "{{ arr_routing_mode == 'traefik' }}"
|
||||
compose_project_proxy_network: "{{ arr_traefik_network }}"
|
||||
compose_project_firewall_ports: "{{ arr_tcp_ports }}"
|
||||
compose_project_firewall_enabled: "{{ arr_routing_mode in ['host', 'traefik_file'] }}"
|
||||
tags: [arr]
|
||||
@@ -0,0 +1,5 @@
|
||||
services:
|
||||
{% for name, service in arr_services.items() %}
|
||||
{{ name }}: {}
|
||||
{% endfor %}
|
||||
|
||||
@@ -4,9 +4,9 @@ services:
|
||||
image: {{ service.image }}
|
||||
restart: unless-stopped
|
||||
env_file: .env
|
||||
{% if arr_routing_mode == "host" %}
|
||||
{% if arr_routing_mode in ["host", "traefik_file"] %}
|
||||
ports:
|
||||
- "{{ service.port }}:{{ service.port }}"
|
||||
- "{{ nbops_traefik_file_bind_address if arr_routing_mode == 'traefik_file' else '0.0.0.0' }}:{{ service.port }}:{{ service.port }}"
|
||||
{% endif %}
|
||||
{% if arr_routing_mode == "traefik" %}
|
||||
# internal service port: {{ service.port }}; not published on the Docker host
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
# Upstream Snapshot
|
||||
|
||||
This directory stores copied upstream reference files for the `arr` role.
|
||||
|
||||
See `docs/upstream-sources.yml` for repository URLs, refs, README paths, Compose paths, and verification status.
|
||||
|
||||
Snapshot files are reference material only. Deployments are generated from this role's `templates/` directory.
|
||||
Reference in new issue
Block a user