Tweaked the role a bit

This commit is contained in:
Jack-Benny Persson 2022-03-15 03:20:34 +01:00
parent f2b39b5f88
commit 9e547eb7dc
3 changed files with 44 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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