From d525955a334a75d6f26d2baf935fc7f23bba3e10 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Mon, 12 Aug 2024 16:26:03 +0200 Subject: [PATCH] dd --- roles/mgrote_munin_server/handlers/main.yml | 8 ++++++ roles/mgrote_munin_server/tasks/mail.yml | 32 +++------------------ 2 files changed, 12 insertions(+), 28 deletions(-) diff --git a/roles/mgrote_munin_server/handlers/main.yml b/roles/mgrote_munin_server/handlers/main.yml index b45dc6cd..4b358b86 100644 --- a/roles/mgrote_munin_server/handlers/main.yml +++ b/roles/mgrote_munin_server/handlers/main.yml @@ -14,4 +14,12 @@ enabled: true masked: false state: restarted + +- name: "restart ssmtp" + become: true + ansible.builtin.systemd: + name: ssmtp + enabled: true + masked: false + state: restarted ... diff --git a/roles/mgrote_munin_server/tasks/mail.yml b/roles/mgrote_munin_server/tasks/mail.yml index 1f9de5d6..0cf01ef9 100644 --- a/roles/mgrote_munin_server/tasks/mail.yml +++ b/roles/mgrote_munin_server/tasks/mail.yml @@ -1,32 +1,8 @@ --- -- name: ensure packages are installed - become: true - ansible.builtin.package: - name: "{{ munin_packages }}" - state: present - -- name: Ensure needed dirs exists - ansible.builtin.file: - path: "{{ item }}" - state: directory - mode: '0755' - owner: munin - group: munin - loop: "{{ munin_dirs }}" - -- name: Ensure permissions are set - ansible.builtin.file: - path: /var/lib/munin/cgi-tmp - mode: 'ugo+rw' - state: directory - owner: munin - group: munin - recurse: true - -- name: Template apache config +- name: Template ssmtp config ansible.builtin.template: - src: apache.conf - dest: /etc/apache2/sites-available/000-default.conf - notify: "restart apache2" + src: ssmtp.conf + dest: /etc/ssmtp/ssmtp.conf + notify: "restart ssmtp" ...