nas-services.yml 4.2 KB

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