36 lines
935 B
JSON
36 lines
935 B
JSON
[
|
|
{
|
|
"name": "directory",
|
|
"become": true,
|
|
"ansible.builtin.file": {
|
|
"state": "directory",
|
|
"path": "{{cfg_heimdall_order.directory}}",
|
|
"owner": "{{cfg_heimdall_order.user}}"
|
|
}
|
|
},
|
|
{
|
|
"name": "file",
|
|
"become": true,
|
|
"ansible.builtin.copy": {
|
|
"content": "{{cfg_heimdall_order.conf}} | json",
|
|
"dest": "{{cfg_heimdall_order.directory}}/{{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_program.rate | string}}",
|
|
"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"
|
|
}
|
|
}
|
|
]
|