diff --git a/tasks/main.yml b/tasks/main.yml index 897f971..f3f4253 100755 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,3 +1,32 @@ --- -- include: msmtp.yml \ No newline at end of file +# Author: Adham Helal +# +# Objective: Deploy msmtp + + +- name: Install msmtp and mailx + ansible.builtin.apt: + name: "{{ item }}" + state: present + update_cache: true + cache_valid_time: 3600 + with_items: + - msmtp-mta + - bsd-mailx + +- name: Copy mstprc conf file + ansible.builtin.template: + src: msmtprc.j2 + dest: /etc/msmtprc + owner: root + group: root + mode: "0644" + +- name: Copy aliases conf file + ansible.builtin.template: + src: aliases.j2 + dest: /etc/aliases + owner: root + group: root + mode: "0644" diff --git a/tasks/msmtp.yml b/tasks/msmtp.yml deleted file mode 100644 index d1ba495..0000000 --- a/tasks/msmtp.yml +++ /dev/null @@ -1,33 +0,0 @@ ---- - -# Author: Adham Helal -# -# Objective: Deploy msmtp - - -- name: Install msmtp and mailx - apt: - name: "{{ item }}" - state: present - update_cache: yes - cache_valid_time: 3600 - with_items: - - msmtp-mta - - bsd-mailx - -- name: Copy mstprc conf file - template: - src: msmtprc.j2 - dest: /etc/msmtprc - owner: root - group: root - mode: 0644 - -- name: Copy aliases conf file - template: - src: aliases.j2 - dest: /etc/aliases - owner: root - group: root - mode: 0644 -