diff --git a/README.md b/README.md index f454b05..412882b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Ansible Postfix role This role is an easy way of configuring outgoing mail for local users. It's -intended to be used by local users only, for example, to receive mail from -cronjobs. +intended to be used by local users only, for example, to send mail from +cronjobs to an external address. An aliases file is set up along with Postfix, where all email is forwarded to the current Ansible user. Those emails are then forwarded to an external email diff --git a/meta/main.yml b/meta/main.yml index 79dda0f..06078fa 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -1,2 +1,36 @@ -dependencies: - - role: update_cache +dependencies: [] + +galaxy_info: + role_name: postfix + author: jackbenny + description: Setup Postfix so local users can send external mail + company: "CyberInfo Sverige" + license: "license GPLv2" + min_ansible_version: 2.9 + platforms: + - name: Debian + versions: + - stretch + - buster + - bullseye + - name: Ubuntu + versions: + - xenial + - bionic + - focal + - impish + - name: CentOS + versions: + - 9 + - name: Fedora + version: + - 30 + - 31 + - 32 + - 33 + - 34 + - 35 + - 36 + galaxy_tags: + - postfix + - system diff --git a/tasks/main.yml b/tasks/main.yml index bea5e6b..e7887f8 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -16,6 +16,12 @@ mail will be forwarded to this address" success_msg: "Recipient address is set" +- name: Update the cache if we are on a Debian based system + apt: + update_cache: yes + cache_valid_time: 3600 + when: ansible_os_family == 'Debian' + - name: Install Postfix and s-nail package: state: present