diff --git a/defaults/main.yml b/defaults/main.yml index 8d414aa..39ff2cf 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -4,6 +4,4 @@ msmtp_mailhub_port: 587 msmtp_hostname: ducamps.win msmtp_auth_user: vincent@ducamps.win msmtp_auth_pass: the_mandrill_api_key -msmtp_package: - - msmtp - - msmtp-mta \ No newline at end of file + diff --git a/tasks/main.yml b/tasks/main.yml index 7c9733b..aebcacd 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,3 +1,9 @@ +- name: Include OS-specific variables + include_vars: "{{ item }}" + with_first_found: + - files: + - "{{ ansible_os_family }}-{{ ansible_distribution_major_version }}.yml" + - "{{ ansible_os_family }}.yml" - name: uninstall ssmtp package: @@ -39,4 +45,4 @@ #sudo chown root:mail /usr/sbin/msmtp /etc/msmtp{,/{msmtp.conf,revaliases}} #sudo chmod 2711 /usr/sbin/msmtp -#sudo chmod o-rwx /etc/msmtp /etc/msmtp/msmtp.conf; \ No newline at end of file +#sudo chmod o-rwx /etc/msmtp /etc/msmtp/msmtp.conf; diff --git a/vars/Archlinux.yml b/vars/Archlinux.yml new file mode 100644 index 0000000..20eb449 --- /dev/null +++ b/vars/Archlinux.yml @@ -0,0 +1,4 @@ +--- +msmtp_package: + - msmtp + - msmtp-mta diff --git a/vars/RedHat.yml b/vars/RedHat.yml new file mode 100644 index 0000000..1f12550 --- /dev/null +++ b/vars/RedHat.yml @@ -0,0 +1,2 @@ +msmtp_package: + - msmtp