25 lines
552 B
YAML
25 lines
552 B
YAML
---
|
|
- hosts: all
|
|
user: ansible
|
|
become: yes
|
|
gather_facts: no
|
|
tasks:
|
|
- name: Ensure a job that runs at 5am and 5pm exists.
|
|
cron:
|
|
name: "Job 0001"
|
|
minute: "0"
|
|
hour: "5,17"
|
|
job: "df -h >> /tmp/diskspace"
|
|
|
|
- name: Creates an entry like "PATH=/opt/bin/" on top of crontab
|
|
cron:
|
|
name: PATH
|
|
env: yes
|
|
job: /opt/bin
|
|
|
|
- name: Create an entry like "APP_HOME=/srv/app" and insert it after PATH declaration
|
|
cron:
|
|
name: APP_HOME
|
|
env: yes
|
|
job: /srv/app
|
|
insertbefore: PATH |