mosquitto

This commit is contained in:
mwiegand 2021-11-02 01:39:28 +01:00
parent a1a0beb8cb
commit ec4be43b5e
6 changed files with 41 additions and 13 deletions

View file

@ -51,14 +51,23 @@ def renew(metadata):
'letsencrypt/domains'
)
def delegated_domains(metadata):
delegated_domains = {
domain
for other_node in repo.nodes
if other_node.has_bundle('letsencrypt')
and other_node.metadata.get('letsencrypt/delegate_to_node', None) == node.name
for domain in other_node.metadata.get('letsencrypt/domains').keys()
}
return {
'letsencrypt': {
'domains': {
domain: set()
for other_node in repo.nodes
if other_node.has_bundle('letsencrypt')
and other_node.metadata.get('letsencrypt/delegate_to_node', None) == node.name
for domain in other_node.metadata.get('letsencrypt/domains').keys()
for domain in delegated_domains
},
},
'dns': {
domain: repo.libs.dns.get_a_records(metadata, internal=False)
for domain in delegated_domains
},
}

View file

@ -0,0 +1,20 @@
defaults = {
'apt': {
'packages': {
'mosquitto': {},
},
},
}
@metadata_reactor.provides(
'letsencrypt/domains'
)
def letsencrypt(metadata):
return {
'letsencrypt': {
'domains': {
metadata.get('mosquitto/hostname'): set(),
},
},
}

View file

@ -1,3 +1,3 @@
% for domain in domains:
% for domain in sorted(domains):
mail._domainkey.${domain} ${domain}:mail:/etc/opendkim/keys/${domain}/mail.private
% endfor

View file

@ -1,3 +1,3 @@
% for domain in domains:
% for domain in sorted(domains):
*@${domain} mail._domainkey.${domain}
% endfor

View file

@ -13,6 +13,7 @@
'grafana',
'influxdb2',
'mirror',
'mosquitto',
'postgresql',
'redis',
'smartctl',
@ -51,6 +52,9 @@
'letsencrypt': {
'delegate_to_node': 'htz.mails',
},
'mosquitto': {
'hostname': 'mqtt.sublimity.de',
},
'nextcloud': {
'hostname': 'cloud.sublimity.de',
'version': '21.0.5',
@ -61,11 +65,6 @@
'destination': 'Bilder/Chronologie',
},
},
'users': {
'root': {
'shell': '/usr/bin/zsh',
},
},
'vm': {
'cores': 2,
'ram': 16192,

View file

@ -69,7 +69,7 @@
'mailserver': {
'hostname': 'mail.sublimity.de',
'admin_email': 'postmaster@sublimity.de',
'domains': [
'domains': {
'ckn.li',
'sublimity.de',
'freibrief.net',
@ -79,7 +79,7 @@
'wettengl.net',
'wingl.de',
'woodpipe.de',
],
},
},
'rspamd': {
'hostname': 'rspamd.sublimity.de',