nas-services.yml 4.1 KB

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