nas-services.yml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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. container_user: "{{ vaulted_media_user }}"
  20. container_uid: "{{ vaulted_media_uid }}"
  21. container_group: "{{ vaulted_media_group }}"
  22. container_gid: "{{ vaulted_media_gid }}"
  23. global_env_vars:
  24. - PUID={{ container_uid }}
  25. - PGID={{ container_gid }}
  26. container_networks:
  27. - name: downloaders
  28. driver: bridge
  29. subnet: 172.21.10.0/24
  30. ip_range: 172.21.10.0/24
  31. gateway: 172.21.10.1
  32. containers:
  33. - name: sickchill
  34. active: true
  35. image: linuxserver/sickchill
  36. ports:
  37. - 8081:8081
  38. volumes:
  39. - /opt/sickchill:/config
  40. - /mergerfs:/mergerfs
  41. include_global_env_vars: true
  42. restart: unless-stopped
  43. networks:
  44. - downloaders
  45. - name: transmission
  46. active: true
  47. image: linuxserver/transmission
  48. ports:
  49. - 9091:9091
  50. volumes:
  51. - /opt/transmission:/config
  52. - /mergerfs/private/processing:/mergerfs/private/processing
  53. include_global_env_vars: true
  54. environment:
  55. - USER={{ vaulted_nas_transmission_username }}
  56. - PASS={{ vaulted_nas_transmission_password }}
  57. restart: unless-stopped
  58. networks:
  59. - downloaders
  60. - name: qbittorrent
  61. active: true
  62. image: linuxserver/qbittorrent
  63. ports:
  64. - 8080:8080
  65. volumes:
  66. - /opt/qbittorrent:/config
  67. - /mergerfs/private/processing/qbittorrent:/mergerfs/private/processing/qbittorent
  68. include_global_env_vars: true
  69. environment:
  70. - WEBUI_PORT=8080
  71. restart: unless-stopped
  72. networks:
  73. - downloaders
  74. metrics_monitored_hosts: "{{ groups['nas'] }}" #TODO increase to others
  75. metrics_retention_days: 14
  76. metrics_graph_service: yes
  77. metrics_query_service: yes
  78. firewall:
  79. - service: grafana
  80. state: enabled
  81. - port: 8080/tcp
  82. state: enabled
  83. - port: 8081/tcp
  84. state: enabled
  85. - port: 9091/tcp
  86. state: enabled