From a73973f69ef0b802c46710d87f0db825ab2ce156 Mon Sep 17 00:00:00 2001 From: vincent Date: Tue, 14 Jul 2020 12:55:46 +0200 Subject: [PATCH] correct mail FROM --- defaults/main.yml | 5 ++++- tasks/main.yml | 9 ++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 96d8cdb..1b22f6d 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,2 +1,5 @@ --- -# defaults file for cronie \ No newline at end of file +# defaults file for cronie + +domain: + name: toto \ No newline at end of file diff --git a/tasks/main.yml b/tasks/main.yml index 761d0fe..01c35f7 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -6,4 +6,11 @@ - name: Enable cronie service: name=cronie.service enabled=yes state=started - become: yes \ No newline at end of file + become: yes + +- name: Set MAILFROM + become: true + lineinfile: + dest: /var/spool/cron/root + regexp: "MAILFROM=" + line: "MAILFROM= {{inventory_hostname}}@{{domain.name}}" \ No newline at end of file