nas-services.yml 4.5 KB

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