|
1 |
| -# Domini bloccati personalizzati |
2 |
| -resource "pihole_adlist" "steven_black" { |
3 |
| - url = "https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts" |
4 |
| - comment = "Lista personalizzata di blocco" |
5 |
| - enabled = true |
| 1 | +variable "adlists" { |
| 2 | + description = "Liste di blocco pubblicitarie" |
| 3 | + type = map(object({ |
| 4 | + url = string |
| 5 | + comment = string |
| 6 | + enabled = bool |
| 7 | + })) |
| 8 | + default = { |
| 9 | + steven_black = { |
| 10 | + url = "https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts" |
| 11 | + comment = "Steven Black unified hosts (ads + malware)" |
| 12 | + enabled = true |
| 13 | + } |
| 14 | + kad_hosts = { |
| 15 | + url = "https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts.txt" |
| 16 | + comment = "KAD hosts - ads and tracking" |
| 17 | + enabled = true |
| 18 | + } |
| 19 | + adguard_dns = { |
| 20 | + url = "https://v.firebog.net/hosts/AdguardDNS.txt" |
| 21 | + comment = "AdGuard DNS filter" |
| 22 | + enabled = true |
| 23 | + } |
| 24 | + easy_privacy = { |
| 25 | + url = "https://v.firebog.net/hosts/Easyprivacy.txt" |
| 26 | + comment = "EasyPrivacy - tracking protection" |
| 27 | + enabled = true |
| 28 | + } |
| 29 | + ads_tracking_extended = { |
| 30 | + url = "https://www.github.developerdan.com/hosts/lists/ads-and-tracking-extended.txt" |
| 31 | + comment = "DeveloperDan ads and tracking extended" |
| 32 | + enabled = true |
| 33 | + } |
| 34 | + spam_hosts = { |
| 35 | + url = "https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts" |
| 36 | + comment = "FadeMind spam hosts" |
| 37 | + enabled = true |
| 38 | + } |
| 39 | + w3kbl = { |
| 40 | + url = "https://v.firebog.net/hosts/static/w3kbl.txt" |
| 41 | + comment = "W3KBL - malware domains" |
| 42 | + enabled = true |
| 43 | + } |
| 44 | + prigent_ads = { |
| 45 | + url = "https://v.firebog.net/hosts/Prigent-Ads.txt" |
| 46 | + comment = "Prigent advertising domains" |
| 47 | + enabled = true |
| 48 | + } |
| 49 | + big_oisd = { |
| 50 | + url = "https://big.oisd.nl" |
| 51 | + comment = "OISD big list - comprehensive blocking" |
| 52 | + enabled = true |
| 53 | + } |
| 54 | + } |
6 | 55 | }
|
7 |
| -resource "pihole_adlist" "kad_hosts" { |
8 |
| - url = "https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts.txt" |
9 |
| - comment = "Lista personalizzata di blocco" |
10 |
| - enabled = true |
11 |
| -} |
12 |
| -resource "pihole_adlist" "adguard_dns" { |
13 |
| - url = "https://v.firebog.net/hosts/AdguardDNS.txt" |
14 |
| - comment = "Lista personalizzata di blocco" |
15 |
| - enabled = true |
16 |
| -} |
17 |
| -resource "pihole_adlist" "easy_privacy" { |
18 |
| - url = "https://v.firebog.net/hosts/Easyprivacy.txt" |
19 |
| - comment = "Lista personalizzata di blocco" |
20 |
| - enabled = true |
21 |
| -} |
22 |
| -resource "pihole_adlist" "ads_and_tracking_extended" { |
23 |
| - url = "https://www.github.developerdan.com/hosts/lists/ads-and-tracking-extended.txt" |
24 |
| - comment = "Lista personalizzata di blocco" |
25 |
| - enabled = true |
26 |
| -} |
27 |
| -resource "pihole_adlist" "spam_hosts" { |
28 |
| - url = "https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts" |
29 |
| - comment = "Lista personalizzata di blocco" |
30 |
| - enabled = true |
31 |
| -} |
32 |
| -resource "pihole_adlist" "ads_and_tracking_extended" { |
33 |
| - url = "https://www.github.developerdan.com/hosts/lists/ads-and-tracking-extended.txt" |
34 |
| - comment = "Lista personalizzata di blocco" |
35 |
| - enabled = true |
36 |
| -} |
37 |
| -resource "pihole_adlist" "w3kbl" { |
38 |
| - url = "https://v.firebog.net/hosts/static/w3kbl.txt" |
39 |
| - comment = "Lista personalizzata di blocco" |
40 |
| - enabled = true |
41 |
| -} |
42 |
| -resource "pihole_adlist" "prigent_ads" { |
43 |
| - url = "https://v.firebog.net/hosts/Prigent-Ads.txt" |
44 |
| - comment = "Lista personalizzata di blocco" |
45 |
| - enabled = true |
46 |
| -} |
47 |
| -resource "pihole_adlist" "big_oisd" { |
48 |
| - url = "https://big.oisd.nl" |
49 |
| - comment = "Lista personalizzata di blocco" |
50 |
| - enabled = true |
| 56 | + |
| 57 | +# NOTE: Il provider ryanwholey/pihole non supporta pihole_adlist |
| 58 | +# Configura manualmente queste adlist nell'interfaccia Pi-hole |
| 59 | + |
| 60 | +/* |
| 61 | +resource "pihole_adlist" "lists" { |
| 62 | + for_each = var.adlists |
| 63 | + |
| 64 | + url = each.value.url |
| 65 | + comment = each.value.comment |
| 66 | + enabled = each.value.enabled |
51 | 67 | }
|
| 68 | +*/ |
0 commit comments