Closed realloc closed 7 years ago
Hello @realloc , Thanks for you proposition.
The current solution to do that it's to use ansible templating like that: https://github.com/jdauphant/ansible-role-nginx/pull/33#issuecomment-73109562 (You have the new notation of this role that help you doing that.)
By not introduce snippets in this role, we keep one way do things and we keep the role simple. Don't hesitate to show me stuff we can't do with ansible templating, we will see how we can fix it.
Indeed, templates may be used here, but I try to solve a little bit different problem.
In my case the resulting configuration should be read by humans, so it's better to let them check it in one place. Also when a snippet changes, it would be easier for a human looking at ansible output to understand single file update, rather then many changes in lots of files.
Ok good point, could you include an example in the readme ?
Simple example added.
Thanks for your help
It may be useful to have configuration snippets to include in some other configuration files (access list, error pages, TLS settings, etc).