-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added postfix_files feature as a simple means to add extra files/maps…
… to the postfix config
- Loading branch information
1 parent
9f52769
commit 73b7c72
Showing
4 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
- name: Create a postmapped file | ||
hosts: all | ||
|
||
vars: | ||
postfix_files: | ||
- name: test | ||
content: test | ||
postmap: true | ||
|
||
tasks: | ||
- name: Run the role with test postmap file | ||
include_role: | ||
name: linux-system-roles.postfix | ||
public: true | ||
|
||
- name: Check if postmap file exists | ||
stat: | ||
path: /etc/postfix/test.db | ||
register: test_file | ||
changed_when: false | ||
|
||
- name: Assert file is present | ||
assert: | ||
that: test_file.stat.exists | ||
|
||
- name: Clean up test files | ||
file: | ||
path: "{{ item }}" | ||
state: absent | ||
loop: | ||
- /etc/postfix/test | ||
- /etc/postfix/test.db |