22 lines
525 B
YAML
22 lines
525 B
YAML
---
|
|
- name: Update Crontab
|
|
hosts: all
|
|
|
|
tasks:
|
|
- name: On execute la commande "sudo crontab -u root -l > crontab_new"
|
|
shell:
|
|
cmd: sudo crontab -u root -l > crontab_new
|
|
|
|
- name: On execute la commande "sed de remplacement"
|
|
shell:
|
|
cmd: sudo sed -i -e "s/backup.sh/backup.sh -b/g" crontab_new
|
|
|
|
- name: On execute la commande "sudo crontab -u root crontab_new"
|
|
shell:
|
|
cmd: sudo crontab -u root crontab_new
|
|
|
|
- name: remove crontab_new
|
|
file:
|
|
path: crontab_new
|
|
state: absent
|