infrastructure/roles/heimdall-order/tasks/main.json
2026-03-31 21:56:12 +02:00

36 lines
962 B
JSON

[
{
"name": "directory",
"become": true,
"ansible.builtin.file": {
"state": "directory",
"path": "{{cfg_heimdall_order.directory_conf}}",
"owner": "{{cfg_heimdall_order.user}}"
}
},
{
"name": "file",
"become": true,
"ansible.builtin.copy": {
"content": "{{cfg_heimdall_order.conf | to_nice_json}}",
"dest": "{{cfg_heimdall_order.directory_conf}}/{{cfg_heimdall_order.name}}.hmdl.json"
}
},
{
"name": "cronjob",
"become": true,
"ansible.builtin.cron": {
"state": "present",
"user": "{{cfg_heimdall_order.user}}",
"disabled": false,
"name": "heimdall:{{cfg_heimdall_order.name}}",
"minute": "*/{{cfg_heimdall_order.rate | string}}",
"hour": "*",
"day": "*",
"month": "*",
"weekday": "*",
"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"
}
}
]