feat: port configure actions (base, ufw, crowdsec, cron, systemd, routing)
This commit is contained in:
1 parent
63c4b6c7eb
commit
05469332e8
7 files changed
+158
No files matched your search
@@ -0,0 +1,15 @@
|
||||
# actions/configure/systemd.py
|
||||
"""Port of configure/systemd — deploy + enable units from configs/systemd."""
|
||||
import os
|
||||
from engine.descriptor import Meta, Flag
|
||||
|
||||
METADATA = Meta(summary="Deploy + enable systemd units from configs/systemd.",
|
||||
args=[Flag("--dry-run", "Render only; do not write/enable.")])
|
||||
|
||||
def run(ctx, args):
|
||||
cfg = os.path.join(ctx.paths.configs, "systemd")
|
||||
if not os.path.isdir(cfg):
|
||||
ctx.log.error(f"Config directory not found: {cfg}"); raise SystemExit(1)
|
||||
ctx.log.info("Deploying systemd units...")
|
||||
ctx.systemd.deploy_units("systemd", ctx.vars(), dry_run=args.dry_run)
|
||||
ctx.log.success("Configured systemd.")
|
||||
Reference in new issue
Block a user