From 8a498bb3a3ad90bbcf3714476ec589573414fce6 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Sun, 4 Feb 2018 11:49:14 +0100 Subject: [PATCH] postfix: add lines in /etc/.gitignore --- CHANGELOG.md | 3 +++ postfix/tasks/common.yml | 22 ++++++++++++++++++++++ postfix/tasks/main.yml | 9 ++------- 3 files changed, 27 insertions(+), 7 deletions(-) create mode 100644 postfix/tasks/common.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e44be54..82dedcab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ The **patch** part changes incrmentally at each release. ## [Unreleased] +### Added +* postfix: add lines in /etc/.gitignore + ## [9.1.6] - 2018-02-02 ### Added diff --git a/postfix/tasks/common.yml b/postfix/tasks/common.yml new file mode 100644 index 00000000..08ee6a56 --- /dev/null +++ b/postfix/tasks/common.yml @@ -0,0 +1,22 @@ +--- + +- name: check if main.cf is default + shell: 'grep -v -E "^(myhostname|mydestination|mailbox_command)" /etc/postfix/main.cf | md5sum -' + changed_when: False + check_mode: no + register: default_main_cf + tags: + - postfix + +- name: add lines in /etc/.gitignore + lineinfile: + dest: /etc/.gitignore + line: '{{ item }}' + state: present + create: no + with_items: + - "postfix/sa-blacklist.access" + - "postfix/*.db" + tags: + - postfix + - etc-git diff --git a/postfix/tasks/main.yml b/postfix/tasks/main.yml index a1b5a424..0e0fff2d 100644 --- a/postfix/tasks/main.yml +++ b/postfix/tasks/main.yml @@ -1,11 +1,6 @@ --- -- name: check if main.cf is default - shell: 'grep -v -E "^(myhostname|mydestination|mailbox_command)" /etc/postfix/main.cf | md5sum -' - changed_when: False - check_mode: no - register: default_main_cf - tags: - - postfix + +- include: common.yml - include: minimal.yml when: postfix_packmail == False