From da140e11e05d236bb2b94a2975f55fd8109e0607 Mon Sep 17 00:00:00 2001 From: Fenris Wolf Date: Tue, 31 Mar 2026 21:56:12 +0200 Subject: [PATCH] [int] --- roles/heimdall-order/cfg.schema.json | 17 +++++++++++------ roles/heimdall-order/defaults/main.json | 3 ++- roles/heimdall-order/tasks/main.json | 6 +++--- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/roles/heimdall-order/cfg.schema.json b/roles/heimdall-order/cfg.schema.json index d28ac09..7555bc3 100644 --- a/roles/heimdall-order/cfg.schema.json +++ b/roles/heimdall-order/cfg.schema.json @@ -7,22 +7,27 @@ "type": "string", "default": "heimdall" }, - "directory": { + "directory_program": { + "nullable": false, + "type": "string", + "default": "/opt/heimdall" + }, + "directory_conf": { "nullable": false, "type": "string", "default": "/etc/heimdall" }, - "rate": { - "nullable": false, - "type": "integer", - "default": 15 - }, "name": { "nullable": false, "type": "string" }, "conf": { "type": "any" + }, + "rate": { + "nullable": false, + "type": "integer", + "default": 15 } }, "additionalProperties": false, diff --git a/roles/heimdall-order/defaults/main.json b/roles/heimdall-order/defaults/main.json index 76c4cbe..1521eb1 100644 --- a/roles/heimdall-order/defaults/main.json +++ b/roles/heimdall-order/defaults/main.json @@ -1,7 +1,8 @@ { "cfg_heimdall_order_defaults": { "user": "heimdall", - "directory": "/etc/heimdall", + "directory_program": "/opt/heimdall", + "directory_conf": "/etc/heimdall", "rate": 15 } } diff --git a/roles/heimdall-order/tasks/main.json b/roles/heimdall-order/tasks/main.json index f74ef02..b8f5f51 100644 --- a/roles/heimdall-order/tasks/main.json +++ b/roles/heimdall-order/tasks/main.json @@ -4,7 +4,7 @@ "become": true, "ansible.builtin.file": { "state": "directory", - "path": "{{cfg_heimdall_order.directory}}", + "path": "{{cfg_heimdall_order.directory_conf}}", "owner": "{{cfg_heimdall_order.user}}" } }, @@ -13,7 +13,7 @@ "become": true, "ansible.builtin.copy": { "content": "{{cfg_heimdall_order.conf | to_nice_json}}", - "dest": "{{cfg_heimdall_order.directory}}/{{cfg_heimdall_order.name}}.hmdl.json" + "dest": "{{cfg_heimdall_order.directory_conf}}/{{cfg_heimdall_order.name}}.hmdl.json" } }, { @@ -29,7 +29,7 @@ "day": "*", "month": "*", "weekday": "*", - "job": "{{cfg_heimdall_order.directory}}/heimdall {{cfg_heimdall_order.directory}}/{{cfg_heimdall_order.name}}.hmdl.json --mutex-path=/tmp/heimdall-{{cfg_heimdall_order.name}}.lock" + "job": "{{cfg_heimdall_order.directory_program}}/heimdall {{cfg_heimdall_order.directory_conf}}/{{cfg_heimdall_order.name}}.hmdl.json --mutex-path=/tmp/heimdall-{{cfg_heimdall_order.name}}.lock" } } ]