nas-services.yml 5.7 KB

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