add custom cronjobs
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Robert Kaussow 2020-05-01 19:14:48 +02:00
parent fb3ee79644
commit 5d66f6e5a7
3 changed files with 30 additions and 0 deletions

View File

@ -35,3 +35,16 @@ ucs_registry_extra: []
# - path: timeserver # - path: timeserver
# value: "ntp.example.com" # value: "ntp.example.com"
# state: present # state: present
ucs_cronjobs: []
# @var ucs_cronjobs:example: >
# ucs_cronjobs:
# - name: backup-cleanup
# job: "find /var/univention-backup -mtime +7 -delete"
# user: root
# minute: 0
# hour: 3
# day: "*"
# weekday: "*"
# month: "*"
# state: present

16
tasks/cron.yml Normal file
View File

@ -0,0 +1,16 @@
---
- name: Setup custom cronjobs
cron:
name: "{{ item.name }}"
minute: "{{ item.minute | default(0) }}"
hour: "{{ item.hour | default(3) }}"
day: "{{ item.day | default('*') }}"
weekday: "{{ item.weekday | default('*') }}"
month: "{{ item.month | default('*') }}"
user: "{{ item.user | default('root') }}"
cron_file: univention-custom
job: "{{ item.job }}"
state: "{{ item.state | default('present') }}"
loop: "{{ ucs_cronjobs }}"
loop_control:
label: "{{ item.name }}"

View File

@ -2,5 +2,6 @@
- include_tasks: registry.yml - include_tasks: registry.yml
- include_tasks: users_groups.yml - include_tasks: users_groups.yml
- include_tasks: filesystem.yml - include_tasks: filesystem.yml
- include_tasks: cron.yml
- import_tasks: tls.yml - import_tasks: tls.yml
tags: tls_renewal tags: tls_renewal