- name: "create {{systemd_notifier_email_folder}}" file: path: "{{systemd_notifier_email_folder}}" state: directory mode: 0755 when: run_once_systemd_notifier_email is not defined - name: configure alert-email.sh template: src: alert-email.sh.j2 dest: "{{systemd_notifier_email_folder}}alert-email.sh" when: run_once_systemd_notifier_email is not defined - name: configure alert-email.cymais.service template: src: alert-email@.service.j2 dest: /etc/systemd/system/alert-email.cymais@.service notify: restart alert-email service when: run_once_systemd_notifier_email is not defined - name: run the systemd_notifier_email tasks once set_fact: run_once_systemd_notifier_email: true when: run_once_systemd_notifier_email is not defined