From f8ac8a697f74b09558d6884d0a2a26ed7656dbd9 Mon Sep 17 00:00:00 2001 From: Gitouche <26656-gitouche@users.noreply.framagit.org> Date: Thu, 23 Sep 2021 22:24:28 +0200 Subject: [PATCH] Update to msmtp-1.8.15-2.el8.x86_64.rpm + manage rpm file name in a variable --- defaults/main.yml | 2 ++ tasks/main.yml | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 0afcac3..05aca6f 100755 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,4 +1,6 @@ --- +msmtp_rpm_file: msmtp-1.8.15-2.el8.x86_64.rpm + msmtp_accounts: # Account 1 - it was a real account for testing (but yandex now blocks it) # Uses Yandex app password limited to POP3, SMTP and IMAP diff --git a/tasks/main.yml b/tasks/main.yml index 760fd34..aaf4ddf 100755 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,8 +1,8 @@ --- - name: Copy RPM file to server copy: - src: msmtp-1.8.15-1.el8.x86_64.rpm - dest: /tmp/msmtp-1.8.15-1.el8.x86_64.rpm + src: "{{ msmtp_rpm_file }}" + dest: "/tmp/{{ msmtp_rpm_file }}" mode: 0400 when: ansible_os_family == "RedHat" @@ -22,7 +22,7 @@ - name: Install msmtp yum: name: - - /tmp/msmtp-1.8.15-1.el8.x86_64.rpm + - "/tmp/{{ msmtp_rpm_file }}" - mailx state: present disable_gpg_check: yes