nas-services.yml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. ---
  2. - hosts: nas
  3. gather_facts: true
  4. become: true
  5. roles:
  6. - docker
  7. - cloud-backups
  8. - statusservices
  9. - linux-system-roles.metrics
  10. - linux-system-roles.firewall
  11. vars_files:
  12. - "{{ inventory_dir }}/vars/vault.yaml"
  13. vars:
  14. status_services_extra:
  15. - grafana-server
  16. - smb
  17. backups: containers
  18. backups_ignore: /mergerfs
  19. firewall_ports:
  20. - 8080/tcp
  21. - 8081/tcp
  22. - 9091/tcp
  23. container_user: "{{ vaulted_media_user }}"
  24. container_uid: "{{ vaulted_media_uid }}"
  25. container_group: "{{ vaulted_media_group }}"
  26. container_gid: "{{ vaulted_media_gid }}"
  27. global_env_vars:
  28. - PUID={{ container_uid }}
  29. - PGID={{ container_gid }}
  30. container_networks:
  31. - name: downloaders
  32. driver: bridge
  33. subnet: 172.21.10.0/24
  34. ip_range: 172.21.10.0/24
  35. gateway: 172.21.10.1
  36. containers:
  37. - name: sickchill
  38. active: true
  39. image: linuxserver/sickchill
  40. ports:
  41. - 8081:8081
  42. volumes:
  43. - /opt/sickchill:/config
  44. - /mergerfs:/mergerfs
  45. include_global_env_vars: true
  46. restart: unless-stopped
  47. networks:
  48. - downloaders
  49. - name: transmission
  50. active: true
  51. image: linuxserver/transmission
  52. ports:
  53. - 9091:9091
  54. volumes:
  55. - /opt/transmission:/config
  56. - /mergerfs/private/processing:/mergerfs/private/processing
  57. include_global_env_vars: true
  58. environment:
  59. - USER={{ vaulted_nas_transmission_username }}
  60. - PASS={{ vaulted_nas_transmission_password }}
  61. restart: unless-stopped
  62. networks:
  63. - downloaders
  64. - name: qbittorrent
  65. active: true
  66. image: linuxserver/qbittorrent
  67. ports:
  68. - 8080:8080
  69. volumes:
  70. - /opt/qbittorrent:/config
  71. - /mergerfs/private/processing/qbittorrent:/mergerfs/private/processing/qbittorent
  72. include_global_env_vars: true
  73. environment:
  74. - WEBUI_PORT=8080
  75. restart: unless-stopped
  76. networks:
  77. - downloaders
  78. metrics_monitored_hosts: "{{ groups['nas'] }}" #TODO increase to others
  79. metrics_retention_days: 14
  80. metrics_graph_service: yes
  81. metrics_query_service: yes
  82. firewall:
  83. - service: grafana
  84. state: enabled