cronie/tasks/main.yml

24 lines
1.1 KiB
YAML
Raw Normal View History

2019-04-09 14:33:56 +00:00
---
2019-04-14 09:44:33 +00:00
# tasks file for cronie
- name: Install cronie
pacman: name=cronie state=present
become: yes
- name: Enable cronie
service: name=cronie.service enabled=yes state=started
2020-07-14 10:55:46 +00:00
become: yes
2020-09-21 18:31:05 +00:00
- name: ensure root cron file exist
file:
path: /var/spool/cron/root
2020-12-14 16:32:23 +00:00
mode: 0600 # not required. Mode the file or directory should be. For those used to I(/usr/bin/chmod) remember that modes are actually octal numbers. You must either add a leading zero so that Ansible's YAML parser knows it is an octal number (like C(0644) or C(01777)) or quote it (like C('644') or C('1777')) so Ansible receives a string and can do its own conversion from string into number. Giving Ansible a number without following one of these rules will end up with a decimal number which will have unexpected results. As of version 1.8, the mode may be specified as a symbolic mode (for example, C(u+rwx) or C(u=rw,g=r,o=r)).
2020-09-21 18:31:05 +00:00
state: "touch"
become: true
2020-07-14 10:55:46 +00:00
- name: Set MAILFROM
become: true
lineinfile:
dest: /var/spool/cron/root
regexp: "MAILFROM="
2020-09-21 18:31:05 +00:00
line: "MAILFROM= {{inventory_hostname}}@{{domain.name}}"