Browse Source

Prepare defaults and vars

Especially to be conform to RFC 2142 there are some predefinitions
needed
Also we need to make sure that those always are applied except they are
explicitly overwritten

https://tools.ietf.org/html/rfc2142
master
Jonathan Golder 8 years ago
parent
commit
42281b1bb5
  1. 9
      defaults/main.yml
  2. 2
      tasks/main.yml
  3. 7
      vars/main.yml

9
defaults/main.yml

@ -2,3 +2,12 @@
# defaults file for dotqmail
dotqmail_prefix : ".qmail-"
# Set root dotqmail file to maildir by default
dotqmail_rootfile: ["./Maildir/"]
# Those must be always present according to rfc2142
# @see https://tools.ietf.org/html/rfc2142
dotqmail_default_files:
"abuse": ["{{ansible_env.USER}}"]
"hostmaster": ["{{ansible_env.USER}}"]
"postmaster": ["{{ansible_env.USER}}"]

2
tasks/main.yml

@ -39,6 +39,8 @@
# For the other files the we get a key-value pair with the dotqmail extention
# as key and the list of lines as value while looping over dotqmail_files
# (which is a combination of dotqmail_config_files from inventory over
# dotqmail_default_files from role defaults)
- name: generate/update other dotqmail-files
template:
src: templates/dotqmail.j2

7
vars/main.yml

@ -1,2 +1,9 @@
---
# vars file for dotqmail
# combine dotqmail_default_files from role's default with configuration
# Will make sure that every dotqmail file from default config will be present
# the content hence can be adjusted by defining the extention in e.g. inventory
# which will be prefered
# This is done to be conform with rfc2142
dotqmail_files: "{{dotqmail_default_files|combine(dotqmail_config_files)}}"

Loading…
Cancel
Save