ansible-playbooks/system/cron.ansible.yml

30 lines
682 B
YAML

- hosts: localhost
tasks:
- name: Install cronie
package:
state: present
name:
- cronie
- cronie-openrc
- name: Cronie minutely directory
file:
state: directory
path: /etc/periodic/minutely
owner: root
group: root
- name: Crontab minutely cronjob
cron:
state: present
user: root
name: Minutely cronjob
job: run-parts /etc/periodic/minutely
minute: '*'
hour: '*'
day: '*'
weekday: '*'
month: '*'
- name: Enable cronie service
service:
name: cronie
state: started
enabled: true