|
|
@ -1,12 +1,5 @@ |
|
|
|
--- |
|
|
|
# tasks file for dotqmail |
|
|
|
- name: generate dotqmail-files |
|
|
|
template: |
|
|
|
src: templates/dotqmail.j2 |
|
|
|
dest: "{{ansible_env.HOME}}/.qmail-{{item.key}}" |
|
|
|
mode: 0644 |
|
|
|
with_dict: "{{dotqmail_files}}" |
|
|
|
|
|
|
|
|
|
|
|
# To decide wether a dotqmail file is still needed we need to get all files |
|
|
|
- name: Fetch all present dotqmail files |
|
|
@ -32,3 +25,16 @@ |
|
|
|
with_items: "{{present_files.files}}" |
|
|
|
when: dotqmail_files[current_ext] is not defined |
|
|
|
|
|
|
|
# Gooing forward to create/update files with config |
|
|
|
# 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 |
|
|
|
- name: generate/update other dotqmail-files |
|
|
|
template: |
|
|
|
src: templates/dotqmail.j2 |
|
|
|
dest: "{{ansible_env.HOME}}/{{file}}" |
|
|
|
mode: 0600 |
|
|
|
vars: |
|
|
|
file: "{{dotqmail_prefix}}{{item.key}}" |
|
|
|
file_lines: "{{item.value}}" |
|
|
|
with_dict: "{{dotqmail_files}}" |
|
|
|
|
|
|
|