From 1a4588d8f1130fa6ccaf8bbdd5ace7646ff23941 Mon Sep 17 00:00:00 2001 From: Niklas Yann Wettengel Date: Sat, 18 Mar 2017 23:39:16 +0100 Subject: [PATCH] setup_fastd.yml: install ssmtp --- roles/install_ssmtp/tasks/main.yml | 11 +++++++++++ roles/install_ssmtp/templates/ssmtp.conf.j2 | 6 ++++++ setup_fastd.yml | 1 + 3 files changed, 18 insertions(+) create mode 100644 roles/install_ssmtp/tasks/main.yml create mode 100644 roles/install_ssmtp/templates/ssmtp.conf.j2 diff --git a/roles/install_ssmtp/tasks/main.yml b/roles/install_ssmtp/tasks/main.yml new file mode 100644 index 0000000..2aa2c6e --- /dev/null +++ b/roles/install_ssmtp/tasks/main.yml @@ -0,0 +1,11 @@ +--- +- name: install ssmtp + pacman: + name: ssmtp + state: present + +- name: configure ssmtp + template: + src: ssmtp.conf.j2 + dest: /etc/ssmtp/ssmtp.conf + diff --git a/roles/install_ssmtp/templates/ssmtp.conf.j2 b/roles/install_ssmtp/templates/ssmtp.conf.j2 new file mode 100644 index 0000000..486e047 --- /dev/null +++ b/roles/install_ssmtp/templates/ssmtp.conf.j2 @@ -0,0 +1,6 @@ +root=root=root@niyawe.de +mailhub=mail.niyawe.de:465 +rewriteDomain=niyawe.de +hostname={{ ansible_nodename }} +FromLineOverride=YES +UseTLS=YES diff --git a/setup_fastd.yml b/setup_fastd.yml index cc5079c..0c114be 100644 --- a/setup_fastd.yml +++ b/setup_fastd.yml @@ -7,6 +7,7 @@ - configure_journald - configure_sysctl - configure_iptables + - install_ssmtp - install_nginx - install_ntp - install_haveged