-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Old entries in recipient_canonical_maps/sender_canonical_maps/aliases are not cleaned up #87
Comments
That's indeed a problem. Using the lineinfile module is not appropriate here. copy with content parameter or template would work better. Also both of these are more efficient for a larger number of entries in the list. |
For example:
Disadvantage: leaves an empty line in the file when the value is an empty array. |
@racke Maybe add a |
I thought about that, but if we do that it is still possible that we get stale entries from previous runs. I think it should be possible to use the same template for all of these tasks (instead of using copy). |
I guess I prefer a template too |
I faced this today but with
|
Definitely ... and the performance will suffer for a large number of entries. |
Feel free to create a PR |
If I run the playbook with:
Then I run the playbook with:
And then I inspect /etc/postfix/recipient_canonical_maps
The text was updated successfully, but these errors were encountered: