Skip to content

Commit

Permalink
templates for scheduled reccuring work package creation
Browse files Browse the repository at this point in the history
  • Loading branch information
zerwes committed Jun 10, 2024
1 parent ee3be81 commit 64ae3b0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
8 changes: 8 additions & 0 deletions templates/openproject_scheduled_reccuring_config.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
# {{ ansible_managed }}

# {{ item.key }}

{{ item.value.args | to_yaml(indent=4) }}

...
11 changes: 11 additions & 0 deletions templates/openproject_scheduled_reccuring_cronfile.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# {{ ansible_managed }}

MAILTO=""
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

{% for task, taskkeys in openproject_scheduled_reccuring_tasks.items() %}

# {{ task }}
{{ taskkeys.cron }} {{ openproject_scheduled_reccuring_user }} {{ taskkeys.check | default('test -x /usr/local/sbin/openprojectcreatetask.py') }} && /usr/local/sbin/openprojectcreatetask.py -l INFO --conf {{ openproject_scheduled_reccuring_confprefix }}{{ task }} 2>&1 > /var/log/{{ openproject_scheduled_reccuring_confprefix | basename }}{{task }}

{% endfor %}

0 comments on commit 64ae3b0

Please sign in to comment.