nas-services.yml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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. - name: scrutiny
  75. active: true
  76. image: ghcr.io/analogj/scrutiny:master-omnibus
  77. ports:
  78. - 8088:8080
  79. - 8086:8086
  80. volumes:
  81. - /opt/scrutiny/config:/opt/scrutiny/config
  82. - /opt/scrutiny/influxdb2:/opt/scrutiny/influxdb
  83. - /run/udev:/run/udev:ro
  84. cap_add:
  85. - SYS_RAWIO
  86. - SYS_ADMIN # https://github.com/AnalogJ/scrutiny/issues/26#issuecomment-696817130
  87. devices:
  88. - /dev/sda
  89. - /dev/sdb
  90. - /dev/sdc
  91. - /dev/sdd
  92. - /dev/sde
  93. - /dev/sdf
  94. - /dev/sdg
  95. - /dev/sdi
  96. metrics_monitored_hosts: "{{ groups['nas'] }}" #TODO increase to others
  97. metrics_retention_days: 14
  98. metrics_graph_service: no
  99. metrics_query_service: no
  100. firewall:
  101. - service: grafana
  102. state: enabled
  103. - port: 8080/tcp
  104. state: enabled
  105. - port: 8081/tcp
  106. state: enabled
  107. - port: 8086/tcp
  108. state: enabled
  109. - port: 8088/tcp
  110. state: enabled
  111. - port: 9091/tcp
  112. state: enabled