Compare commits

...

2 commits

Author SHA1 Message Date
ea447ba24c
wip 2024-09-21 18:31:00 +02:00
3066ae699b
TOTAL FACKUP 2024-09-21 14:42:25 +02:00
17 changed files with 101 additions and 137 deletions

View file

@ -56,6 +56,7 @@ for domain in node.metadata.get('letsencrypt/domains').keys():
'unless': f'/etc/dehydrated/letsencrypt-ensure-some-certificate {domain} true',
'needs': {
'file:/etc/dehydrated/letsencrypt-ensure-some-certificate',
'pkg_apt:dehydrated',
},
'needed_by': {
'svc_systemd:nginx',

View file

@ -13,6 +13,7 @@ directories = {
],
'needed_by': [
'pkg_apt:mariadb-server',
'pkg_apt:mariadb-client',
],
},
}
@ -30,6 +31,7 @@ svc_systemd = {
'mariadb.service': {
'needs': [
'pkg_apt:mariadb-server',
'pkg_apt:mariadb-client',
],
},
}

View file

@ -1,7 +1,16 @@
defaults = {
'apt': {
'packages': {
'mariadb-server': {},
'mariadb-server': {
'needs': {
'zfs_dataset:tank/mariadb',
},
},
'mariadb-client': {
'needs': {
'zfs_dataset:tank/mariadb',
},
},
},
},
'mariadb': {

View file

@ -6,7 +6,11 @@ root_password = repo.vault.password_for(f'{node.name} postgresql root')
defaults = {
'apt': {
'packages': {
'postgresql': {},
'postgresql': {
'needs': {
'zfs_dataset:tank/postgresql',
},
},
},
},
'backup': {

View file

@ -6,80 +6,16 @@ $config['enable_installer'] = true;
/* Local configuration for Roundcube Webmail */
$config['db_dsnw'] = '${database['provider']}://${database['user']}:${database['password']}@${database['host']}/${database['name']}';
$config['imap_host'] = 'localhost';
$config['smtp_host'] = 'tls://localhost';
$config['smtp_user'] = '%u';
$config['smtp_pass'] = '%p';
$config['support_url'] = '';
$config['des_key'] = '${des_key}';
$config['product_name'] = '${product_name}';
$config['plugins'] = array(${', '.join(f'"{plugin}"' for plugin in plugins)});
$config['language'] = 'de_DE';
$config['smtp_conn_options'] = array(
'ssl' => array(
'verify_peer' => false,

View file

@ -1,7 +1,5 @@
<?php
$config['password_driver'] = 'sql';
$config['password_strength_driver'] = null;
$config['password_confirm_current'] = true;

View file

@ -1,7 +1,8 @@
assert node.has_bundle('php')
assert node.has_bundle('mailserver')
version = node.metadata.get('roundcube/version')
roundcube_version = node.metadata.get('roundcube/version')
php_version = node.metadata.get('php/version')
directories = {
'/opt/roundcube': {
@ -22,9 +23,9 @@ directories = {
}
files[f'/tmp/roundcube-{version}.tar.gz'] = {
files[f'/tmp/roundcube-{roundcube_version}.tar.gz'] = {
'content_type': 'download',
'source': f'https://github.com/roundcube/roundcubemail/releases/download/{version}/roundcubemail-{version}-complete.tar.gz',
'source': f'https://github.com/roundcube/roundcubemail/releases/download/{roundcube_version}/roundcubemail-{roundcube_version}-complete.tar.gz',
'triggered': True,
}
actions['delete_roundcube'] = {
@ -32,11 +33,11 @@ actions['delete_roundcube'] = {
'triggered': True,
}
actions['extract_roundcube'] = {
'command': f'tar xfvz /tmp/roundcube-{version}.tar.gz --strip 1 -C /opt/roundcube',
'unless': f'grep -q "Version {version}" /opt/roundcube/index.php',
'command': f'tar xfvz /tmp/roundcube-{roundcube_version}.tar.gz --strip 1 -C /opt/roundcube',
'unless': f'grep -q "Version {roundcube_version}" /opt/roundcube/index.php',
'preceded_by': [
'action:delete_roundcube',
f'file:/tmp/roundcube-{version}.tar.gz',
f'file:/tmp/roundcube-{roundcube_version}.tar.gz',
],
'needs': [
'directory:/opt/roundcube',
@ -64,6 +65,9 @@ files['/opt/roundcube/config/config.inc.php'] = {
'needs': [
'action:chown_roundcube',
],
'triggers': [
f'svc_systemd:php{php_version}-fpm.service:restart',
],
}
files['/opt/roundcube/plugins/password/config.inc.php'] = {
'source': 'password.config.inc.php',

View file

@ -15,16 +15,16 @@ files = {
'svc_systemd:telegraf:restart',
],
},
'/usr/local/share/telegraf/procio': {
'content_type': 'download',
'source': f"https://dl.sublimity.de/telegraf-procio/telegraf-procio-{node.metadata.get('system/architecture')}-latest",
'mode': '0755',
},
'/usr/local/share/telegraf/pressure_stall': {
'content_type': 'download',
'source': f"https://dl.sublimity.de/telegraf-pressure-stall/telegraf-pressure-stall-{node.metadata.get('system/architecture')}-latest",
'mode': '0755',
},
# '/usr/local/share/telegraf/procio': {
# 'content_type': 'download',
# 'source': f"https://dl.sublimity.de/telegraf-procio/telegraf-procio-{node.metadata.get('system/architecture')}-latest",
# 'mode': '0755',
# },
# '/usr/local/share/telegraf/pressure_stall': {
# 'content_type': 'download',
# 'source': f"https://dl.sublimity.de/telegraf-pressure-stall/telegraf-pressure-stall-{node.metadata.get('system/architecture')}-latest",
# 'mode': '0755',
# },
}
svc_systemd['telegraf'] = {

View file

@ -73,20 +73,20 @@ defaults = {
'system': {h({})},
'net': {h({})},
'exec': {
h({
'commands': [
f'sudo /usr/local/share/telegraf/procio',
],
'data_format': 'influx',
'interval': '20s',
}),
h({
'commands': [
f'/usr/local/share/telegraf/pressure_stall',
],
'data_format': 'influx',
'interval': '10s',
}),
# h({
# 'commands': [
# f'sudo /usr/local/share/telegraf/procio',
# ],
# 'data_format': 'influx',
# 'interval': '20s',
# }),
# h({
# 'commands': [
# f'/usr/local/share/telegraf/pressure_stall',
# ],
# 'data_format': 'influx',
# 'interval': '10s',
# }),
},
},
},

View file

@ -23,16 +23,16 @@
'metadata': {
'dns': {},
'hosts': {
'10.0.11.3': [
'10.0.10.2': [
'resolver.name',
'secondary.resolver.name',
],
},
'letsencrypt': {
'acme_node': 'netcup.mails',
'acme_node': 'htz.mails',
},
'nameservers': {
'10.0.11.3',
'10.0.10.2',
},
'systemd-timers': {
'trim': {

View file

@ -68,20 +68,20 @@
},
},
'hosts': {
'10.0.11.3': [
'10.0.10.2': [
'resolver.name',
'secondary.resolver.name',
],
},
'letsencrypt': {
'acme_node': 'netcup.mails',
'acme_node': 'htz.mails',
},
'homeassistant': {
'domain': 'homeassistant.ckn.li',
'os_agent_version': '1.6.0',
},
'nameservers': {
'10.0.11.3',
'10.0.10.2',
},
'users': {
'ckn': {

View file

@ -63,7 +63,7 @@
'target': 'aarch64-unknown-linux-gnu',
},
},
'download_server': 'netcup.mails',
'download_server': 'htz.mails',
},
'gitea': {
'version': '7.0.1',
@ -169,10 +169,10 @@
'wireguard': {
'my_ip': '172.30.0.2/32',
's2s': {
'netcup.mails': {
'htz.mails': {
'allowed_ips': [
'10.0.10.0/24',
'10.0.11.0/24',
'10.0.10.0/24',
'192.168.179.0/24',
'10.0.227.0/24', # mseibert.freescout
],

View file

@ -37,7 +37,7 @@
'network': {
'internal': {
'interface': 'ens10',
'ipv4': '10.0.10.3/32',
'ipv4': '10.0.10.2/32',
},
'external': {
'interface': 'eth0',

View file

@ -1,13 +1,14 @@
{
'hostname': '202.61.255.108',
'hostname': '49.12.184.229',
'groups': [
'backup',
#'backup',
'debian-12',
'hetzner-cloud',
'mailserver',
'monitored',
#'monitored',
'webserver',
'dnsserver',
'wordpress',
#'wordpress',
#'left4dead2',
],
'bundles': [
@ -15,23 +16,32 @@
'build-ci',
'download-server',
'islamicstate.eu',
'nginx-rtmps',
#'nginx-rtmps',
#'steam',
'wireguard',
'zfs',
],
'metadata': {
'users': {
'root': {
#'password': 'November99!!..',
},
},
'id': 'ea29bdf0-0b47-4bf4-8346-67d60c9dc4ae',
'network': {
'internal': {
'interface': 'eth1',
'ipv4': '10.0.11.3/24',
'interface': 'enp7s0',
'ipv4': '10.0.10.2/24',
},
'external': {
'interface': 'eth0',
'ipv4': '202.61.255.108/22',
'gateway4': '202.61.252.1',
'ipv6': '2a03:4000:55:a89::1/64',
'ipv4': '49.12.184.229/32',
'gateway4': '172.31.1.1',
'ipv6': '2a01:4f8:c013:51f2::1',
'gateway6': 'fe80::1',
}
},
@ -58,20 +68,20 @@
},
'dns': {
'ckn.li': {
'A': ['202.61.255.108'],
'AAAA': ['2a01:4f8:1c1c:4121::1'],
'A': ['49.12.184.229'],
'AAAA': ['2a01:4f8:c013:51f2::1'],
},
'sublimity.de': {
'A': ['202.61.255.108'],
'AAAA': ['2a01:4f8:1c1c:4121::1'],
'A': ['49.12.184.229'],
'AAAA': ['2a01:4f8:c013:51f2::1'],
},
'freibrief.net': {
'A': ['202.61.255.108'],
'AAAA': ['2a01:4f8:1c1c:4121::1'],
'A': ['49.12.184.229'],
'AAAA': ['2a01:4f8:c013:51f2::1'],
},
'left4.me': {
'A': ['202.61.255.108'],
'AAAA': ['2a01:4f8:1c1c:4121::1'],
'A': ['49.12.184.229'],
'AAAA': ['2a01:4f8:c013:51f2::1'],
},
'elimu-kwanza.de': {
'TXT': ['google-site-verification=JwgcfXQ6nIXKxjMqUGHVBDISgMCQXgzMryPBsP2ZXnE'],
@ -209,7 +219,7 @@
},
'ovh.secondary': {
'allowed_ips': [
'10.0.11.0/24',
'10.0.10.0/24',
],
},
'wb.offsite-backups': {
@ -239,7 +249,7 @@
'pools': {
'tank': {
'devices': [
'/dev/sda4',
'/dev/disk/by-id/scsi-0HC_Volume_101332312',
],
},
},

View file

@ -1,5 +1,5 @@
{
#'dummy': True,
'dummy': True,
'hostname': '159.69.117.89',
'groups': [
'backup',
@ -37,13 +37,13 @@
'wireguard': {
'my_ip': '172.30.0.238/32',
's2s': {
'netcup.mails': {
'htz.mails': {
'allowed_ips': [
'10.0.0.0/24',
'10.0.2.0/24',
'10.0.9.0/24',
'10.0.10.0/24',
'10.0.11.0/24',
'10.0.10.0/24',
],
},
},

View file

@ -20,22 +20,22 @@
},
},
'bind': {
'master_node': 'netcup.mails',
'master_node': 'htz.mails',
'hostname': 'secondary.resolver.name',
},
# 'postfix': {
# 'master_node': 'netcup.mails',
# 'master_node': 'htz.mails',
# 'hostname': 'mail2.sublimity.de',
# },
'wireguard': {
'my_ip': '172.30.0.3/32',
's2s': {
'netcup.mails': {
'htz.mails': {
'allowed_ips': [
'10.0.0.0/24',
'10.0.2.0/24',
'10.0.9.0/24',
'10.0.11.0/24',
'10.0.10.0/24',
],
},
},

View file

@ -43,13 +43,13 @@
'wireguard': {
'my_ip': '172.30.0.4/32',
's2s': {
'netcup.mails': {
'htz.mails': {
'allowed_ips': [
'10.0.0.0/24',
'10.0.2.0/24',
'10.0.9.0/24',
'10.0.10.0/24',
'10.0.11.0/24',
'10.0.10.0/24',
],
},
},