Closed Noxeus closed 4 years ago
Well spotted, thanks. Yes we can add the default filter to nothing, but it is always better, in my opinion, to have a clear separation between the code and the data, or in our case, the tasks and the template. Therefore, I should have written the task like this:
# See http://www.postfix.org/DEBUG_README.html
- name: Set SMTP flag for debugging or development
set_fact:
smtpd_flags: '{{ (system.debug or system.devel) | ternary("-v", "") }}'
If you clone the repository and create a pull request, then I will accept it. I may also invite you to take part in the project.
Hi, It seems that the template for postfix' master.cf uses the
smtpd_flags
variable which is only set whensystem.devel
orsystem.debug
are true.I think this should either always be set, but set to''
when the above are false.EDIT: I just learned of the default filter in ansible, maybe use that?