diff --git a/roles/heimdall-order/cfg.schema.json b/roles/heimdall-order/cfg.schema.json index d28ac09..2412b7c 100644 --- a/roles/heimdall-order/cfg.schema.json +++ b/roles/heimdall-order/cfg.schema.json @@ -7,16 +7,16 @@ "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" diff --git a/roles/heimdall-order/defaults/main.json b/roles/heimdall-order/defaults/main.json index 76c4cbe..0dd2c80 100644 --- a/roles/heimdall-order/defaults/main.json +++ b/roles/heimdall-order/defaults/main.json @@ -1,7 +1,7 @@ { "cfg_heimdall_order_defaults": { "user": "heimdall", - "directory": "/etc/heimdall", - "rate": 15 + "directory_program": "/opt/heimdall", + "directory_conf": "/etc/heimdall" } } diff --git a/roles/heimdall-order/tasks/main.json b/roles/heimdall-order/tasks/main.json index eda03ae..9ae7c3a 100644 --- a/roles/heimdall-order/tasks/main.json +++ b/roles/heimdall-order/tasks/main.json @@ -4,16 +4,17 @@ "become": true, "ansible.builtin.file": { "state": "directory", - "path": "{{cfg_heimdall_order.directory}}", + "path": "{{cfg_heimdall_order.directory_conf}}", "owner": "{{cfg_heimdall_order.user}}" } }, { "name": "file", "become": true, + "become_user": "{{cfg_heimdall_program.user}}", "ansible.builtin.copy": { - "content": "{{cfg_heimdall_order.conf}} | json", - "dest": "{{cfg_heimdall_order.directory}}/{{cfg_heimdall_order.name}}.hmdl.json" + "content": "{{cfg_heimdall_order.conf | to_nice_json(sort_keys=False)}}", + "dest": "{{cfg_heimdall_order.directory_conf}}/{{cfg_heimdall_order.name}}.hmdl.json" } }, { @@ -24,12 +25,12 @@ "user": "{{cfg_heimdall_order.user}}", "disabled": false, "name": "heimdall:{{cfg_heimdall_order.name}}", - "minute": "*/{{cfg_heimdall_program.rate | string}}", + "minute": "*", "hour": "*", "day": "*", "month": "*", "weekday": "*", - "job": "{{cfg_heimdall_program.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" } } ] diff --git a/roles/heimdall-program/defaults/main.json b/roles/heimdall-program/defaults/main.json index 8949fa1..57589aa 100644 --- a/roles/heimdall-program/defaults/main.json +++ b/roles/heimdall-program/defaults/main.json @@ -2,7 +2,7 @@ "cfg_heimdall_program_defaults": { "user": "heimdall", "directory": "/opt/heimdall", - "git_repository_url": "pv-svartalfheim-git:heimdall/core", + "git_repository_url": "https://forgejo.ramsch.sx/heimdall/core", "git_reference": "main" } } diff --git a/roles/heimdall-program/tasks/main.json b/roles/heimdall-program/tasks/main.json index 4819332..a61ea71 100644 --- a/roles/heimdall-program/tasks/main.json +++ b/roles/heimdall-program/tasks/main.json @@ -8,7 +8,8 @@ "git", "make", "rsync", - "nodejs" + "nodejs", + "node-typescript" ] } }, @@ -18,7 +19,7 @@ "ansible.builtin.user": { "name": "{{cfg_heimdall_program.user}}", "create_home": true, - "home": "{{cfg_heimdall_program.directory}" + "home": "{{cfg_heimdall_program.directory}}" } }, {