fixed syntax errors
This commit is contained in:
parent
298e5c5a98
commit
7607a5141c
2 changed files with 6 additions and 5 deletions
|
|
@ -1,11 +1,12 @@
|
||||||
- debug: var=job
|
- set_fact:
|
||||||
|
job: '{{ (item.value)|combine(item.value, {"name": item.key}) }}'
|
||||||
|
|
||||||
- name: add cron jobs (random_daily)
|
- name: add cron jobs (random_daily)
|
||||||
when: job.special_time == "random_daily"
|
when: job.special_time == "random_daily"
|
||||||
cron:
|
cron:
|
||||||
name: "{{ job.name }}"
|
name: "{{ job.name }}"
|
||||||
job: "{{ job.job }}"
|
job: "{{ job.job }}"
|
||||||
user: "{{ job.user|d('root') ))"
|
user: "{{ job.user|d('root') }}"
|
||||||
hour: "{{ 1 + ( 22 | random(seed= inventory_hostname + job.name) ) }}"
|
hour: "{{ 1 + ( 22 | random(seed= inventory_hostname + job.name) ) }}"
|
||||||
minute: "{{ 5 + ( 50 | random(seed= inventory_hostname + job.name) ) }}"
|
minute: "{{ 5 + ( 50 | random(seed= inventory_hostname + job.name) ) }}"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
- name: add cron jobs
|
- include_tasks:
|
||||||
with_dict: cron
|
file: job.yml
|
||||||
include: job.yaml job="{{ (item.value)|combine({'name': item.key}) }}"
|
with_dict: "{{ cron }}"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue