nas-services.yml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  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
  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. devices:
  55. - /dev/ttyUSB0:/dev/ttyUSB0
  56. volumes:
  57. - /opt/homeassistant:/config
  58. - /run/dbus:/run/dbus:ro
  59. restart: unless-stopped
  60. - name: mqtt
  61. active: true
  62. image: eclipse-mosquitto
  63. ports:
  64. - 1883:1883
  65. - 9001:9001
  66. volumes:
  67. - /opt/mqtt/config:/mosquitto/config
  68. - /opt/mqtt/data:/mosquitto/data
  69. - /opt/mqtt/logs:/mosquitto/log
  70. restart: unless-stopped
  71. networks:
  72. - jarvis
  73. - name: sickchill
  74. active: true
  75. image: linuxserver/sickchill
  76. ports:
  77. - 8081:8081
  78. volumes:
  79. - /opt/sickchill:/config
  80. - /mergerfs:/mergerfs
  81. include_global_env_vars: true
  82. restart: unless-stopped
  83. networks:
  84. - downloaders
  85. - name: transmission
  86. active: true
  87. image: linuxserver/transmission
  88. ports:
  89. - 9091:9091
  90. volumes:
  91. - /opt/transmission:/config
  92. - /mergerfs:/mergerfs
  93. include_global_env_vars: true
  94. environment:
  95. - USER={{ vaulted_nas_transmission_username }}
  96. - PASS={{ vaulted_nas_transmission_password }}
  97. restart: unless-stopped
  98. networks:
  99. - downloaders
  100. - name: qbittorrent
  101. active: true
  102. image: linuxserver/qbittorrent
  103. ports:
  104. - 8080:8080
  105. volumes:
  106. - /opt/qbittorrent:/config
  107. - /mergerfs:/mergerfs
  108. include_global_env_vars: true
  109. environment:
  110. - WEBUI_PORT=8080
  111. restart: unless-stopped
  112. networks:
  113. - downloaders
  114. - name: scrutiny
  115. active: true
  116. image: ghcr.io/analogj/scrutiny:master-omnibus
  117. ports:
  118. - 8088:8080
  119. - 8086:8086
  120. volumes:
  121. - /opt/scrutiny/config:/opt/scrutiny/config
  122. - /opt/scrutiny/influxdb2:/opt/scrutiny/influxdb
  123. - /run/udev:/run/udev:ro
  124. cap_add:
  125. - SYS_RAWIO
  126. - SYS_ADMIN # https://github.com/AnalogJ/scrutiny/issues/26#issuecomment-696817130
  127. devices:
  128. - /dev/sda
  129. - /dev/sdb
  130. - /dev/sdc
  131. - /dev/sdd
  132. - /dev/sde
  133. - /dev/sdf
  134. - /dev/sdg
  135. - /dev/sdh
  136. - name: watchyourlan
  137. active: true
  138. image: aceberg/watchyourlan
  139. network_mode: host
  140. environment:
  141. - IFACE=enp42s0
  142. - TZ=America/Los_Angeles
  143. - SHOURTRRR_URL=ntfy://ntfy.warchildstory.com/TestNotifications
  144. - GUIIP=0.0.0.0
  145. - GUIPORT=8840
  146. volumes:
  147. - /opt/wyl:/data
  148. ports:
  149. - 8840:8840
  150. metrics_monitored_hosts:
  151. - nas.home.arpa
  152. - gateway.home.arpa
  153. metrics_retention_days: 14
  154. metrics_graph_service: yes
  155. metrics_query_service: yes
  156. firewall:
  157. - {'service': 'grafana', 'state': 'enabled' }
  158. - {'service': 'http', 'state': 'enabled' }
  159. - {'port': '8080/tcp', 'state': 'enabled'}
  160. - {'port': '8081/tcp', 'state': 'enabled'}
  161. - {'port': '8086/tcp', 'state': 'enabled'}
  162. - {'port': '8088/tcp', 'state': 'enabled'}
  163. - {'port': '8840/tcp', 'state': 'enabled'}
  164. - {'port': '9091/tcp', 'state': 'enabled'}