nas-services.yml 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  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: esphome
  60. active: true
  61. image: ghcr.io/esphome/esphome
  62. privileged: true
  63. network_mode: host
  64. volumes:
  65. - /opt/esphome:/config
  66. - /etc/localtime:/etc/localtime:ro
  67. environment:
  68. - USERNAME={{ vaulted_esphome_username }}
  69. - PASSWORD={{ vaulted_esphome_password }}
  70. restart: unless-stopped
  71. - name: zigbee2mqtt
  72. active: true
  73. image: koenkk/zigbee2mqtt
  74. volumes:
  75. - /opt/zigbee2mqtt:/app/data
  76. - /run/udev:/run/udev:ro
  77. ports:
  78. - 8095:8095
  79. environment:
  80. - TZ=America/Los_Angeles
  81. devices:
  82. - /dev/ttyUSB0:/dev/ttyUSB0
  83. networks:
  84. - jarvis
  85. - name: mqtt
  86. active: true
  87. image: eclipse-mosquitto
  88. ports:
  89. - 1883:1883
  90. - 9001:9001
  91. volumes:
  92. - /opt/mqtt/config:/mosquitto/config
  93. - /opt/mqtt/data:/mosquitto/data
  94. - /opt/mqtt/logs:/mosquitto/log
  95. restart: unless-stopped
  96. networks:
  97. - jarvis
  98. - name: nginx
  99. active: true
  100. image: nginx
  101. ports:
  102. - 8092:80
  103. volumes:
  104. - /opt/nginx:/usr/share/nginx/html:ro
  105. - name: sickchill
  106. active: true
  107. image: linuxserver/sickchill
  108. ports:
  109. - 8081:8081
  110. volumes:
  111. - /opt/sickchill:/config
  112. - /mergerfs:/mergerfs
  113. include_global_env_vars: true
  114. restart: unless-stopped
  115. networks:
  116. - downloaders
  117. - name: transmission
  118. active: true
  119. image: linuxserver/transmission
  120. ports:
  121. - 9091:9091
  122. volumes:
  123. - /opt/transmission:/config
  124. - /mergerfs:/mergerfs
  125. include_global_env_vars: true
  126. environment:
  127. - USER={{ vaulted_nas_transmission_username }}
  128. - PASS={{ vaulted_nas_transmission_password }}
  129. restart: unless-stopped
  130. networks:
  131. - downloaders
  132. - name: qbittorrent
  133. active: true
  134. image: linuxserver/qbittorrent
  135. ports:
  136. - 8080:8080
  137. volumes:
  138. - /opt/qbittorrent:/config
  139. - /mergerfs:/mergerfs
  140. include_global_env_vars: true
  141. environment:
  142. - WEBUI_PORT=8080
  143. restart: unless-stopped
  144. networks:
  145. - downloaders
  146. - name: scrutiny
  147. active: true
  148. image: ghcr.io/analogj/scrutiny:master-omnibus
  149. ports:
  150. - 8088:8080
  151. - 8086:8086
  152. volumes:
  153. - /opt/scrutiny/config:/opt/scrutiny/config
  154. - /opt/scrutiny/influxdb2:/opt/scrutiny/influxdb
  155. - /run/udev:/run/udev:ro
  156. cap_add:
  157. - SYS_RAWIO
  158. - SYS_ADMIN # https://github.com/AnalogJ/scrutiny/issues/26#issuecomment-696817130
  159. devices:
  160. - /dev/sda
  161. - /dev/sdb
  162. - /dev/sdc
  163. - /dev/sdd
  164. - /dev/sde
  165. - /dev/sdf
  166. - /dev/sdg
  167. - /dev/sdh
  168. - name: watchyourlan
  169. active: true
  170. image: aceberg/watchyourlan
  171. network_mode: host
  172. environment:
  173. - IFACE=enp42s0
  174. - TZ=America/Los_Angeles
  175. - SHOURTRRR_URL=ntfy://ntfy.warchildstory.com/TestNotifications
  176. - GUIIP=0.0.0.0
  177. - GUIPORT=8840
  178. volumes:
  179. - /opt/wyl:/data
  180. ports:
  181. - 8840:8840
  182. timesync_ntp_servers:
  183. - hostname: 2.centos.pool.ntp.org
  184. iburst: true
  185. pool: true
  186. timesync_chrony_custom_settings:
  187. - "allow 10.0.0.0/24"
  188. metrics_monitored_hosts:
  189. - nas.home.arpa
  190. - gateway.home.arpa
  191. metrics_retention_days: 14
  192. metrics_graph_service: yes
  193. metrics_query_service: yes
  194. firewall:
  195. - {'service': 'grafana', 'state': 'enabled' }
  196. - {'service': 'http', 'state': 'enabled' }
  197. - {'port': '8080/tcp', 'state': 'enabled'}
  198. - {'port': '8081/tcp', 'state': 'enabled'}
  199. - {'port': '8086/tcp', 'state': 'enabled'}
  200. - {'port': '8088/tcp', 'state': 'enabled'}
  201. - {'port': '8840/tcp', 'state': 'enabled'}
  202. - {'port': '9091/tcp', 'state': 'enabled'}