Compare commits

..

9 commits

Author SHA1 Message Date
5959d896e0
wip 2025-06-22 21:04:43 +02:00
171ca93fbb
wip 2025-06-22 20:12:52 +02:00
996a6d1ceb
wip 2025-06-22 20:11:03 +02:00
2bcdeb372e
wip 2025-06-22 17:22:36 +02:00
782b11d9d1
wip 2025-06-22 16:48:22 +02:00
d423cb3531
wip 2025-06-22 16:43:44 +02:00
e71b5159ed
wip 2025-06-22 14:38:50 +02:00
a461aca4c4
mailman wip 2025-06-22 14:00:59 +02:00
7350b01403
wip 2025-06-22 10:57:27 +02:00
12 changed files with 97 additions and 77 deletions

View file

@ -1,3 +0,0 @@
# svc_systemd = {
# 'ifupdown.service': {},
# }

View file

@ -0,0 +1,11 @@
% for section, options in sorted(conf.items()):
[${section}]
% for key, value in sorted(options.items()):
% if value is None:
${key}
% else:
${key} = ${value}
% endif
% endfor
% endfor

View file

@ -10,6 +10,8 @@ directories = {
'group': 'mysql', 'group': 'mysql',
'needs': [ 'needs': [
'zfs_dataset:tank/mariadb', 'zfs_dataset:tank/mariadb',
],
'needs': [
'pkg_apt:mariadb-server', 'pkg_apt:mariadb-server',
'pkg_apt:mariadb-client', 'pkg_apt:mariadb-client',
], ],
@ -18,8 +20,10 @@ directories = {
files = { files = {
'/etc/mysql/conf.d/override.conf': { '/etc/mysql/conf.d/override.conf': {
'content': repo.libs.ini.dumps(node.metadata.get('mariadb/conf')), 'context': {
'content_type': 'text', 'conf': node.metadata.get('mariadb/conf'),
},
'content_type': 'mako',
}, },
} }

View file

@ -3,12 +3,12 @@ defaults = {
'packages': { 'packages': {
'mariadb-server': { 'mariadb-server': {
'needs': { 'needs': {
'zfs_dataset:tank/mariadb', #'zfs_dataset:tank/mariadb',
}, },
}, },
'mariadb-client': { 'mariadb-client': {
'needs': { 'needs': {
'zfs_dataset:tank/mariadb', #'zfs_dataset:tank/mariadb',
}, },
}, },
}, },

View file

@ -36,7 +36,6 @@ def dhcp(metadata):
'systemd/units', 'systemd/units',
) )
def units(metadata): def units(metadata):
if node.has_bundle('systemd-networkd'):
units = {} units = {}
for network_name, network_conf in metadata.get('network').items(): for network_name, network_conf in metadata.get('network').items():
@ -95,5 +94,3 @@ def units(metadata):
'units': units, 'units': units,
} }
} }
else:
return {}

View file

@ -13,7 +13,6 @@ defaults = {
'os-prober': { 'os-prober': {
'installed': False, 'installed': False,
}, },
'dnsmasq-base': {},
}, },
'sources': { 'sources': {
'proxmox-ve': { 'proxmox-ve': {

View file

@ -18,3 +18,9 @@ directories = {
svc_systemd = { svc_systemd = {
'systemd-networkd.service': {}, 'systemd-networkd.service': {},
} }
if not node.has_bundle('proxmox-ve'):
files['/etc/network/interfaces'] = {
'delete': True,
}

View file

@ -5,6 +5,5 @@
], ],
'bundles': [ 'bundles': [
'ifupdown', 'ifupdown',
'proxmox-ve',
], ],
} }

View file

@ -47,14 +47,6 @@
'mtr-tiny': {}, 'mtr-tiny': {},
}, },
}, },
# iperf3
'nftables': {
'input': {
'tcp dport 5201 accept',
'udp dport 5201 accept',
},
},
}, },
'os': 'debian', 'os': 'debian',
'pip_command': 'pip3', 'pip_command': 'pip3',

View file

@ -14,7 +14,7 @@ class CaseSensitiveConfigParser(ConfigParser):
return value return value
def parse(text): def parse(text):
config = CaseSensitiveConfigParser(allow_no_value=True) config = CaseSensitiveConfigParser()
config.read_string(text) config.read_string(text)
return { return {
@ -24,7 +24,8 @@ def parse(text):
def dumps(dict): def dumps(dict):
sorted_dict = json.loads(json.dumps(dict, sort_keys=True, cls=MetadataJSONEncoder)) sorted_dict = json.loads(json.dumps(dict, sort_keys=True, cls=MetadataJSONEncoder))
parser = CaseSensitiveConfigParser(allow_no_value=True)
parser = CaseSensitiveConfigParser()
parser.read_dict(sorted_dict) parser.read_dict(sorted_dict)
writable = Writable() writable = Writable()

View file

@ -15,7 +15,7 @@
'id': '1d6a43e5-858c-42f9-9c40-ab63d61c787c', 'id': '1d6a43e5-858c-42f9-9c40-ab63d61c787c',
'network': { 'network': {
'external': { 'external': {
'interface': 'enp2s0', 'interface': 'enx00e04c220682',
'ipv4': '10.0.99.126/24', 'ipv4': '10.0.99.126/24',
'gateway4': '10.0.99.1', 'gateway4': '10.0.99.1',
'vlans': {'iot', 'internet', 'guest', 'rolf', 'internal', 'proxmox'}, 'vlans': {'iot', 'internet', 'guest', 'rolf', 'internal', 'proxmox'},

View file

@ -3,7 +3,7 @@
'groups': [ 'groups': [
'autologin', 'autologin',
'backup', 'backup',
'debian-12-pve', 'debian-12',
'home', 'home',
'nextcloud', 'nextcloud',
'monitored', 'monitored',
@ -12,6 +12,7 @@
'build-server', 'build-server',
], ],
'bundles': [ 'bundles': [
'apcupsd',
'build-agent', 'build-agent',
'crystal', 'crystal',
'gitea', 'gitea',
@ -31,6 +32,7 @@
'systemd-swap', 'systemd-swap',
'twitch-clip-download', 'twitch-clip-download',
'raspberrymatic-cert', 'raspberrymatic-cert',
#'tasmota-charge',
'wol-waker', 'wol-waker',
'zfs', 'zfs',
'proxmox-ve', 'proxmox-ve',
@ -154,6 +156,18 @@
}, },
}, },
'systemd-swap': 4_000_000_000, 'systemd-swap': 4_000_000_000,
'tasmota-charge': {
'phone': {
'ip': '10.0.0.175',
'user': 'u0_a233',
'password': 'november',
},
'plug': {
'ip': '10.0.2.115',
'min': 45,
'max': 70,
},
},
'twitch-clip-download': { 'twitch-clip-download': {
'channel_name': 'cronekorkn_', 'channel_name': 'cronekorkn_',
}, },