From e06363cee953568ed5afdf65b4075544f93f2209 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20G=C3=A9rczei?= Date: Tue, 14 Apr 2020 07:38:46 +0200 Subject: [PATCH] added SMTP authentication over TLS --- smartos-updater.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/smartos-updater.yml b/smartos-updater.yml index 1413e5f..918dd10 100644 --- a/smartos-updater.yml +++ b/smartos-updater.yml @@ -10,14 +10,21 @@ smarthost: mail smarthost_port: 25 tftp_dir: /data/tftproot + smarthost_user: "{{ notification_recipient }}" + smarthost_pw: !vault | + $ANSIBLE_VAULT;1.1;AES256 + 34613034663131326532666239633964353161363662323531623161383262303630616163346662 + 3436633337346164383335333437303131313662633936310a376230613533393963633661333263 + 35366530333134633661643662646638663438643466333362323235653034643636663434396363 + 6562393836613165320a303436343535303362366335383132346636323037623634636161316437 + 6564 image_dir: "{{ tftp_dir }}/smartos" tftp_user: nobody tftp_group: nogroup tasks: - - name: fetch platform image get_url: - src: https://us-east.manta.joyent.com/Joyent_Dev/public/SmartOS/platform-latest.tgz # no Manta at eu-ams-1 + url: https://us-east.manta.joyent.com/Joyent_Dev/public/SmartOS/platform-latest.tgz # no Manta at eu-ams-1 dest: /var/tmp/ when: download @@ -72,10 +79,12 @@ mail: host: "{{ smarthost }}" port: "{{ smarthost_port }}" - from: "Raspi Root " + secure: starttls + username: "{{ smarthost_user }}" + password: "{{ smarthost_pw }}" + from: "Ansible " to: "{{ notification_recipient }}" subject: "SmartOS update ({{ last_release }}) available" body: "created {{ image_dir }}/{{ last_release }} and {{ tftp_dir }}/smartos.ipxe" when: tarball is changed -