nas-services.yml 5.0 KB

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