--- - name: Create Arr stack directories ansible.builtin.file: path: "{{ item }}" state: directory owner: root group: root mode: "0755" loop: - "{{ arr_dir }}" - "{{ arr_config_root }}" - "{{ arr_media_root }}" - "{{ arr_downloads_root }}" tags: [arr] - name: Create Arr application config directories ansible.builtin.file: path: "{{ arr_config_root }}/{{ item.key }}" state: directory owner: root group: root mode: "0755" 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]