update..
This commit is contained in:
47
roles/common/tasks/cron.yml
Normal file
47
roles/common/tasks/cron.yml
Normal file
@ -0,0 +1,47 @@
|
||||
---
|
||||
|
||||
- name: (cron.yml) Set env entries in user crontabs
|
||||
cron:
|
||||
name: '{{ item.name }}'
|
||||
env: 'yes'
|
||||
user: '{{ item.user | default(omit) }}'
|
||||
job: '{{ item.job }}'
|
||||
insertafter: '{{ item.insertafter | default(omit) }}'
|
||||
loop: "{{ cron_env_entries }}"
|
||||
loop_control:
|
||||
label: '{{ item.name }}'
|
||||
when: item.job is defined
|
||||
tags:
|
||||
- user_crontab
|
||||
|
||||
|
||||
- name: (cron.yml) Set special time entries in user crontabs
|
||||
cron:
|
||||
name: '{{ item.name }}'
|
||||
special_time: '{{ item.special_time }}'
|
||||
user: '{{ item.user | default(omit) }}'
|
||||
job: '{{ item.job }}'
|
||||
state: present
|
||||
loop: "{{ cron_user_special_time_entries }}"
|
||||
loop_control:
|
||||
label: '{{ item.name }}'
|
||||
when: item.job is defined
|
||||
tags:
|
||||
- user_crontab
|
||||
|
||||
|
||||
- name: (cron.yml) Set normal entries in user crontabs
|
||||
cron:
|
||||
name: '{{ item.name }}'
|
||||
minute: '{{ item.minute | default(omit) }}'
|
||||
hour: '{{ item.hour | default(omit) }}'
|
||||
day: '{{ day | default(omit) }}'
|
||||
weekday: '{{ item.weekday | default(omit) }}'
|
||||
month: '{{ item.month | default(omit) }}'
|
||||
job: '{{ item.job }}'
|
||||
loop: "{{ cron_user_entries }}"
|
||||
loop_control:
|
||||
label: '{{ item.name }}'
|
||||
when: item.job is defined
|
||||
tags:
|
||||
- user_crontab
|
Reference in New Issue
Block a user