From 24a67e56144d00d9eb8b8b532848b76703b14be2 Mon Sep 17 00:00:00 2001 From: CroneKorkN Date: Mon, 9 Jun 2025 16:24:18 +0200 Subject: [PATCH] wip --- bundles/apt/items.py | 1 + bundles/redis/items.py | 4 +++- libs/rsa.py | 3 --- nodes/wb.offsite-backups.py | 1 + requirements.txt | 1 - 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bundles/apt/items.py b/bundles/apt/items.py index a8da430..853c5c8 100644 --- a/bundles/apt/items.py +++ b/bundles/apt/items.py @@ -62,6 +62,7 @@ files = { '/usr/lib/nagios/plugins/check_apt_upgradable': { 'mode': '0755', }, + # /etc/kernel/postinst.d/apt-auto-removal } actions = { diff --git a/bundles/redis/items.py b/bundles/redis/items.py index c077b46..0e25185 100644 --- a/bundles/redis/items.py +++ b/bundles/redis/items.py @@ -1,12 +1,14 @@ directories = { '/etc/redis': { 'purge': True, + 'mode': '2770', 'needs': [ 'pkg_apt:redis-server', ], }, '/var/lib/redis': { 'owner': 'redis', + 'mode': '0750', 'needs': [ 'pkg_apt:redis-server', ], @@ -45,7 +47,7 @@ for name, conf in node.metadata.get('redis').items(): f'svc_systemd:redis-{name}:restart' ], } - + svc_systemd[f'redis-{name}'] = { 'needs': [ 'svc_systemd:redis', diff --git a/libs/rsa.py b/libs/rsa.py index e2666fb..60caabd 100644 --- a/libs/rsa.py +++ b/libs/rsa.py @@ -1,12 +1,10 @@ # https://stackoverflow.com/a/18266970 from Crypto.PublicKey import RSA -from Crypto.Hash import HMAC from struct import pack from hashlib import sha3_512 from cryptography.hazmat.primitives.serialization import load_der_private_key from functools import cache -from cache_to_disk import cache_to_disk class PRNG(object): @@ -22,7 +20,6 @@ class PRNG(object): return result -@cache_to_disk(30) def _generate_deterministic_rsa_private_key(secret_bytes): return RSA.generate(2048, randfunc=PRNG(secret_bytes)).export_key('DER') diff --git a/nodes/wb.offsite-backups.py b/nodes/wb.offsite-backups.py index f72c017..0fa1017 100644 --- a/nodes/wb.offsite-backups.py +++ b/nodes/wb.offsite-backups.py @@ -1,4 +1,5 @@ { + 'dummy': True, 'hostname': '192.168.179.20', 'groups': [ 'debian-12', diff --git a/requirements.txt b/requirements.txt index 0f80ca6..75cb897 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,5 +3,4 @@ pycryptodome PyNaCl PyYAML pyqrcode -cache_to_disk setuptools