infrastructure/roles/heimdall-order/tasks/main.json
2026-03-31 23:28:23 +02:00

37 lines
992 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,
"become_user": "{{cfg_heimdall_program.user}}",
"ansible.builtin.copy": {
"content": "{{cfg_heimdall_order.conf | to_nice_json(sort_keys=False)}}",
"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": "*",
"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"
}
}
]