This commit is contained in:
mwiegand 2021-07-12 23:12:02 +02:00
parent ee09e81a22
commit ee1a166534
4 changed files with 67 additions and 10 deletions

View file

@ -96,12 +96,30 @@ def datasource_key_to_name(metadata):
}
# @metadata_reactor.provides(
# 'dns',
# )
# def dns(metadata):
# return {
# 'dns': {
# metadata.get('grafana/hostname'): repo.libs.dns.get_a_records(metadata),
# }
# }
@metadata_reactor.provides(
'dns',
'nginx/vhosts',
)
def dns(metadata):
def nginx(metadata):
return {
'dns': {
metadata.get('grafana/hostname'): repo.libs.dns.get_a_records(metadata),
}
'nginx': {
'vhosts': {
metadata.get('grafana/hostname'): {
'content': 'nginx/proxy_pass.conf',
'context': {
'target': 'http://127.0.0.1:8300',
}
},
},
},
}

View file

@ -44,12 +44,30 @@ def admin_password(metadata):
}
# @metadata_reactor.provides(
# 'dns',
# )
# def dns(metadata):
# return {
# 'dns': {
# metadata.get('influxdb/hostname'): repo.libs.dns.get_a_records(metadata),
# }
# }
@metadata_reactor.provides(
'dns',
'nginx/vhosts',
)
def dns(metadata):
def nginx(metadata):
return {
'dns': {
metadata.get('influxdb/hostname'): repo.libs.dns.get_a_records(metadata),
}
'nginx': {
'vhosts': {
metadata.get('influxdb/hostname'): {
'content': 'nginx/proxy_pass.conf',
'context': {
'target': 'http://127.0.0.1:8200',
}
},
},
},
}

6
data/nginx/redirect.conf Normal file
View file

@ -0,0 +1,6 @@
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name ${server_name};
return 302 ${target};
}

View file

@ -29,6 +29,7 @@
'woodpipe.de': [],
'ckn.li': [],
'islamicstate.eu': [],
'hausamsilberberg.de': [],
},
},
'dns': {
@ -99,6 +100,20 @@
},
'internal_dns': False,
},
'influxdb.sublimity.de': {
'content': 'nginx/proxy_pass.conf',
'context': {
'target': 'https://influxdb.sublimity.de:443',
},
'internal_dns': False,
},
'hausamsilberberg.de': {
'content': 'nginx/redirect.conf',
'context': {
'target': 'https://www.internationaler-bund.de/standort/204516',
},
'internal_dns': False,
},
},
},
'roundcube': {