nas-services.yml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. ---
  2. - hosts: nas
  3. gather_facts: true
  4. become: true
  5. roles:
  6. - docker
  7. - yt-dlp
  8. - cloud-backups
  9. - statusservices
  10. - linux-system-roles.metrics
  11. - linux-system-roles.firewall
  12. vars_files:
  13. - "{{ inventory_dir }}/vars/vault.yaml"
  14. vars:
  15. status_services_extra:
  16. - grafana-server
  17. - smb
  18. backups: containers
  19. backups_ignore:
  20. - /mergerfs
  21. - /run/udev
  22. container_user: "{{ vaulted_media_user }}"
  23. container_uid: "{{ vaulted_media_uid }}"
  24. container_group: "{{ vaulted_media_group }}"
  25. container_gid: "{{ vaulted_media_gid }}"
  26. global_env_vars:
  27. - PUID={{ container_uid }}
  28. - PGID={{ container_gid }}
  29. container_networks:
  30. - name: downloaders
  31. driver: bridge
  32. subnet: 172.21.10.0/24
  33. ip_range: 172.21.10.0/24
  34. gateway: 172.21.10.1
  35. containers:
  36. - name: heimdall
  37. active: true
  38. image: linuxserver/heimdall
  39. ports:
  40. - 80:80
  41. volumes:
  42. - /opt/heimdall:/config
  43. include_global_env_vars: true
  44. restart: unless-stopped
  45. - name: homeassistant
  46. active: true
  47. image: ghcr.io/home-assistant/home-assistant:stable
  48. privileged: true
  49. ports:
  50. - 137:137
  51. - 138:138
  52. - 139:139
  53. - 323:323
  54. - 445:445
  55. - 1900:1900
  56. - 4330:4330
  57. - 4331:4331
  58. - 5353:5353
  59. - 6379:6379
  60. - 8008:8008
  61. - 8080:8080
  62. - 8081:8081
  63. - 8086:8086
  64. - 8088:8088
  65. - 8123:8123
  66. - 9091:9091
  67. - 34464:34464
  68. - 38439:38439
  69. - 38975:38975
  70. - 40000:40000
  71. - 42298:42298
  72. - 44321:44321
  73. - 44322:44322
  74. - 44323:44323
  75. environment:
  76. - TZ=America/Los_Angeles
  77. devices:
  78. - /dev/ptmx:/dev/ptmx
  79. - /dev/ttyUSB0:/dev/ttyUSB0
  80. volumes:
  81. - /opt/homeassistant:/config
  82. - /run/dbus:/run/dbus:ro
  83. restart: unless-stopped
  84. networks:
  85. - jarvis
  86. - name: sickchill
  87. active: true
  88. image: linuxserver/sickchill
  89. ports:
  90. - 8081:8081
  91. volumes:
  92. - /opt/sickchill:/config
  93. - /mergerfs:/mergerfs
  94. include_global_env_vars: true
  95. restart: unless-stopped
  96. networks:
  97. - downloaders
  98. - name: transmission
  99. active: true
  100. image: linuxserver/transmission
  101. ports:
  102. - 9091:9091
  103. volumes:
  104. - /opt/transmission:/config
  105. - /mergerfs:/mergerfs
  106. include_global_env_vars: true
  107. environment:
  108. - USER={{ vaulted_nas_transmission_username }}
  109. - PASS={{ vaulted_nas_transmission_password }}
  110. restart: unless-stopped
  111. networks:
  112. - downloaders
  113. - name: qbittorrent
  114. active: true
  115. image: linuxserver/qbittorrent
  116. ports:
  117. - 8080:8080
  118. volumes:
  119. - /opt/qbittorrent:/config
  120. - /mergerfs:/mergerfs
  121. include_global_env_vars: true
  122. environment:
  123. - WEBUI_PORT=8080
  124. restart: unless-stopped
  125. networks:
  126. - downloaders
  127. - name: scrutiny
  128. active: true
  129. image: ghcr.io/analogj/scrutiny:master-omnibus
  130. ports:
  131. - 8088:8080
  132. - 8086:8086
  133. volumes:
  134. - /opt/scrutiny/config:/opt/scrutiny/config
  135. - /opt/scrutiny/influxdb2:/opt/scrutiny/influxdb
  136. - /run/udev:/run/udev:ro
  137. cap_add:
  138. - SYS_RAWIO
  139. - SYS_ADMIN # https://github.com/AnalogJ/scrutiny/issues/26#issuecomment-696817130
  140. devices:
  141. - /dev/sda
  142. - /dev/sdb
  143. - /dev/sdc
  144. - /dev/sdd
  145. - /dev/sde
  146. - /dev/sdf
  147. - /dev/sdg
  148. - /dev/sdh
  149. - name: watchyourlan
  150. active: true
  151. image: aceberg/watchyourlan
  152. network_mode: host
  153. environment:
  154. - IFACE=enp42s0
  155. - TZ=America/Los_Angeles
  156. - SHOURTRRR_URL=ntfy://ntfy.warchildstory.com/TestNotifications
  157. - GUIIP=0.0.0.0
  158. - GUIPORT=8840
  159. volumes:
  160. - /opt/wyl:/data
  161. ports:
  162. - 8840:8840
  163. metrics_monitored_hosts:
  164. - nas.home.arpa
  165. - gateway.home.arpa
  166. metrics_retention_days: 14
  167. metrics_graph_service: yes
  168. metrics_query_service: yes
  169. firewall:
  170. - {'service': 'grafana', 'state': 'enabled' }
  171. - {'service': 'http', 'state': 'enabled' }
  172. - {'port': '8080/tcp', 'state': 'enabled'}
  173. - {'port': '8081/tcp', 'state': 'enabled'}
  174. - {'port': '8086/tcp', 'state': 'enabled'}
  175. - {'port': '8088/tcp', 'state': 'enabled'}
  176. - {'port': '8840/tcp', 'state': 'enabled'}
  177. - {'port': '9091/tcp', 'state': 'enabled'}