Ver Fonte

add nas-services.yml playbook

Blaine Story há 2 anos atrás
pai
commit
aaf29d26e7
2 ficheiros alterados com 81 adições e 12 exclusões
  1. 81 0
      plays/nas-services.yml
  2. 0 12
      plays/nodes/nas.yml

+ 81 - 0
plays/nas-services.yml

@@ -0,0 +1,81 @@
+---
+- hosts: nas
+  gather_facts: true
+  become: true
+  vars_files:
+    - "{{ inventory_dir }}/vars/vault.yaml"
+  vars:
+    service_list: "smb" # non-container services
+    backups: containers
+    backups_ignore: /mergerfs
+
+    firewall_ports:
+      - 8080/tcp
+      - 8081/tcp
+      - 9091/tcp
+
+    container_user: "{{ vaulted_container_user }}"
+    container_uid: "{{ vaulted_media_uid }}"
+    container_group: "{{ vaulted_container_group }}"
+    container_gid: "{{ vaulted_media_gid }}"
+
+    global_env_vars:
+      - PUID={{ container_uid }}
+      - PGID={{ container_gid }}
+
+    container_networks:
+      - name: downloaders
+        driver: bridge
+        subnet: 172.21.10.0/24
+        ip_range: 172.21.10.0/24
+        gateway: 172.21.10.1
+
+    containers:
+      - name: sickchill
+        active: true
+        image: linuxserver/sickchill
+        ports:
+          - 8081:8081
+        volumes:
+          - /opt/sickchill:/config
+          - /mergerfs:/mergerfs
+        include_global_env_vars: true
+        restart: unless-stopped
+        networks:
+          - downloaders
+
+      - name: transmission
+        active: true
+        image: linuxserver/transmission
+        ports:
+          - 9091:9091
+        volumes:
+          - /opt/transmission:/config
+          - /mergerfs/private/processing:/mergerfs/private/processing
+        include_global_env_vars: true
+        environment:
+          - USER={{ vaulted_nas_transmission_username }}
+          - PASS={{ vaulted_nas_transmission_password }}
+        restart: unless-stopped
+        networks:
+          - downloaders
+
+      - name: qbittorrent
+        active: true
+        image: linuxserver/qbittorrent
+        ports:
+          - 8080:8080
+        volumes:
+          - /opt/qbittorrent:/config
+          - /mergerfs/private/processing/qbittorrent:/mergerfs/private/processing/qbittorent
+        include_global_env_vars: true
+        environment:
+          - WEBUI_PORT=8080
+        restart: unless-stopped
+        networks:
+          - downloaders
+
+  roles:
+    - docker
+    - cloud-backups
+    - statusservices

+ 0 - 12
plays/nodes/nas.yml

@@ -1,12 +0,0 @@
----
-- hosts: nas
-  gather_facts: true
-  become: true
-  vars_files:
-    - "{{ inventory_dir }}/vars/vault.yaml"
-  roles:
-    - docker
-    - cloud-backups
-    - statusservices
-    - mergerfs
-    - snapraid