Clean up of iot block lists
This commit is contained in:
parent
77c7c6b36c
commit
8e8dbc3e65
@ -14,7 +14,6 @@ job "blocky" {
|
||||
|
||||
update {
|
||||
max_parallel = 1
|
||||
# TODO: maybe switch to service job from system so we can use canary and autorollback
|
||||
auto_revert = true
|
||||
min_healthy_time = "60s"
|
||||
healthy_deadline = "5m"
|
||||
@ -210,7 +209,36 @@ job "blocky" {
|
||||
{{- end }}
|
||||
EOF
|
||||
destination = "$${NOMAD_TASK_DIR}/wemo.txt"
|
||||
change_mode = "noop"
|
||||
change_mode = "script"
|
||||
|
||||
change_script {
|
||||
command = "/app/blocky"
|
||||
args = ["lists", "refresh"]
|
||||
timeout = "20s"
|
||||
}
|
||||
|
||||
wait {
|
||||
min = "10s"
|
||||
max = "20s"
|
||||
}
|
||||
}
|
||||
|
||||
template {
|
||||
data = <<EOF
|
||||
{{ if nomadVarExists "blocky_lists/terraform" }}
|
||||
{{ with nomadVar "blocky_lists/terraform" -}}
|
||||
{{ .sonos.Value }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
EOF
|
||||
destination = "$${NOMAD_TASK_DIR}/sonos.txt"
|
||||
change_mode = "script"
|
||||
|
||||
change_script {
|
||||
command = "/app/blocky"
|
||||
args = ["lists", "refresh"]
|
||||
timeout = "20s"
|
||||
}
|
||||
|
||||
wait {
|
||||
min = "10s"
|
||||
|
@ -72,6 +72,7 @@ resource "nomad_variable" "blocky_lists_terraform" {
|
||||
items = {
|
||||
smarttv_regex = file("${path.module}/list-smarttv-regex.txt")
|
||||
wemo = file("${path.module}/list-wemo.txt")
|
||||
sonos = file("${path.module}/list-sonos.txt")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -78,11 +78,11 @@ blocking:
|
||||
- https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
|
||||
- https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
|
||||
# - https://hosts-file.net/ad_servers.txt
|
||||
smarttv:
|
||||
iot:
|
||||
- https://raw.githubusercontent.com/Perflyst/PiHoleBlocklist/master/SmartTV.txt
|
||||
- {{ env "NOMAD_TASK_DIR" }}/smarttv-regex.txt
|
||||
wemo:
|
||||
- {{ env "NOMAD_TASK_DIR" }}/wemo.txt
|
||||
- {{ env "NOMAD_TASK_DIR" }}/sonos.txt
|
||||
antisocial:
|
||||
- |
|
||||
facebook.com
|
||||
@ -101,8 +101,10 @@ blocking:
|
||||
default:
|
||||
- ads
|
||||
- custom
|
||||
- smarttv
|
||||
- wemo
|
||||
192.168.3.1/24:
|
||||
- ads
|
||||
- iot
|
||||
- custom
|
||||
|
||||
customDNS:
|
||||
customTTL: 1h
|
||||
|
2
core/blocky/list-sonos.txt
Normal file
2
core/blocky/list-sonos.txt
Normal file
@ -0,0 +1,2 @@
|
||||
# Block Sonos devices from phoning home and allowing remote access
|
||||
(^|\.)sonos\.com$
|
Loading…
Reference in New Issue
Block a user