diff --git a/tasks/main.yml b/tasks/main.yml index 95f2620..cafe0e4 100755 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -12,6 +12,12 @@ - "setup-{{ ansible_distribution | lower }}.yml" - "setup-{{ ansible_os_family | lower }}.yml" +- name: Ensure group "msmtp" exists + group: + name: msmtp + state: present + when: ansible_os_family == "RedHat" + - name: Copy systemd unit file to server copy: src: msmtpd.service diff --git a/tasks/setup-rocky-8.yml b/tasks/setup-rocky-8.yml index 9b3605d..27eceae 100644 --- a/tasks/setup-rocky-8.yml +++ b/tasks/setup-rocky-8.yml @@ -1,10 +1,4 @@ --- -- name: Ensure group "msmtp" exists - group: - name: msmtp - state: present - when: ansible_os_family == "RedHat" - - name: Install msmtp yum: name: