This repository has been archived on 2024-02-16. You can view files and clone it, but cannot push or open issues or pull requests.
sysconfig/roles/cron/tasks/cronie.yml

34 lines
820 B
YAML

---
- name: cronie | Install cronie package
community.general.packaging.os.apk:
name: cronie
state: present
- name: cronie | Allow only {{ username }} and root to access crontabs
copy:
content: |
{{ username }}
dest: /etc/cron.allow
owner: root
group: root
mode: 0644
# btrbk runs btrfs command directly (without specifying /sbin prefix),
# hence we need to inherit PATH here. Also log to syslog
# (the default PATH is /usr/local/bin:/bin:/usr/bin)
- name: cronie | Configure command options for cronie service
copy:
content: |
CRON_OPTS="-s -P"
dest: /etc/conf.d/cronie
owner: root
group: root
mode: 0644
- name: cronie | Start cronie service in runlevel default
service:
name: cronie
runlevel: default
state: started
enabled: true