nas-services.yml 5.2 KB

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